* common.cc (Sort_commons::operator): Correct sorting algorithm.
[binutils.git] / gold / ChangeLog
blob492e5c59c4752092224b15434ca45f7d39082c0d
1 2008-03-27  Ian Lance Taylor  <iant@google.com>
3         * common.cc (Sort_commons::operator): Correct sorting algorithm.
4         * testsuite/common_test_1.c: New file.
5         * testsuite/Makefile.am (check_PROGRAMS): Add common_test_1.
6         (common_test_1_SOURCES): New variable.
7         (common_test_1_DEPENDENCIES): New variable.
8         (common_test_1_LDFLAGS): New variable.
10         * symtab.cc (Symbol_table::add_from_object): Handle saw_undefined_
11         and commons_ correctly when NAME/VERSION does not override
12         NAME/NULL.
13         * testsuite/ver_test_6.c: New file.
14         * testsuite/Makefile.am (check_PROGRAMS): Add ver_test_6
15         (ver_test_6_SOURCES, ver_test_6_DEPENDENCIES): New variables.
16         (ver_test_6_LDFLAGS, ver_test_6_LDADD): New variables.
18 2008-03-26  Ian Lance Taylor  <iant@google.com>
20         * symtab.cc (Symbol_table::add_from_relobj): Don't set the version
21         of an undefined symbol from a version script.
22         * testsuite/Makefile.am (ver_test_5.so): New target.
23         (ver_test_5.o): New target.
24         (check_SCRIPTS): Add ver_test_5.sh.
25         (check_DATA): Add ver_test_5.syms.
26         (ver_test_5.syms): New target.
27         * testsuite/ver_test_5.cc: New file.
28         * testsuite/ver_test_5.script: New file.
29         * testsuite/ver_test_5.sh: New file.
30         * Makefile.in, testsuite/Makefile.in: Rebuild.
32         PR gold/5986
33         Fix problems building gold with gcc 4.3.0.
34         * gold.h (TEMPLATE_ATTRIBUTE_PRINTF_4): Define.
35         (gold_error_at_location, gold_warning_at_location): Use it.
36         * configure.ac: Check whether we can compile and use a template
37         function with a printf attribute.
38         * x86_64.cc (Target_x86_64::do_code_fill): Swap out a 32-bit value
39         when jumping over bytes.
40         * object.cc: Instantiate Object::read_section_data.
41         * debug.h: Include <cstring>
42         * dwarf_reader.cc: Include <algorithm>
43         * main.cc: Include <cstring>.
44         * options.cc: Include <cstring>.
45         * output.cc: Include <cstring>.
46         * script.cc: Include <cstring>.
47         * script.h: Include <string>.
48         * symtab.cc: Include <cstring> and <algorithm>.
49         * target-select.cc: Include <cstring>.
50         * version.cc: Include <string>.
51         * testsuite/testmain.cc: Include <cstdlib>.
52         * configure, config.in: Rebuild.
54 2008-03-25  Ian Lance Taylor  <iant@google.com>
56         * options.cc: Include "../bfd/bfdver.h".
57         (options::help): Print bug reporting address.
59         * version.cc (print_version): Adjust output for current value of
60         BFD_VERSION_STRING.
62         * NEWS: New file.
64         * options.cc (options::help): Print list of supported targets.
65         * target-select.h: Include <vector>.
66         (class Target_selector): Make machine_, size_, and is_big_endian_
67         fields const.  Add bfd_name_ and instantiated_target_ fields.
68         (Target_selector::Target_selector): Add bfd_name parameter.
69         (Target_selector::recognize): Make non-virtual, call
70         do_recognize.
71         (Target_selector::recognize_by_name): Make non-virtual, call
72         do_recognize_by_name.
73         (Target_selector::supported_names): New function.
74         (Target_selector::bfd_name): New function.
75         (Target_selector::do_instantiate_target): New pure virtual
76         function.
77         (Target_selector::do_recognize): New virtual function.
78         (Target_selector::do_recognize_by_name): New virtual function.
79         (Target_selector::instantiate_target): New private function.
80         (supported_target_names): Declare.
81         * target-select.cc (Target_selector::Target_selector): Update for
82         new parameter and fields.
83         (select_target_by_name): Check that the name matches before
84         calling recognize_by_name.
85         (supported_target_names): New function.
86         * i386.cc (class Target_selector_i386): Update Target_selector
87         constructor call.  Remove recognize and recognize_by_name.  Add
88         do_instantiate_target.
89         * x86_64.cc (class Target_selector_x86_64): Likewise.
90         * testsuite/testfile.cc (class Target_selector_test): Update for
91         changes to Target_selector.
93         * README: Rewrite, with some notes on unsupported features.
95 2008-03-24  Cary Coutant  <ccoutant@google.com>
97         * i386.cc (Target_i386::Got_type): New enum declaration.
98         (Target_i386::Scan::local): Updated callers of Output_data_got
99         member functions.
100         (Target_i386::Scan::global): Likewise.
101         (Target_i386::Relocate::relocate): Likewise.
102         (Target_i386::Relocate::relocate_tls): Likewise.
103         * object.h (Got_offset_list): New class.
104         (Sized_relobj::local_has_got_offset): Added got_type parameter.
105         (Sized_relobj::local_got_offset): Likewise.
106         (Sized_relobj::set_local_got_offset): Likewise.
107         (Sized_relobj::local_has_tls_got_offset): Removed.
108         (Sized_relobj::local_tls_got_offset): Removed.
109         (Sized_relobj::set_local_tls_got_offset): Removed.
110         (Sized_relobj::Local_got_offsets): Changed to store a list of offsets.
111         * output.cc (Output_data_got::add_global): Added got_type parameter.
112         (Output_data_got::add_global_with_rel): Likewise.
113         (Output_data_got::add_global_with_rela): Likewise.
114         (Output_data_got::add_global_pair_with_rel): New function.
115         (Output_data_got::add_global_pair_with_rela): New function.
116         (Output_data_got::add_local): Added got_type parameter.
117         (Output_data_got::add_local_with_rel): Likewise.
118         (Output_data_got::add_local_with_rela): Likewise.
119         (Output_data_got::add_local_pair_with_rel): New function.
120         (Output_data_got::add_local_pair_with_rela): New function.
121         (Output_data_got::add_global_tls): Removed.
122         (Output_data_got::add_global_tls_with_rel): Removed.
123         (Output_data_got::add_global_tls_with_rela): Removed.
124         (Output_data_got::add_local_tls): Removed.
125         (Output_data_got::add_local_tls_with_rel): Removed.
126         (Output_data_got::add_local_tls_with_rela): Removed.
127         * output.h (Output_data_got::add_global): Added got_type parameter.
128         (Output_data_got::add_global_with_rel): Likewise.
129         (Output_data_got::add_global_with_rela): Likewise.
130         (Output_data_got::add_global_pair_with_rel): New function.
131         (Output_data_got::add_global_pair_with_rela): New function.
132         (Output_data_got::add_local): Added got_type parameter.
133         (Output_data_got::add_local_with_rel): Likewise.
134         (Output_data_got::add_local_with_rela): Likewise.
135         (Output_data_got::add_local_pair_with_rel): New function.
136         (Output_data_got::add_local_pair_with_rela): New function.
137         (Output_data_got::add_global_tls): Removed.
138         (Output_data_got::add_global_tls_with_rel): Removed.
139         (Output_data_got::add_global_tls_with_rela): Removed.
140         (Output_data_got::add_local_tls): Removed.
141         (Output_data_got::add_local_tls_with_rel): Removed.
142         (Output_data_got::add_local_tls_with_rela): Removed.
143         * resolve.cc (Symbol::override_base_with_special): Removed
144         reference to has_got_offset_ field.
145         * symtab.cc (Symbol::init_fields): Replaced initialization
146         of got_offset_ with got_offsets_.  Removed initialization
147         of has_got_offset_
148         * symtab.h (Symbol::has_got_offset): Aded got_type parameter.
149         (Symbol::got_offset): Likewise.
150         (Symbol::set_got_offset): Likewise.
151         (Symbol::has_tls_got_offset): Removed.
152         (Symbol::tls_got_offset): Removed.
153         (Symbol::set_tls_got_offset): Removed.
154         (Symbol::got_offset_): Removed.
155         (Symbol::tls_mod_got_offset_): Removed.
156         (Symbol::tls_pair_got_offset_): Removed.
157         (Symbol::got_offsets_): New field.
158         (Symbol::has_got_offset): Removed.
159         (Symbol::has_tls_mod_got_offset): Removed.
160         (Symbol::has_tls_pair_got_offset): Removed.
161         * x86_64.cc (Target_x86_64::Got_type): New enum declaration.
162         (Target_x86_64::Scan::local): Updated callers of Output_data_got
163         member functions.
164         (Target_x86_64::Scan::global): Likewise.
165         (Target_x86_64::Relocate::relocate): Likewise.
166         (Target_x86_64::Relocate::relocate_tls): Likewise.
168 2008-03-25  Ben Elliston  <bje@au.ibm.com>
170         * yyscript.y: Fix spelling error in comment.
172 2008-03-24  Ian Lance Taylor  <iant@google.com>
174         * options.h (class General_options): Define build_id option.
175         * layout.h (class Layout): Declare write_build_id, create_note,
176         create_build_id.  Add build_id_note_ member.
177         * layout.cc: Include <cerrno>, <fcntl.h>, <unistd.h>,
178         "libiberty.h", "md5.h", "sha1.h".
179         (Layout::Layout): Initialize eh_frame_data_,
180         eh_frame_hdr_section_, and build_id_note_.
181         (Layout::finalize): Call create_build_id.
182         (Layout::create_note): New function, broken out of
183         Layout::create_gold_note.
184         (Layout::create_gold_note): Call create_note.
185         (Layout::create_build_id): New function.
186         (Layout::write_build_id): New function.
187         (Close_task_runner::run): Call write_build_id.
189         * x86_64.cc: Correct license to GPLv3.
191 2008-03-23  Ian Lance Taylor  <iant@google.com>
193         * options.cc: Include "demangle.h".
194         (parse_optional_string): New function.
195         (parse_long_option): Handle takes_optional_argument.
196         (parse_short_option): Update dash_z initializer.  Handle
197         takes_optional_argument.
198         (General_options::General_options): Initialize do_demangle_.
199         (General_options::finalize): Set do_demangle_.  Handle demangling
200         style.
201         * options.h (parse_optional_string): Declare.
202         (struct One_option): Add optional_arg field.  Update constructor.
203         Update call constructor calls.  Add takes_optional_argument
204         function.
205         (DEFINE_var): Add optional_arg__ parameter.  Change all callers.
206         (DEFINE_optional_string): Define.
207         (General_options::demangle): Change from DEFINE_bool to
208         DEFINE_optional_string.
209         (General_options::no_demangle): New function.
210         (General_options::do_demangle): New function.
211         (General_options::set_do_demangle): New function.
212         (General_options::execstack_status_): Move definition to end of
213         class definition.
214         (General_options::static_): Likewise.
215         (General_options::do_demangle_): New field.
216         * object.cc (big_endian>::get_symbol_location_info): Call
217         Options::do_demangle, not Options::demangle.
218         * symtab.cc (demangle): Likewise.
220 2008-03-22  Ian Lance Taylor  <iant@google.com>
222         * gold.h: Include <cstddef> and <sys/types.h>
223         * options.h: Include <cstring>.
225 2008-03-21  Ian Lance Taylor  <iant@google.com>
227         * Added source code to GNU binutils.
228