Commit | Line | Data |
---|---|---|
6835af53 ILT |
1 | 2008-04-07 Ian Lance Taylor <iant@google.com> |
2 | ||
3 | * configure.ac: Don't test for objdump, c++filt, or readelf. | |
4 | * testsuite/Makefile.am: Remove READELF and OBJDUMP_AND_CPPFILT | |
5 | conditionals. | |
6 | (TEST_READELF): New variable. | |
7 | (TEST_OBJDUMP, TEST_CXXFILT, TEST_STRIP): New variables. | |
8 | (check_PROGRAMS): Add two_file_strip_test. | |
9 | (two_file_strip_test): New target. | |
10 | (check_PROGRAMS): Add two_file_same_shared_strip_test. | |
11 | (two_file_same_shared_strip_test_SOURCES): New variable. | |
12 | (two_file_same_shared_strip_test_DEPENDENCIES): New variable. | |
13 | (two_file_same_shared_strip_test_LDFLAGS): New variable. | |
14 | (two_file_same_shared_strip_test_LDADD): New variable. | |
15 | (two_file_shared_strip.so): New target. | |
16 | (ver_test_2.syms, ver_test_4.syms): Use TEST_READELF. | |
17 | (ver_test_5.syms, ver_test_7.syms): Likewise. | |
18 | (ver_matching_test.stdout): Use TEST_OBJDUMP and TEST_CXXFILT. | |
19 | (strip_test_3.stdout): Use TEST_OBJDUMP. | |
20 | * configure, Makefile.in, testsuite/Makefile.in: Rebuild. | |
21 | ||
86925eef CC |
22 | 2008-04-04 Cary Coutant <ccoutant@google.com> |
23 | ||
24 | * symtab.h (Symbol::is_weak_undefined): New function. | |
25 | (Symbol::is_strong_undefined): New function. | |
26 | (Symbol::is_absolute): New function. | |
27 | (Symbol::needs_plt_entry): Exclude weak undefined symbols. | |
28 | (Symbol::needs_dynamic_reloc): Exclude weak undefined and | |
29 | absolute symbols. | |
30 | * testsuite/Makefile.am (check_PROGRAMS): Add weak_undef_test. | |
31 | (weak_undef_test): New target. | |
32 | * testsuite/Makefile.in: Rebuild. | |
33 | * testsuite/weak_undef_file1.cc: New file. | |
34 | * testsuite/weak_undef_file2.cc: New file. | |
35 | * testsuite/weak_undef_test.cc: New file. | |
36 | ||
126f3ece ILT |
37 | 2008-04-03 Craig Silverstein <csilvers@google.com> |
38 | ||
39 | * compressed_output.h (class Output_compressed_section): Use | |
40 | unsigned buffer. | |
41 | * compressed_output.cc (zlib_compress): Use unsigned buffers, | |
42 | add zlib header. | |
43 | (zlib_compressed_suffix): Removed. | |
44 | (Output_compressed_section::set_final_data_size): Use unsigned | |
45 | buffers. | |
46 | * testsuite/Makefile.am (flagstest_compress_debug_sections): | |
47 | Fix linker invocation. | |
48 | (flagstest_o_specialfile_and_compress_debug_sections): | |
49 | Likewise. | |
50 | * testsuite/Makefile.in: Regenerated. | |
51 | ||
deae2a14 DM |
52 | 2008-04-02 David S. Miller <davem@davemloft.net> |
53 | ||
54 | * dwarf_reader.cc (Sized_dwarf_line_info::read_header_prolog, | |
55 | Sized_dwarf_line_info::process_one_opcode): Use Swap_unaligned. | |
56 | ||
70752818 ILT |
57 | 2008-04-02 Craig Silverstein <csilvers@google.com> |
58 | ||
59 | * TODO: New file. | |
60 | ||
39d0cb0e ILT |
61 | 2008-04-02 Ian Lance Taylor <iant@google.com> |
62 | ||
63 | * fileread.cc (File_read::find_view): Add byteshift and vshifted | |
64 | parameters. Update for new key type to views_. Change all | |
65 | callers. | |
66 | (File_read::read): Adjust for byteshift in returned view. | |
67 | (File_read::add_view): New function, broken out of | |
68 | find_and_make_view. | |
69 | (File_read::make_view): New function, broken out of | |
70 | find_and_make_view. | |
71 | (File_read::find_or_make_view): Add offset and aligned | |
72 | parameters. Rewrite accordingly. Change all callers. | |
73 | (File_read::get_view): Add offset and aligned parameters. Adjust | |
74 | for byteshift in return value. | |
75 | (File_read::get_lasting_view): Likewise. | |
76 | * fileread.h (class File_read): Update declarations. | |
77 | (class File_read::View): Add byteshift_ field. Add byteshift to | |
78 | constructor. Add byteshift method. | |
79 | * archive.h (Archive::clear_uncached_views): New function. | |
80 | (Archive::get_view): Add aligned parameter. Change all callers. | |
81 | * object.h (Object::get_view): Add aligned parameter. Change all | |
82 | callers. | |
83 | (Object::get_lasting_view): Likewise. | |
84 | ||
85 | * fileread.cc (File_read::release): Don't call clear_views if | |
86 | there are multiple objects. | |
87 | * fileread.h (File_read::clear_uncached_views): New function. | |
88 | * archive.cc (Add_archive_symbols::run): Call clear_uncached_views | |
89 | on the archive. | |
90 | ||
a1207466 CC |
91 | 2008-03-31 Cary Coutant <ccoutant@google.com> |
92 | ||
93 | Add thin archive support. | |
94 | * archive.cc (Archive::armagt): New const. | |
95 | (Archive::setup): Remove task parameter and calls to unlock. | |
96 | (Archive::unlock_nested_archives): New function. | |
97 | (Archive::read_header): Add nested_off parameter. Change | |
98 | all callers. | |
99 | (Archive::interpret_header): Likewise. | |
100 | (Archive::include_all_members): Change to handle thin | |
101 | archives. | |
102 | (Archive::include_member): Likewise. | |
103 | * archive.h (Archive::Archive): Add new parameters and | |
104 | initializers. | |
105 | (Archive::armagt): New const. | |
106 | (Archive::setup): Remove task parameter. | |
107 | (Archive::unlock_nested_archives): New function. | |
108 | (Archive::read_header): Add nested_off parameter. | |
109 | (Archive::interpret_header): Likewise. | |
110 | (Archive::Nested_archive_table): New typedef. | |
111 | (Archive::is_thin_archive_): New field. | |
112 | (Archive::nested_archives_): New field. | |
113 | (Archive::options_): New field. | |
114 | (Archive::dirpath_): New field. | |
115 | (Archive::task_): New field. | |
116 | * readsyms.cc (Read_symbols::do_read_symbols): Add check | |
117 | for thin archives. Pass additional parameters to | |
118 | Archive::Archive. Unlock the archive file after calling | |
119 | Archive::setup. | |
120 | ||
479f6503 ILT |
121 | 2008-03-29 Ian Lance Taylor <iant@google.com> |
122 | ||
686c8caf ILT |
123 | * symtab.cc (Symbol_table::do_define_as_constant): Don't force a |
124 | version symbol to be local. | |
125 | * testsuite/ver_test_4.sh: New file. | |
126 | * testsuite/Makefile.am (check_SCRIPTS): Add ver_test_4.sh. | |
127 | (check_DATA): Add ver_test_4.syms. | |
128 | (ver_test_4.syms): New target. | |
129 | * testsuite/Makefile.in: Rebuild. | |
130 | ||
ab794b6b ILT |
131 | * output.cc |
132 | (Output_section::Input_section_sort_entry::has_priority): New | |
133 | function. | |
134 | (Output_section::Input_section_sort_entry::match_file_name): New | |
135 | function. | |
136 | (Output_section::Input_section_sort_entry::match_section_name): | |
137 | Remove. | |
138 | (Output_section::Input_section_sort_entry::match_section_name_prefix): | |
139 | Remove. | |
140 | (Output_section::Input_section_sort_entry::match_section_file): | |
141 | Remove. | |
142 | (Output_section::Input_section_sort_compare::operator()): Rewrite | |
143 | using new Input_section_sort_entry functions. Sort crtbegin and | |
144 | crtend first. Sort sections with no priority before sections with | |
145 | a priority. | |
146 | * testsuite/initpri1.c (d3): Check j != 4. | |
147 | (cd5): New constructor/destructor function. | |
148 | (main): Check j != 2. | |
149 | ||
479f6503 ILT |
150 | * symtab.cc (Symbol_table::add_from_object): If we don't use the |
151 | new symbol when resolving, don't call set_is_default. | |
152 | * testsuite/ver_test_7.cc: New file. | |
153 | * testsuite/ver_test_7.sh: New file. | |
154 | * testsuite/Makefile.am (ver_test_7.so): New target. | |
155 | (ver_test_7.o): New target. | |
156 | (check_SCRIPTS): Add ver_test_7.sh. | |
157 | (check_DATA): Add ver_test_7.syms. | |
158 | (ver_test_7.syms): New target. | |
159 | ||
2fd32231 ILT |
160 | 2008-03-28 Ian Lance Taylor <iant@google.com> |
161 | ||
162 | * layout.cc (Layout::layout): If we see an input section with a | |
163 | name that needs sorting, set the must_sort flag for the output | |
164 | section. | |
165 | (Layout::make_output_section): If the name of the output section | |
166 | indicates that it might require sorting, set the may_sort flag. | |
167 | * output.h (Output_section::may_sort_attached_input_sections): New | |
168 | function. | |
169 | (Output_section::set_may_sort_attached_input_sections): New | |
170 | function. | |
171 | (Output_section::must_sort_attached_input_sections): New | |
172 | function. | |
173 | (Output_section::set_must_sort_attached_input_sections): New | |
174 | function. | |
175 | (class Output_section): Declare Input_section_sort_entry. Define | |
176 | Input_section_sort_compare. Declare | |
177 | sort_attached_input_sections. Add new fields: | |
178 | may_sort_attached_input_sections_, | |
179 | must_sort_attached_input_sections_, | |
180 | attached_input_sections_are_sorted_. | |
181 | * output.cc (Output_section::Output_section): Initialize new | |
182 | fields. | |
183 | (Output_section::add_input_section): Add an entry to | |
184 | input_sections_ if may_sort or must_sort are true. | |
185 | (Output_section::set_final_data_size): Call | |
186 | sort_attached_input_sections if necessary. | |
187 | (Output_section::Input_section_sort_entry): Define new class. | |
188 | (Output_section::Input_section_sort_compare::operator()): New | |
189 | function. | |
190 | (Output_section::sort_attached_input_sections): New function. | |
191 | * configure.ac: Check whether the compiler supports constructor | |
192 | priorities. Define a CONSTRUCTOR_PRIORITY automake conditional. | |
193 | * testsuite/initpri1.c: New file. | |
194 | * testsuite/Makefile.am (check_PROGRAMS): Add initpri1 if | |
195 | CONSTRUCTOR_PRIORITY. | |
196 | (initpri1_SOURCES, initpri1_DEPENDENCIES): New variables. | |
197 | (initpri1_LDFLAGS): New variable. | |
198 | * configure, Makefile.in, testsuite/Makefile.in: Rebuild. | |
199 | ||
18e6b24e ILT |
200 | 2008-03-27 Ian Lance Taylor <iant@google.com> |
201 | ||
49bdd526 ILT |
202 | * common.cc (Sort_commons::operator): Correct sorting algorithm. |
203 | * testsuite/common_test_1.c: New file. | |
204 | * testsuite/Makefile.am (check_PROGRAMS): Add common_test_1. | |
205 | (common_test_1_SOURCES): New variable. | |
206 | (common_test_1_DEPENDENCIES): New variable. | |
207 | (common_test_1_LDFLAGS): New variable. | |
208 | ||
18e6b24e ILT |
209 | * symtab.cc (Symbol_table::add_from_object): Handle saw_undefined_ |
210 | and commons_ correctly when NAME/VERSION does not override | |
211 | NAME/NULL. | |
212 | * testsuite/ver_test_6.c: New file. | |
213 | * testsuite/Makefile.am (check_PROGRAMS): Add ver_test_6 | |
214 | (ver_test_6_SOURCES, ver_test_6_DEPENDENCIES): New variables. | |
215 | (ver_test_6_LDFLAGS, ver_test_6_LDADD): New variables. | |
216 | ||
04bf7072 ILT |
217 | 2008-03-26 Ian Lance Taylor <iant@google.com> |
218 | ||
5871526f ILT |
219 | * symtab.cc (Symbol_table::add_from_relobj): Don't set the version |
220 | of an undefined symbol from a version script. | |
221 | * testsuite/Makefile.am (ver_test_5.so): New target. | |
222 | (ver_test_5.o): New target. | |
223 | (check_SCRIPTS): Add ver_test_5.sh. | |
224 | (check_DATA): Add ver_test_5.syms. | |
225 | (ver_test_5.syms): New target. | |
226 | * testsuite/ver_test_5.cc: New file. | |
227 | * testsuite/ver_test_5.script: New file. | |
228 | * testsuite/ver_test_5.sh: New file. | |
229 | * Makefile.in, testsuite/Makefile.in: Rebuild. | |
230 | ||
04bf7072 ILT |
231 | PR gold/5986 |
232 | Fix problems building gold with gcc 4.3.0. | |
233 | * gold.h (TEMPLATE_ATTRIBUTE_PRINTF_4): Define. | |
234 | (gold_error_at_location, gold_warning_at_location): Use it. | |
235 | * configure.ac: Check whether we can compile and use a template | |
236 | function with a printf attribute. | |
237 | * x86_64.cc (Target_x86_64::do_code_fill): Swap out a 32-bit value | |
238 | when jumping over bytes. | |
239 | * object.cc: Instantiate Object::read_section_data. | |
240 | * debug.h: Include <cstring> | |
241 | * dwarf_reader.cc: Include <algorithm> | |
242 | * main.cc: Include <cstring>. | |
243 | * options.cc: Include <cstring>. | |
244 | * output.cc: Include <cstring>. | |
245 | * script.cc: Include <cstring>. | |
246 | * script.h: Include <string>. | |
247 | * symtab.cc: Include <cstring> and <algorithm>. | |
248 | * target-select.cc: Include <cstring>. | |
249 | * version.cc: Include <string>. | |
250 | * testsuite/testmain.cc: Include <cstdlib>. | |
251 | * configure, config.in: Rebuild. | |
252 | ||
874c5b28 ILT |
253 | 2008-03-25 Ian Lance Taylor <iant@google.com> |
254 | ||
819d6c3a ILT |
255 | * options.cc: Include "../bfd/bfdver.h". |
256 | (options::help): Print bug reporting address. | |
257 | ||
f4b2c6f5 ILT |
258 | * version.cc (print_version): Adjust output for current value of |
259 | BFD_VERSION_STRING. | |
260 | ||
261 | * NEWS: New file. | |
262 | ||
e96caa79 ILT |
263 | * options.cc (options::help): Print list of supported targets. |
264 | * target-select.h: Include <vector>. | |
265 | (class Target_selector): Make machine_, size_, and is_big_endian_ | |
266 | fields const. Add bfd_name_ and instantiated_target_ fields. | |
267 | (Target_selector::Target_selector): Add bfd_name parameter. | |
268 | (Target_selector::recognize): Make non-virtual, call | |
269 | do_recognize. | |
270 | (Target_selector::recognize_by_name): Make non-virtual, call | |
271 | do_recognize_by_name. | |
272 | (Target_selector::supported_names): New function. | |
273 | (Target_selector::bfd_name): New function. | |
274 | (Target_selector::do_instantiate_target): New pure virtual | |
275 | function. | |
276 | (Target_selector::do_recognize): New virtual function. | |
277 | (Target_selector::do_recognize_by_name): New virtual function. | |
278 | (Target_selector::instantiate_target): New private function. | |
279 | (supported_target_names): Declare. | |
280 | * target-select.cc (Target_selector::Target_selector): Update for | |
281 | new parameter and fields. | |
282 | (select_target_by_name): Check that the name matches before | |
283 | calling recognize_by_name. | |
284 | (supported_target_names): New function. | |
285 | * i386.cc (class Target_selector_i386): Update Target_selector | |
286 | constructor call. Remove recognize and recognize_by_name. Add | |
287 | do_instantiate_target. | |
288 | * x86_64.cc (class Target_selector_x86_64): Likewise. | |
289 | * testsuite/testfile.cc (class Target_selector_test): Update for | |
290 | changes to Target_selector. | |
291 | ||
874c5b28 ILT |
292 | * README: Rewrite, with some notes on unsupported features. |
293 | ||
0a65a3a7 CC |
294 | 2008-03-24 Cary Coutant <ccoutant@google.com> |
295 | ||
296 | * i386.cc (Target_i386::Got_type): New enum declaration. | |
297 | (Target_i386::Scan::local): Updated callers of Output_data_got | |
298 | member functions. | |
299 | (Target_i386::Scan::global): Likewise. | |
300 | (Target_i386::Relocate::relocate): Likewise. | |
301 | (Target_i386::Relocate::relocate_tls): Likewise. | |
302 | * object.h (Got_offset_list): New class. | |
303 | (Sized_relobj::local_has_got_offset): Added got_type parameter. | |
304 | (Sized_relobj::local_got_offset): Likewise. | |
305 | (Sized_relobj::set_local_got_offset): Likewise. | |
306 | (Sized_relobj::local_has_tls_got_offset): Removed. | |
307 | (Sized_relobj::local_tls_got_offset): Removed. | |
308 | (Sized_relobj::set_local_tls_got_offset): Removed. | |
309 | (Sized_relobj::Local_got_offsets): Changed to store a list of offsets. | |
310 | * output.cc (Output_data_got::add_global): Added got_type parameter. | |
311 | (Output_data_got::add_global_with_rel): Likewise. | |
312 | (Output_data_got::add_global_with_rela): Likewise. | |
313 | (Output_data_got::add_global_pair_with_rel): New function. | |
314 | (Output_data_got::add_global_pair_with_rela): New function. | |
315 | (Output_data_got::add_local): Added got_type parameter. | |
316 | (Output_data_got::add_local_with_rel): Likewise. | |
317 | (Output_data_got::add_local_with_rela): Likewise. | |
318 | (Output_data_got::add_local_pair_with_rel): New function. | |
319 | (Output_data_got::add_local_pair_with_rela): New function. | |
320 | (Output_data_got::add_global_tls): Removed. | |
321 | (Output_data_got::add_global_tls_with_rel): Removed. | |
322 | (Output_data_got::add_global_tls_with_rela): Removed. | |
323 | (Output_data_got::add_local_tls): Removed. | |
324 | (Output_data_got::add_local_tls_with_rel): Removed. | |
325 | (Output_data_got::add_local_tls_with_rela): Removed. | |
326 | * output.h (Output_data_got::add_global): Added got_type parameter. | |
327 | (Output_data_got::add_global_with_rel): Likewise. | |
328 | (Output_data_got::add_global_with_rela): Likewise. | |
329 | (Output_data_got::add_global_pair_with_rel): New function. | |
330 | (Output_data_got::add_global_pair_with_rela): New function. | |
331 | (Output_data_got::add_local): Added got_type parameter. | |
332 | (Output_data_got::add_local_with_rel): Likewise. | |
333 | (Output_data_got::add_local_with_rela): Likewise. | |
334 | (Output_data_got::add_local_pair_with_rel): New function. | |
335 | (Output_data_got::add_local_pair_with_rela): New function. | |
336 | (Output_data_got::add_global_tls): Removed. | |
337 | (Output_data_got::add_global_tls_with_rel): Removed. | |
338 | (Output_data_got::add_global_tls_with_rela): Removed. | |
339 | (Output_data_got::add_local_tls): Removed. | |
340 | (Output_data_got::add_local_tls_with_rel): Removed. | |
341 | (Output_data_got::add_local_tls_with_rela): Removed. | |
342 | * resolve.cc (Symbol::override_base_with_special): Removed | |
343 | reference to has_got_offset_ field. | |
344 | * symtab.cc (Symbol::init_fields): Replaced initialization | |
345 | of got_offset_ with got_offsets_. Removed initialization | |
346 | of has_got_offset_ | |
53fcba31 | 347 | * symtab.h (Symbol::has_got_offset): Aded got_type parameter. |
0a65a3a7 CC |
348 | (Symbol::got_offset): Likewise. |
349 | (Symbol::set_got_offset): Likewise. | |
350 | (Symbol::has_tls_got_offset): Removed. | |
351 | (Symbol::tls_got_offset): Removed. | |
352 | (Symbol::set_tls_got_offset): Removed. | |
353 | (Symbol::got_offset_): Removed. | |
354 | (Symbol::tls_mod_got_offset_): Removed. | |
355 | (Symbol::tls_pair_got_offset_): Removed. | |
356 | (Symbol::got_offsets_): New field. | |
357 | (Symbol::has_got_offset): Removed. | |
358 | (Symbol::has_tls_mod_got_offset): Removed. | |
359 | (Symbol::has_tls_pair_got_offset): Removed. | |
360 | * x86_64.cc (Target_x86_64::Got_type): New enum declaration. | |
361 | (Target_x86_64::Scan::local): Updated callers of Output_data_got | |
362 | member functions. | |
363 | (Target_x86_64::Scan::global): Likewise. | |
364 | (Target_x86_64::Relocate::relocate): Likewise. | |
365 | (Target_x86_64::Relocate::relocate_tls): Likewise. | |
366 | ||
bd52eafb BE |
367 | 2008-03-25 Ben Elliston <bje@au.ibm.com> |
368 | ||
369 | * yyscript.y: Fix spelling error in comment. | |
370 | ||
8b105e34 ILT |
371 | 2008-03-24 Ian Lance Taylor <iant@google.com> |
372 | ||
8ed814a9 ILT |
373 | * options.h (class General_options): Define build_id option. |
374 | * layout.h (class Layout): Declare write_build_id, create_note, | |
375 | create_build_id. Add build_id_note_ member. | |
376 | * layout.cc: Include <cerrno>, <fcntl.h>, <unistd.h>, | |
377 | "libiberty.h", "md5.h", "sha1.h". | |
378 | (Layout::Layout): Initialize eh_frame_data_, | |
379 | eh_frame_hdr_section_, and build_id_note_. | |
380 | (Layout::finalize): Call create_build_id. | |
381 | (Layout::create_note): New function, broken out of | |
382 | Layout::create_gold_note. | |
383 | (Layout::create_gold_note): Call create_note. | |
384 | (Layout::create_build_id): New function. | |
385 | (Layout::write_build_id): New function. | |
386 | (Close_task_runner::run): Call write_build_id. | |
387 | ||
8b105e34 ILT |
388 | * x86_64.cc: Correct license to GPLv3. |
389 | ||
086a1841 ILT |
390 | 2008-03-23 Ian Lance Taylor <iant@google.com> |
391 | ||
392 | * options.cc: Include "demangle.h". | |
393 | (parse_optional_string): New function. | |
394 | (parse_long_option): Handle takes_optional_argument. | |
395 | (parse_short_option): Update dash_z initializer. Handle | |
396 | takes_optional_argument. | |
397 | (General_options::General_options): Initialize do_demangle_. | |
398 | (General_options::finalize): Set do_demangle_. Handle demangling | |
399 | style. | |
400 | * options.h (parse_optional_string): Declare. | |
401 | (struct One_option): Add optional_arg field. Update constructor. | |
402 | Update call constructor calls. Add takes_optional_argument | |
403 | function. | |
404 | (DEFINE_var): Add optional_arg__ parameter. Change all callers. | |
405 | (DEFINE_optional_string): Define. | |
406 | (General_options::demangle): Change from DEFINE_bool to | |
407 | DEFINE_optional_string. | |
408 | (General_options::no_demangle): New function. | |
409 | (General_options::do_demangle): New function. | |
410 | (General_options::set_do_demangle): New function. | |
411 | (General_options::execstack_status_): Move definition to end of | |
412 | class definition. | |
413 | (General_options::static_): Likewise. | |
414 | (General_options::do_demangle_): New field. | |
415 | * object.cc (big_endian>::get_symbol_location_info): Call | |
416 | Options::do_demangle, not Options::demangle. | |
417 | * symtab.cc (demangle): Likewise. | |
418 | ||
cbb93e63 ILT |
419 | 2008-03-22 Ian Lance Taylor <iant@google.com> |
420 | ||
421 | * gold.h: Include <cstddef> and <sys/types.h> | |
422 | * options.h: Include <cstring>. | |
423 | ||
ec531623 ILT |
424 | 2008-03-21 Ian Lance Taylor <iant@google.com> |
425 | ||
426 | * Added source code to GNU binutils. | |
427 |