Commit | Line | Data |
---|---|---|
479f6503 ILT |
1 | 2008-03-29 Ian Lance Taylor <iant@google.com> |
2 | ||
686c8caf ILT |
3 | * symtab.cc (Symbol_table::do_define_as_constant): Don't force a |
4 | version symbol to be local. | |
5 | * testsuite/ver_test_4.sh: New file. | |
6 | * testsuite/Makefile.am (check_SCRIPTS): Add ver_test_4.sh. | |
7 | (check_DATA): Add ver_test_4.syms. | |
8 | (ver_test_4.syms): New target. | |
9 | * testsuite/Makefile.in: Rebuild. | |
10 | ||
ab794b6b ILT |
11 | * output.cc |
12 | (Output_section::Input_section_sort_entry::has_priority): New | |
13 | function. | |
14 | (Output_section::Input_section_sort_entry::match_file_name): New | |
15 | function. | |
16 | (Output_section::Input_section_sort_entry::match_section_name): | |
17 | Remove. | |
18 | (Output_section::Input_section_sort_entry::match_section_name_prefix): | |
19 | Remove. | |
20 | (Output_section::Input_section_sort_entry::match_section_file): | |
21 | Remove. | |
22 | (Output_section::Input_section_sort_compare::operator()): Rewrite | |
23 | using new Input_section_sort_entry functions. Sort crtbegin and | |
24 | crtend first. Sort sections with no priority before sections with | |
25 | a priority. | |
26 | * testsuite/initpri1.c (d3): Check j != 4. | |
27 | (cd5): New constructor/destructor function. | |
28 | (main): Check j != 2. | |
29 | ||
479f6503 ILT |
30 | * symtab.cc (Symbol_table::add_from_object): If we don't use the |
31 | new symbol when resolving, don't call set_is_default. | |
32 | * testsuite/ver_test_7.cc: New file. | |
33 | * testsuite/ver_test_7.sh: New file. | |
34 | * testsuite/Makefile.am (ver_test_7.so): New target. | |
35 | (ver_test_7.o): New target. | |
36 | (check_SCRIPTS): Add ver_test_7.sh. | |
37 | (check_DATA): Add ver_test_7.syms. | |
38 | (ver_test_7.syms): New target. | |
39 | ||
2fd32231 ILT |
40 | 2008-03-28 Ian Lance Taylor <iant@google.com> |
41 | ||
42 | * layout.cc (Layout::layout): If we see an input section with a | |
43 | name that needs sorting, set the must_sort flag for the output | |
44 | section. | |
45 | (Layout::make_output_section): If the name of the output section | |
46 | indicates that it might require sorting, set the may_sort flag. | |
47 | * output.h (Output_section::may_sort_attached_input_sections): New | |
48 | function. | |
49 | (Output_section::set_may_sort_attached_input_sections): New | |
50 | function. | |
51 | (Output_section::must_sort_attached_input_sections): New | |
52 | function. | |
53 | (Output_section::set_must_sort_attached_input_sections): New | |
54 | function. | |
55 | (class Output_section): Declare Input_section_sort_entry. Define | |
56 | Input_section_sort_compare. Declare | |
57 | sort_attached_input_sections. Add new fields: | |
58 | may_sort_attached_input_sections_, | |
59 | must_sort_attached_input_sections_, | |
60 | attached_input_sections_are_sorted_. | |
61 | * output.cc (Output_section::Output_section): Initialize new | |
62 | fields. | |
63 | (Output_section::add_input_section): Add an entry to | |
64 | input_sections_ if may_sort or must_sort are true. | |
65 | (Output_section::set_final_data_size): Call | |
66 | sort_attached_input_sections if necessary. | |
67 | (Output_section::Input_section_sort_entry): Define new class. | |
68 | (Output_section::Input_section_sort_compare::operator()): New | |
69 | function. | |
70 | (Output_section::sort_attached_input_sections): New function. | |
71 | * configure.ac: Check whether the compiler supports constructor | |
72 | priorities. Define a CONSTRUCTOR_PRIORITY automake conditional. | |
73 | * testsuite/initpri1.c: New file. | |
74 | * testsuite/Makefile.am (check_PROGRAMS): Add initpri1 if | |
75 | CONSTRUCTOR_PRIORITY. | |
76 | (initpri1_SOURCES, initpri1_DEPENDENCIES): New variables. | |
77 | (initpri1_LDFLAGS): New variable. | |
78 | * configure, Makefile.in, testsuite/Makefile.in: Rebuild. | |
79 | ||
18e6b24e ILT |
80 | 2008-03-27 Ian Lance Taylor <iant@google.com> |
81 | ||
49bdd526 ILT |
82 | * common.cc (Sort_commons::operator): Correct sorting algorithm. |
83 | * testsuite/common_test_1.c: New file. | |
84 | * testsuite/Makefile.am (check_PROGRAMS): Add common_test_1. | |
85 | (common_test_1_SOURCES): New variable. | |
86 | (common_test_1_DEPENDENCIES): New variable. | |
87 | (common_test_1_LDFLAGS): New variable. | |
88 | ||
18e6b24e ILT |
89 | * symtab.cc (Symbol_table::add_from_object): Handle saw_undefined_ |
90 | and commons_ correctly when NAME/VERSION does not override | |
91 | NAME/NULL. | |
92 | * testsuite/ver_test_6.c: New file. | |
93 | * testsuite/Makefile.am (check_PROGRAMS): Add ver_test_6 | |
94 | (ver_test_6_SOURCES, ver_test_6_DEPENDENCIES): New variables. | |
95 | (ver_test_6_LDFLAGS, ver_test_6_LDADD): New variables. | |
96 | ||
04bf7072 ILT |
97 | 2008-03-26 Ian Lance Taylor <iant@google.com> |
98 | ||
5871526f ILT |
99 | * symtab.cc (Symbol_table::add_from_relobj): Don't set the version |
100 | of an undefined symbol from a version script. | |
101 | * testsuite/Makefile.am (ver_test_5.so): New target. | |
102 | (ver_test_5.o): New target. | |
103 | (check_SCRIPTS): Add ver_test_5.sh. | |
104 | (check_DATA): Add ver_test_5.syms. | |
105 | (ver_test_5.syms): New target. | |
106 | * testsuite/ver_test_5.cc: New file. | |
107 | * testsuite/ver_test_5.script: New file. | |
108 | * testsuite/ver_test_5.sh: New file. | |
109 | * Makefile.in, testsuite/Makefile.in: Rebuild. | |
110 | ||
04bf7072 ILT |
111 | PR gold/5986 |
112 | Fix problems building gold with gcc 4.3.0. | |
113 | * gold.h (TEMPLATE_ATTRIBUTE_PRINTF_4): Define. | |
114 | (gold_error_at_location, gold_warning_at_location): Use it. | |
115 | * configure.ac: Check whether we can compile and use a template | |
116 | function with a printf attribute. | |
117 | * x86_64.cc (Target_x86_64::do_code_fill): Swap out a 32-bit value | |
118 | when jumping over bytes. | |
119 | * object.cc: Instantiate Object::read_section_data. | |
120 | * debug.h: Include <cstring> | |
121 | * dwarf_reader.cc: Include <algorithm> | |
122 | * main.cc: Include <cstring>. | |
123 | * options.cc: Include <cstring>. | |
124 | * output.cc: Include <cstring>. | |
125 | * script.cc: Include <cstring>. | |
126 | * script.h: Include <string>. | |
127 | * symtab.cc: Include <cstring> and <algorithm>. | |
128 | * target-select.cc: Include <cstring>. | |
129 | * version.cc: Include <string>. | |
130 | * testsuite/testmain.cc: Include <cstdlib>. | |
131 | * configure, config.in: Rebuild. | |
132 | ||
874c5b28 ILT |
133 | 2008-03-25 Ian Lance Taylor <iant@google.com> |
134 | ||
819d6c3a ILT |
135 | * options.cc: Include "../bfd/bfdver.h". |
136 | (options::help): Print bug reporting address. | |
137 | ||
f4b2c6f5 ILT |
138 | * version.cc (print_version): Adjust output for current value of |
139 | BFD_VERSION_STRING. | |
140 | ||
141 | * NEWS: New file. | |
142 | ||
e96caa79 ILT |
143 | * options.cc (options::help): Print list of supported targets. |
144 | * target-select.h: Include <vector>. | |
145 | (class Target_selector): Make machine_, size_, and is_big_endian_ | |
146 | fields const. Add bfd_name_ and instantiated_target_ fields. | |
147 | (Target_selector::Target_selector): Add bfd_name parameter. | |
148 | (Target_selector::recognize): Make non-virtual, call | |
149 | do_recognize. | |
150 | (Target_selector::recognize_by_name): Make non-virtual, call | |
151 | do_recognize_by_name. | |
152 | (Target_selector::supported_names): New function. | |
153 | (Target_selector::bfd_name): New function. | |
154 | (Target_selector::do_instantiate_target): New pure virtual | |
155 | function. | |
156 | (Target_selector::do_recognize): New virtual function. | |
157 | (Target_selector::do_recognize_by_name): New virtual function. | |
158 | (Target_selector::instantiate_target): New private function. | |
159 | (supported_target_names): Declare. | |
160 | * target-select.cc (Target_selector::Target_selector): Update for | |
161 | new parameter and fields. | |
162 | (select_target_by_name): Check that the name matches before | |
163 | calling recognize_by_name. | |
164 | (supported_target_names): New function. | |
165 | * i386.cc (class Target_selector_i386): Update Target_selector | |
166 | constructor call. Remove recognize and recognize_by_name. Add | |
167 | do_instantiate_target. | |
168 | * x86_64.cc (class Target_selector_x86_64): Likewise. | |
169 | * testsuite/testfile.cc (class Target_selector_test): Update for | |
170 | changes to Target_selector. | |
171 | ||
874c5b28 ILT |
172 | * README: Rewrite, with some notes on unsupported features. |
173 | ||
0a65a3a7 CC |
174 | 2008-03-24 Cary Coutant <ccoutant@google.com> |
175 | ||
176 | * i386.cc (Target_i386::Got_type): New enum declaration. | |
177 | (Target_i386::Scan::local): Updated callers of Output_data_got | |
178 | member functions. | |
179 | (Target_i386::Scan::global): Likewise. | |
180 | (Target_i386::Relocate::relocate): Likewise. | |
181 | (Target_i386::Relocate::relocate_tls): Likewise. | |
182 | * object.h (Got_offset_list): New class. | |
183 | (Sized_relobj::local_has_got_offset): Added got_type parameter. | |
184 | (Sized_relobj::local_got_offset): Likewise. | |
185 | (Sized_relobj::set_local_got_offset): Likewise. | |
186 | (Sized_relobj::local_has_tls_got_offset): Removed. | |
187 | (Sized_relobj::local_tls_got_offset): Removed. | |
188 | (Sized_relobj::set_local_tls_got_offset): Removed. | |
189 | (Sized_relobj::Local_got_offsets): Changed to store a list of offsets. | |
190 | * output.cc (Output_data_got::add_global): Added got_type parameter. | |
191 | (Output_data_got::add_global_with_rel): Likewise. | |
192 | (Output_data_got::add_global_with_rela): Likewise. | |
193 | (Output_data_got::add_global_pair_with_rel): New function. | |
194 | (Output_data_got::add_global_pair_with_rela): New function. | |
195 | (Output_data_got::add_local): Added got_type parameter. | |
196 | (Output_data_got::add_local_with_rel): Likewise. | |
197 | (Output_data_got::add_local_with_rela): Likewise. | |
198 | (Output_data_got::add_local_pair_with_rel): New function. | |
199 | (Output_data_got::add_local_pair_with_rela): New function. | |
200 | (Output_data_got::add_global_tls): Removed. | |
201 | (Output_data_got::add_global_tls_with_rel): Removed. | |
202 | (Output_data_got::add_global_tls_with_rela): Removed. | |
203 | (Output_data_got::add_local_tls): Removed. | |
204 | (Output_data_got::add_local_tls_with_rel): Removed. | |
205 | (Output_data_got::add_local_tls_with_rela): Removed. | |
206 | * output.h (Output_data_got::add_global): Added got_type parameter. | |
207 | (Output_data_got::add_global_with_rel): Likewise. | |
208 | (Output_data_got::add_global_with_rela): Likewise. | |
209 | (Output_data_got::add_global_pair_with_rel): New function. | |
210 | (Output_data_got::add_global_pair_with_rela): New function. | |
211 | (Output_data_got::add_local): Added got_type parameter. | |
212 | (Output_data_got::add_local_with_rel): Likewise. | |
213 | (Output_data_got::add_local_with_rela): Likewise. | |
214 | (Output_data_got::add_local_pair_with_rel): New function. | |
215 | (Output_data_got::add_local_pair_with_rela): New function. | |
216 | (Output_data_got::add_global_tls): Removed. | |
217 | (Output_data_got::add_global_tls_with_rel): Removed. | |
218 | (Output_data_got::add_global_tls_with_rela): Removed. | |
219 | (Output_data_got::add_local_tls): Removed. | |
220 | (Output_data_got::add_local_tls_with_rel): Removed. | |
221 | (Output_data_got::add_local_tls_with_rela): Removed. | |
222 | * resolve.cc (Symbol::override_base_with_special): Removed | |
223 | reference to has_got_offset_ field. | |
224 | * symtab.cc (Symbol::init_fields): Replaced initialization | |
225 | of got_offset_ with got_offsets_. Removed initialization | |
226 | of has_got_offset_ | |
53fcba31 | 227 | * symtab.h (Symbol::has_got_offset): Aded got_type parameter. |
0a65a3a7 CC |
228 | (Symbol::got_offset): Likewise. |
229 | (Symbol::set_got_offset): Likewise. | |
230 | (Symbol::has_tls_got_offset): Removed. | |
231 | (Symbol::tls_got_offset): Removed. | |
232 | (Symbol::set_tls_got_offset): Removed. | |
233 | (Symbol::got_offset_): Removed. | |
234 | (Symbol::tls_mod_got_offset_): Removed. | |
235 | (Symbol::tls_pair_got_offset_): Removed. | |
236 | (Symbol::got_offsets_): New field. | |
237 | (Symbol::has_got_offset): Removed. | |
238 | (Symbol::has_tls_mod_got_offset): Removed. | |
239 | (Symbol::has_tls_pair_got_offset): Removed. | |
240 | * x86_64.cc (Target_x86_64::Got_type): New enum declaration. | |
241 | (Target_x86_64::Scan::local): Updated callers of Output_data_got | |
242 | member functions. | |
243 | (Target_x86_64::Scan::global): Likewise. | |
244 | (Target_x86_64::Relocate::relocate): Likewise. | |
245 | (Target_x86_64::Relocate::relocate_tls): Likewise. | |
246 | ||
bd52eafb BE |
247 | 2008-03-25 Ben Elliston <bje@au.ibm.com> |
248 | ||
249 | * yyscript.y: Fix spelling error in comment. | |
250 | ||
8b105e34 ILT |
251 | 2008-03-24 Ian Lance Taylor <iant@google.com> |
252 | ||
8ed814a9 ILT |
253 | * options.h (class General_options): Define build_id option. |
254 | * layout.h (class Layout): Declare write_build_id, create_note, | |
255 | create_build_id. Add build_id_note_ member. | |
256 | * layout.cc: Include <cerrno>, <fcntl.h>, <unistd.h>, | |
257 | "libiberty.h", "md5.h", "sha1.h". | |
258 | (Layout::Layout): Initialize eh_frame_data_, | |
259 | eh_frame_hdr_section_, and build_id_note_. | |
260 | (Layout::finalize): Call create_build_id. | |
261 | (Layout::create_note): New function, broken out of | |
262 | Layout::create_gold_note. | |
263 | (Layout::create_gold_note): Call create_note. | |
264 | (Layout::create_build_id): New function. | |
265 | (Layout::write_build_id): New function. | |
266 | (Close_task_runner::run): Call write_build_id. | |
267 | ||
8b105e34 ILT |
268 | * x86_64.cc: Correct license to GPLv3. |
269 | ||
086a1841 ILT |
270 | 2008-03-23 Ian Lance Taylor <iant@google.com> |
271 | ||
272 | * options.cc: Include "demangle.h". | |
273 | (parse_optional_string): New function. | |
274 | (parse_long_option): Handle takes_optional_argument. | |
275 | (parse_short_option): Update dash_z initializer. Handle | |
276 | takes_optional_argument. | |
277 | (General_options::General_options): Initialize do_demangle_. | |
278 | (General_options::finalize): Set do_demangle_. Handle demangling | |
279 | style. | |
280 | * options.h (parse_optional_string): Declare. | |
281 | (struct One_option): Add optional_arg field. Update constructor. | |
282 | Update call constructor calls. Add takes_optional_argument | |
283 | function. | |
284 | (DEFINE_var): Add optional_arg__ parameter. Change all callers. | |
285 | (DEFINE_optional_string): Define. | |
286 | (General_options::demangle): Change from DEFINE_bool to | |
287 | DEFINE_optional_string. | |
288 | (General_options::no_demangle): New function. | |
289 | (General_options::do_demangle): New function. | |
290 | (General_options::set_do_demangle): New function. | |
291 | (General_options::execstack_status_): Move definition to end of | |
292 | class definition. | |
293 | (General_options::static_): Likewise. | |
294 | (General_options::do_demangle_): New field. | |
295 | * object.cc (big_endian>::get_symbol_location_info): Call | |
296 | Options::do_demangle, not Options::demangle. | |
297 | * symtab.cc (demangle): Likewise. | |
298 | ||
cbb93e63 ILT |
299 | 2008-03-22 Ian Lance Taylor <iant@google.com> |
300 | ||
301 | * gold.h: Include <cstddef> and <sys/types.h> | |
302 | * options.h: Include <cstring>. | |
303 | ||
ec531623 ILT |
304 | 2008-03-21 Ian Lance Taylor <iant@google.com> |
305 | ||
306 | * Added source code to GNU binutils. | |
307 |