1 2008-04-15 Ian Lance Taylor <iant@google.com>
3 * script-sections.cc (Script_sections::create_segments): Use
4 header_size_adjustment even when there is enough room for the
6 * testsuite/script_test_4.sh: New file.
7 * testsuite/script_test_4.t: New file.
8 * testsuite/Makefile.am (check_SCRIPTS): Add script_test_4.sh.
9 (check_DATA): Add script_test_4.stdout.
10 (MOSTLYCLEANFILES): Likewise.
11 (script_test_4): New target.
12 (script_test_4.stdout): New target.
13 * testsuite/Makefile.in: Rebuild.
15 * sparc.cc: Add definitions for Output_data_plt_sparc class
18 2008-04-14 David S. Miller <davem@davemloft.net>
21 * Makefile.am (TARGETSOURCES): Add sparc.cc
22 (ALL_TARGETOBJS): Add sparc.$(OBJEXT)
23 * configure.tgt: Document targ_extra_size and
24 targ_extra_big_endian. Add entries for sparc-* and
26 * configure.ac: Handle targ_extra_size and
27 targ_extra_big_endian.
28 * Makefile.in: Rebuild.
29 * configure: Likewise.
30 * po/POTFILES.in: Likewise.
31 * po/gold.pot: Likewise.
33 2008-04-14 Ian Lance Taylor <iant@google.com>
35 * layout.cc (Layout::Layout): Initialize sections_are_attached_.
36 (Layout::get_output_section): Ignore SHF_WRITE and SHF_EXECINSTR
37 in the name/type/flags to section mapping. Don't call
38 allocate_output_section.
39 (Layout::choose_output_section): Change parameter from adjust_name
40 to is_input_section. Don't permit input sections after sections
41 are attached to segments. Don't call allocate_output_section.
42 (Layout::layout_eh_frame): Call update_flags_for_input_section,
43 not write_enable_output_section.
44 (Layout::make_output_section): Don't push to
45 unattached_section_list_ nor call attach_to_segment. Call
46 attach_section_to_segment if sections are attached.
47 (Layout::attach_sections_to_segments): New function.
48 (Layout::attach_section_to_segment): New function.
49 (Layout::attach_allocated_section_to_segment): Rename from
50 attach_to_segment. Remove flags parameter.
51 (Layout::allocate_output_section): Remove function.
52 (Layout::write_enable_output_section): Remove function.
53 * layout.h (class Layout): Update for above changes. Add new
54 field sections_are_attached_.
55 * output.h (Output_section::update_flags_for_input_section): New
57 * output.cc (Output_section::add_input_section): Call
58 update_flags_for_input_section.
59 * gold.cc (queue_middle_tasks): Call attach_sections_to_segments.
61 2008-04-11 Cary Coutant <ccoutant@google.com>
63 * i386.cc (Target_i386::got_mod_index_entry): Restore code previously
65 * x86_64.cc (Target_x86_64::got_mod_index_entry): Likewise.
67 2008-04-11 Ian Lance Taylor <iant@google.com>
69 * output.h (class Output_section_data): Remove inline definition
71 * output.cc (Output_section_data::set_addralign): New function.
73 2008-04-11 Cary Coutant <ccoutant@google.com>
75 Add support for TLS descriptors for i386 and x86_64.
76 * i386.cc (Target_i386::Relocate::tls_desc_gd_to_ie): New function.
77 (Target_i386::Relocate::tls_desc_gd_to_le): New function.
78 (Target_i386::Got_type): Add GOT_TYPE_TLS_NOFFSET and
80 (Target_i386::got_mod_index_entry): Remove unnecessary code.
81 (Target_i386::Scan::local): Implement R_386_TLS_GOTDESC and
82 R_386_TLS_DESC_CALL relocations. Fix problem with initial-exec
84 (Target_i386::Scan::global): Fix problem with GD-to-IE relaxation.
85 Implement R_386_TLS_GOTDESC and R_386_TLS_DESC_CALL relocations;
86 Fix problem with initial-exec relocations.
87 (Target_i386::Relocate::relocate_tls): Likewise.
88 (Target_i386::Relocate::tls_gd_to_ie): Fix problem with GD-to-IE
90 * output.cc (Output_data_dynamic::Dynamic_entry::write): Add
91 support for section-plus-offset dynamic table entries.
92 * output.h (Output_data_dynamic::add_section_plus_offset): New function.
93 (Output_data_dynamic::Dynamic_entry): Add support for
94 section-plus-offset dynamic table entries.
95 (Output_data_dynamic::Classification): Likewise.
96 (Output_data_dynamic::classification_): Renamed offset_.
97 * x86_64.cc (Target_x86_64::Relocate::tls_desc_gd_to_ie): New function.
98 (Target_x86_64::Relocate::tls_desc_gd_to_le): New function.
99 (Target_x86_64::make_plt_section): New function.
100 (Target_x86_64::reserve_tlsdesc_entries): New function.
101 (Output_data_plt_x86_64::Output_data_plt_x86_64): Add new parameter.
102 (Output_data_plt_x86_64::reserve_tlsdesc_entry): New function.
103 (Output_data_plt_x86_64::has_tlsdesc_entry): New function.
104 (Output_data_plt_x86_64::get_tlsdesc_got_offset): New function.
105 (Output_data_plt_x86_64::get_tlsdesc_plt_offset): New function.
106 (Output_data_plt_x86_64::tlsdesc_plt_entry): New field.
107 (Output_data_plt_x86_64::set_final_data_size): Move out of line;
108 add extra PLT entry for TLS descriptors.
109 (Output_data_plt_x86_64::got_): New field.
110 (Output_data_plt_x86_64::tlsdesc_got_offset_): New field.
111 (Output_data_plt_x86_64::Output_data_plt_x86_64): Initialize new
113 (Output_data_plt_x86_64::do_write): Write extra PLT entry for TLS
115 (Target_x86_64::make_plt_entry): Factor out make_plt_section.
116 (Target_x86_64::got_mod_index_entry): Remove unnecessary code.
117 (Target_x86_64::Scan::local): Implement R_386_TLS_GOTDESC and
118 R_386_TLS_DESC_CALL relocations.
119 (Target_x86_64::Scan::global): Likewise.
120 (Target_x86_64::do_finalize_sections): Add dynamic table entries
122 (Relocate::relocate_tls): Fix problem with GD-to-IE relaxation.
123 Implement R_386_TLS_GOTDESC and R_386_TLS_DESC_CALL relocations.
124 (Target_x86_64::Relocate::tls_gd_to_ie): Fix problem with
126 * configure.ac: Export new conditional variables TLS_GNU2_DIALECT
128 * Makefile.in: Rebuild.
129 * configure: Rebuild.
130 * testsuite/Makefile.am (tls_shared_gd_to_ie_test): New target.
131 (tls_test_shared2.so): New target.
132 (tls_shared_gd_to_ie_test_SOURCES): New variable.
133 (tls_shared_gd_to_ie_test_DEPENDENCIES): New variable.
134 (tls_shared_gd_to_ie_test_LDFLAGS): New variable.
135 (tls_shared_gd_to_ie_test_LDADD): New variable.
136 (tls_shared_gnu2_gd_to_ie_test): New target.
137 (tls_test_gnu2.o, tls_test_file2_gnu2.o, tls_test_gnu2_shared2.so):
139 (tls_shared_gnu2_gd_to_ie_test_SOURCES): New variable.
140 (ls_shared_gnu2_gd_to_ie_test_DEPENDENCIES): New variable.
141 (tls_shared_gnu2_gd_to_ie_test_LDFLAGS): New variable.
142 (tls_shared_gnu2_gd_to_ie_test_LDADD): New variable.
143 (tls_shared_gnu2_test): New target.
144 (tls_test_gnu2_shared.so): New target.
145 (tls_shared_gnu2_test_SOURCES): New variable.
146 (tls_shared_gnu2_test_DEPENDENCIES): New variable.
147 (tls_shared_gnu2_test_LDFLAGS): New variable.
148 (tls_shared_gnu2_test_LDADD): New variable.
149 * testsuite/Makefile.in: Rebuild.
150 * testsuite/Makefile.
152 2008-04-11 Ian Lance Taylor <iant@google.com>
154 * testsuite/Makefile.am (justsyms_2r.o): Add dependency on
156 * testsuite/Makefile.in: Rebuild.
158 * testsuite/script_test_2a.cc (script_test_string_a): Make 8 bytes
160 * testsuite/script_test_2.cc (main): Adjust test.
162 2008-04-11 David S. Miller <davem@davemloft.net>
163 Ian Lance Taylor <iant@google.com>
165 * options.h (General_options): Add entries for '-Y' and
167 * options.cc (General_options:finalize): If -Y was used, add those
168 entries to the library path instead of the default "/lib" and
171 2008-04-11 David S. Miller <davem@davemloft.net>
173 * testsuite/justsyms.t: Start at 0x100.
174 * testsuite/justsyms_1.cc: Adjust justsyms_string assertion.
175 * testsuite/script_test_2b.cc (script_test_string_b): Make 8 bytes
177 * testsuite/script_test_2.cc: Adjust string and section length
180 2008-04-09 Ian Lance Taylor <iant@google.com>
183 * script-sections.cc (Sections_element::allocate_to_segment): Add
185 (Output_section_definition::allocate_to_segment): Likewise.
186 (Orphan_output_section::allocate_to_segment): Likewise.
187 (Script_sections::attach_sections_using_phdrs_clause): Don't
188 propagate non-PT_LOAD segments to orphan sections.
189 * testsuite/Makefile.am (script_test_3.stdout): Generate using
190 readelf rather than objdump.
191 * testsuite/script_test_3.sh: Adjust accordingly. Test that
192 .interp section and PT_INTERP segment are the same size.
193 * testsuite/Makefile.in: Rebuild.
195 * symtab.cc (Symbol_table::add_from_dynobj): Only look for weak
196 aliases for symbols defined in the same object.
197 * testsuite/Makefile.am (check_PROGRAMS): Add weak_alias_test.
198 (weak_alias_test_SOURCES): New variable.
199 (weak_alias_test_DEPENDENCIES): New variable.
200 (weak_alias_test_LDFLAGS): New variable.
201 (weak_alias_test_LDADD): New variable.
202 (weak_alias_test_1_pic.o, weak_alias_test_1.so): New targets.
203 (weak_alias_test_2_pic.o, weak_alias_test_2.so): New targets.
204 (weak_alias_test_3.o): New target.
205 (weak_alias_test_4_pic.o, weak_alias_test_4.so): New targets.
206 * testsuite/weak_alias_test_main.cc: New file.
207 * testsuite/weak_alias_test_1.cc: New file.
208 * testsuite/weak_alias_test_2.cc: New file.
209 * testsuite/weak_alias_test_3.cc: New file.
211 2008-04-08 Ian Lance Taylor <iant@google.com>
213 * options.h (class General_options): Add --noinhibit-exec option.
214 * main.cc (main): Check --noinhibit-exec.
216 * options.h (class General_options): Define --wrap as a special
217 option. Add wrap_symbols_ field.
218 (General_options::any_wrap_symbols): New function.
219 (General_options::is_wrap_symbol): New function.
220 * options.cc (General_options::parse_wrap): New function.
221 (General_options::General_options): Initialize wrap_symbols_.
222 * symtab.cc (Symbol_table::wrap_symbol): New function.
223 (Symbol_table::add_from_object): Handle --wrap.
224 * symtab.h (class Symbol_table): Declare wrap_symbol.
225 * target.h (Target::wrap_char): New function.
226 (Target::Target_info): Add wrap_char field.
227 * i386.cc (Target_i386::i386_info): Initialize wrap_char.
228 * x86_64.cc (Target_x86_64::x86_64_info): Likewise.
229 * testsuite/testfile.cc (Target_test::test_target_info):
232 * errors.cc (Errors::undefined_symbol): Mention symbol version if
235 * layout.h (class Layout): Add added_eh_frame_data_ field.
236 * layout.cc (Layout::Layout): Initialize new field.
237 (Layout::layout_eh_frame): Don't add eh_frame_data_ to .eh_frame
238 output section until we find a section we merged successfully.
239 * object.cc (Sized_relobj::check_eh_frame_flags): Don't require
240 that the size be non-zero.
242 * merge.cc (Object_merge_map::get_output_offset): Remove inline
245 2008-04-08 Craig Silverstein <csilvers@google.com>
247 * configure.ac: Export new conditional variable HAVE_ZLIB.
248 * testsuite/Makefile.am (flagstest_o_specialfile): Condition
250 (flagstest_o_specialfile_and_compress_debug_sections): Likewise.
251 * configure, Makefile.in, testsuite/Makefile.in: Rebuild.
253 2008-04-07 Ian Lance Taylor <iant@google.com>
255 * version.cc (version_string): Set to "1.5".
257 * x86_64.cc (Target_x86_64::Scan): Change from struct to class.
258 Add issued_non_pic_error_ field. Declare check_non_pic.
259 (Target_x86_64::Scan::check_non_pic): New function.
260 (Target_x86_64::Scan::local): Call check_non_pic as appropriate.
261 (Target_x86_64::Scan::global): Likewise.
263 * output.cc (Output_reloc<SHT_REL>::local_section_offset): Add
264 addend parameter. Change caller. Handle merge sections.
265 (Output_reloc<SHT_REL>::symbol_value): Change parameter type from
266 Address to Addend. Don't add in the result of
267 local_section_offset, pass down the addend and use the returned
269 * output.h (class Output_reloc<SHT_REL>): Add Addend typedef.
270 Update declarations of local_section_offset and symbol_value.
271 * testsuite/two_file_test_1.cc (t18): New function.
272 * testsuite/two_file_test_2.cc (f18): New function.
273 * testsuite/two_file_test_main.cc (main): Call t18.
274 * testsuite/two_file_test.h (t18, f18): Declare.
276 * configure.ac: Don't test for objdump, c++filt, or readelf.
277 * testsuite/Makefile.am: Remove READELF and OBJDUMP_AND_CPPFILT
279 (TEST_READELF): New variable.
280 (TEST_OBJDUMP, TEST_CXXFILT, TEST_STRIP): New variables.
281 (check_PROGRAMS): Add two_file_strip_test.
282 (two_file_strip_test): New target.
283 (check_PROGRAMS): Add two_file_same_shared_strip_test.
284 (two_file_same_shared_strip_test_SOURCES): New variable.
285 (two_file_same_shared_strip_test_DEPENDENCIES): New variable.
286 (two_file_same_shared_strip_test_LDFLAGS): New variable.
287 (two_file_same_shared_strip_test_LDADD): New variable.
288 (two_file_shared_strip.so): New target.
289 (ver_test_2.syms, ver_test_4.syms): Use TEST_READELF.
290 (ver_test_5.syms, ver_test_7.syms): Likewise.
291 (ver_matching_test.stdout): Use TEST_OBJDUMP and TEST_CXXFILT.
292 (strip_test_3.stdout): Use TEST_OBJDUMP.
293 * configure, Makefile.in, testsuite/Makefile.in: Rebuild.
295 2008-04-04 Cary Coutant <ccoutant@google.com>
297 * symtab.h (Symbol::is_weak_undefined): New function.
298 (Symbol::is_strong_undefined): New function.
299 (Symbol::is_absolute): New function.
300 (Symbol::needs_plt_entry): Exclude weak undefined symbols.
301 (Symbol::needs_dynamic_reloc): Exclude weak undefined and
303 * testsuite/Makefile.am (check_PROGRAMS): Add weak_undef_test.
304 (weak_undef_test): New target.
305 * testsuite/Makefile.in: Rebuild.
306 * testsuite/weak_undef_file1.cc: New file.
307 * testsuite/weak_undef_file2.cc: New file.
308 * testsuite/weak_undef_test.cc: New file.
310 2008-04-03 Craig Silverstein <csilvers@google.com>
312 * compressed_output.h (class Output_compressed_section): Use
314 * compressed_output.cc (zlib_compress): Use unsigned buffers,
316 (zlib_compressed_suffix): Removed.
317 (Output_compressed_section::set_final_data_size): Use unsigned
319 * testsuite/Makefile.am (flagstest_compress_debug_sections):
320 Fix linker invocation.
321 (flagstest_o_specialfile_and_compress_debug_sections):
323 * testsuite/Makefile.in: Regenerated.
325 2008-04-02 David S. Miller <davem@davemloft.net>
327 * dwarf_reader.cc (Sized_dwarf_line_info::read_header_prolog,
328 Sized_dwarf_line_info::process_one_opcode): Use Swap_unaligned.
330 2008-04-02 Craig Silverstein <csilvers@google.com>
334 2008-04-02 Ian Lance Taylor <iant@google.com>
336 * fileread.cc (File_read::find_view): Add byteshift and vshifted
337 parameters. Update for new key type to views_. Change all
339 (File_read::read): Adjust for byteshift in returned view.
340 (File_read::add_view): New function, broken out of
342 (File_read::make_view): New function, broken out of
344 (File_read::find_or_make_view): Add offset and aligned
345 parameters. Rewrite accordingly. Change all callers.
346 (File_read::get_view): Add offset and aligned parameters. Adjust
347 for byteshift in return value.
348 (File_read::get_lasting_view): Likewise.
349 * fileread.h (class File_read): Update declarations.
350 (class File_read::View): Add byteshift_ field. Add byteshift to
351 constructor. Add byteshift method.
352 * archive.h (Archive::clear_uncached_views): New function.
353 (Archive::get_view): Add aligned parameter. Change all callers.
354 * object.h (Object::get_view): Add aligned parameter. Change all
356 (Object::get_lasting_view): Likewise.
358 * fileread.cc (File_read::release): Don't call clear_views if
359 there are multiple objects.
360 * fileread.h (File_read::clear_uncached_views): New function.
361 * archive.cc (Add_archive_symbols::run): Call clear_uncached_views
364 2008-03-31 Cary Coutant <ccoutant@google.com>
366 Add thin archive support.
367 * archive.cc (Archive::armagt): New const.
368 (Archive::setup): Remove task parameter and calls to unlock.
369 (Archive::unlock_nested_archives): New function.
370 (Archive::read_header): Add nested_off parameter. Change
372 (Archive::interpret_header): Likewise.
373 (Archive::include_all_members): Change to handle thin
375 (Archive::include_member): Likewise.
376 * archive.h (Archive::Archive): Add new parameters and
378 (Archive::armagt): New const.
379 (Archive::setup): Remove task parameter.
380 (Archive::unlock_nested_archives): New function.
381 (Archive::read_header): Add nested_off parameter.
382 (Archive::interpret_header): Likewise.
383 (Archive::Nested_archive_table): New typedef.
384 (Archive::is_thin_archive_): New field.
385 (Archive::nested_archives_): New field.
386 (Archive::options_): New field.
387 (Archive::dirpath_): New field.
388 (Archive::task_): New field.
389 * readsyms.cc (Read_symbols::do_read_symbols): Add check
390 for thin archives. Pass additional parameters to
391 Archive::Archive. Unlock the archive file after calling
394 2008-03-29 Ian Lance Taylor <iant@google.com>
396 * symtab.cc (Symbol_table::do_define_as_constant): Don't force a
397 version symbol to be local.
398 * testsuite/ver_test_4.sh: New file.
399 * testsuite/Makefile.am (check_SCRIPTS): Add ver_test_4.sh.
400 (check_DATA): Add ver_test_4.syms.
401 (ver_test_4.syms): New target.
402 * testsuite/Makefile.in: Rebuild.
405 (Output_section::Input_section_sort_entry::has_priority): New
407 (Output_section::Input_section_sort_entry::match_file_name): New
409 (Output_section::Input_section_sort_entry::match_section_name):
411 (Output_section::Input_section_sort_entry::match_section_name_prefix):
413 (Output_section::Input_section_sort_entry::match_section_file):
415 (Output_section::Input_section_sort_compare::operator()): Rewrite
416 using new Input_section_sort_entry functions. Sort crtbegin and
417 crtend first. Sort sections with no priority before sections with
419 * testsuite/initpri1.c (d3): Check j != 4.
420 (cd5): New constructor/destructor function.
421 (main): Check j != 2.
423 * symtab.cc (Symbol_table::add_from_object): If we don't use the
424 new symbol when resolving, don't call set_is_default.
425 * testsuite/ver_test_7.cc: New file.
426 * testsuite/ver_test_7.sh: New file.
427 * testsuite/Makefile.am (ver_test_7.so): New target.
428 (ver_test_7.o): New target.
429 (check_SCRIPTS): Add ver_test_7.sh.
430 (check_DATA): Add ver_test_7.syms.
431 (ver_test_7.syms): New target.
433 2008-03-28 Ian Lance Taylor <iant@google.com>
435 * layout.cc (Layout::layout): If we see an input section with a
436 name that needs sorting, set the must_sort flag for the output
438 (Layout::make_output_section): If the name of the output section
439 indicates that it might require sorting, set the may_sort flag.
440 * output.h (Output_section::may_sort_attached_input_sections): New
442 (Output_section::set_may_sort_attached_input_sections): New
444 (Output_section::must_sort_attached_input_sections): New
446 (Output_section::set_must_sort_attached_input_sections): New
448 (class Output_section): Declare Input_section_sort_entry. Define
449 Input_section_sort_compare. Declare
450 sort_attached_input_sections. Add new fields:
451 may_sort_attached_input_sections_,
452 must_sort_attached_input_sections_,
453 attached_input_sections_are_sorted_.
454 * output.cc (Output_section::Output_section): Initialize new
456 (Output_section::add_input_section): Add an entry to
457 input_sections_ if may_sort or must_sort are true.
458 (Output_section::set_final_data_size): Call
459 sort_attached_input_sections if necessary.
460 (Output_section::Input_section_sort_entry): Define new class.
461 (Output_section::Input_section_sort_compare::operator()): New
463 (Output_section::sort_attached_input_sections): New function.
464 * configure.ac: Check whether the compiler supports constructor
465 priorities. Define a CONSTRUCTOR_PRIORITY automake conditional.
466 * testsuite/initpri1.c: New file.
467 * testsuite/Makefile.am (check_PROGRAMS): Add initpri1 if
468 CONSTRUCTOR_PRIORITY.
469 (initpri1_SOURCES, initpri1_DEPENDENCIES): New variables.
470 (initpri1_LDFLAGS): New variable.
471 * configure, Makefile.in, testsuite/Makefile.in: Rebuild.
473 2008-03-27 Ian Lance Taylor <iant@google.com>
475 * common.cc (Sort_commons::operator): Correct sorting algorithm.
476 * testsuite/common_test_1.c: New file.
477 * testsuite/Makefile.am (check_PROGRAMS): Add common_test_1.
478 (common_test_1_SOURCES): New variable.
479 (common_test_1_DEPENDENCIES): New variable.
480 (common_test_1_LDFLAGS): New variable.
482 * symtab.cc (Symbol_table::add_from_object): Handle saw_undefined_
483 and commons_ correctly when NAME/VERSION does not override
485 * testsuite/ver_test_6.c: New file.
486 * testsuite/Makefile.am (check_PROGRAMS): Add ver_test_6
487 (ver_test_6_SOURCES, ver_test_6_DEPENDENCIES): New variables.
488 (ver_test_6_LDFLAGS, ver_test_6_LDADD): New variables.
490 2008-03-26 Ian Lance Taylor <iant@google.com>
492 * symtab.cc (Symbol_table::add_from_relobj): Don't set the version
493 of an undefined symbol from a version script.
494 * testsuite/Makefile.am (ver_test_5.so): New target.
495 (ver_test_5.o): New target.
496 (check_SCRIPTS): Add ver_test_5.sh.
497 (check_DATA): Add ver_test_5.syms.
498 (ver_test_5.syms): New target.
499 * testsuite/ver_test_5.cc: New file.
500 * testsuite/ver_test_5.script: New file.
501 * testsuite/ver_test_5.sh: New file.
502 * Makefile.in, testsuite/Makefile.in: Rebuild.
505 Fix problems building gold with gcc 4.3.0.
506 * gold.h (TEMPLATE_ATTRIBUTE_PRINTF_4): Define.
507 (gold_error_at_location, gold_warning_at_location): Use it.
508 * configure.ac: Check whether we can compile and use a template
509 function with a printf attribute.
510 * x86_64.cc (Target_x86_64::do_code_fill): Swap out a 32-bit value
511 when jumping over bytes.
512 * object.cc: Instantiate Object::read_section_data.
513 * debug.h: Include <cstring>
514 * dwarf_reader.cc: Include <algorithm>
515 * main.cc: Include <cstring>.
516 * options.cc: Include <cstring>.
517 * output.cc: Include <cstring>.
518 * script.cc: Include <cstring>.
519 * script.h: Include <string>.
520 * symtab.cc: Include <cstring> and <algorithm>.
521 * target-select.cc: Include <cstring>.
522 * version.cc: Include <string>.
523 * testsuite/testmain.cc: Include <cstdlib>.
524 * configure, config.in: Rebuild.
526 2008-03-25 Ian Lance Taylor <iant@google.com>
528 * options.cc: Include "../bfd/bfdver.h".
529 (options::help): Print bug reporting address.
531 * version.cc (print_version): Adjust output for current value of
536 * options.cc (options::help): Print list of supported targets.
537 * target-select.h: Include <vector>.
538 (class Target_selector): Make machine_, size_, and is_big_endian_
539 fields const. Add bfd_name_ and instantiated_target_ fields.
540 (Target_selector::Target_selector): Add bfd_name parameter.
541 (Target_selector::recognize): Make non-virtual, call
543 (Target_selector::recognize_by_name): Make non-virtual, call
544 do_recognize_by_name.
545 (Target_selector::supported_names): New function.
546 (Target_selector::bfd_name): New function.
547 (Target_selector::do_instantiate_target): New pure virtual
549 (Target_selector::do_recognize): New virtual function.
550 (Target_selector::do_recognize_by_name): New virtual function.
551 (Target_selector::instantiate_target): New private function.
552 (supported_target_names): Declare.
553 * target-select.cc (Target_selector::Target_selector): Update for
554 new parameter and fields.
555 (select_target_by_name): Check that the name matches before
556 calling recognize_by_name.
557 (supported_target_names): New function.
558 * i386.cc (class Target_selector_i386): Update Target_selector
559 constructor call. Remove recognize and recognize_by_name. Add
560 do_instantiate_target.
561 * x86_64.cc (class Target_selector_x86_64): Likewise.
562 * testsuite/testfile.cc (class Target_selector_test): Update for
563 changes to Target_selector.
565 * README: Rewrite, with some notes on unsupported features.
567 2008-03-24 Cary Coutant <ccoutant@google.com>
569 * i386.cc (Target_i386::Got_type): New enum declaration.
570 (Target_i386::Scan::local): Updated callers of Output_data_got
572 (Target_i386::Scan::global): Likewise.
573 (Target_i386::Relocate::relocate): Likewise.
574 (Target_i386::Relocate::relocate_tls): Likewise.
575 * object.h (Got_offset_list): New class.
576 (Sized_relobj::local_has_got_offset): Added got_type parameter.
577 (Sized_relobj::local_got_offset): Likewise.
578 (Sized_relobj::set_local_got_offset): Likewise.
579 (Sized_relobj::local_has_tls_got_offset): Removed.
580 (Sized_relobj::local_tls_got_offset): Removed.
581 (Sized_relobj::set_local_tls_got_offset): Removed.
582 (Sized_relobj::Local_got_offsets): Changed to store a list of offsets.
583 * output.cc (Output_data_got::add_global): Added got_type parameter.
584 (Output_data_got::add_global_with_rel): Likewise.
585 (Output_data_got::add_global_with_rela): Likewise.
586 (Output_data_got::add_global_pair_with_rel): New function.
587 (Output_data_got::add_global_pair_with_rela): New function.
588 (Output_data_got::add_local): Added got_type parameter.
589 (Output_data_got::add_local_with_rel): Likewise.
590 (Output_data_got::add_local_with_rela): Likewise.
591 (Output_data_got::add_local_pair_with_rel): New function.
592 (Output_data_got::add_local_pair_with_rela): New function.
593 (Output_data_got::add_global_tls): Removed.
594 (Output_data_got::add_global_tls_with_rel): Removed.
595 (Output_data_got::add_global_tls_with_rela): Removed.
596 (Output_data_got::add_local_tls): Removed.
597 (Output_data_got::add_local_tls_with_rel): Removed.
598 (Output_data_got::add_local_tls_with_rela): Removed.
599 * output.h (Output_data_got::add_global): Added got_type parameter.
600 (Output_data_got::add_global_with_rel): Likewise.
601 (Output_data_got::add_global_with_rela): Likewise.
602 (Output_data_got::add_global_pair_with_rel): New function.
603 (Output_data_got::add_global_pair_with_rela): New function.
604 (Output_data_got::add_local): Added got_type parameter.
605 (Output_data_got::add_local_with_rel): Likewise.
606 (Output_data_got::add_local_with_rela): Likewise.
607 (Output_data_got::add_local_pair_with_rel): New function.
608 (Output_data_got::add_local_pair_with_rela): New function.
609 (Output_data_got::add_global_tls): Removed.
610 (Output_data_got::add_global_tls_with_rel): Removed.
611 (Output_data_got::add_global_tls_with_rela): Removed.
612 (Output_data_got::add_local_tls): Removed.
613 (Output_data_got::add_local_tls_with_rel): Removed.
614 (Output_data_got::add_local_tls_with_rela): Removed.
615 * resolve.cc (Symbol::override_base_with_special): Removed
616 reference to has_got_offset_ field.
617 * symtab.cc (Symbol::init_fields): Replaced initialization
618 of got_offset_ with got_offsets_. Removed initialization
620 * symtab.h (Symbol::has_got_offset): Aded got_type parameter.
621 (Symbol::got_offset): Likewise.
622 (Symbol::set_got_offset): Likewise.
623 (Symbol::has_tls_got_offset): Removed.
624 (Symbol::tls_got_offset): Removed.
625 (Symbol::set_tls_got_offset): Removed.
626 (Symbol::got_offset_): Removed.
627 (Symbol::tls_mod_got_offset_): Removed.
628 (Symbol::tls_pair_got_offset_): Removed.
629 (Symbol::got_offsets_): New field.
630 (Symbol::has_got_offset): Removed.
631 (Symbol::has_tls_mod_got_offset): Removed.
632 (Symbol::has_tls_pair_got_offset): Removed.
633 * x86_64.cc (Target_x86_64::Got_type): New enum declaration.
634 (Target_x86_64::Scan::local): Updated callers of Output_data_got
636 (Target_x86_64::Scan::global): Likewise.
637 (Target_x86_64::Relocate::relocate): Likewise.
638 (Target_x86_64::Relocate::relocate_tls): Likewise.
640 2008-03-25 Ben Elliston <bje@au.ibm.com>
642 * yyscript.y: Fix spelling error in comment.
644 2008-03-24 Ian Lance Taylor <iant@google.com>
646 * options.h (class General_options): Define build_id option.
647 * layout.h (class Layout): Declare write_build_id, create_note,
648 create_build_id. Add build_id_note_ member.
649 * layout.cc: Include <cerrno>, <fcntl.h>, <unistd.h>,
650 "libiberty.h", "md5.h", "sha1.h".
651 (Layout::Layout): Initialize eh_frame_data_,
652 eh_frame_hdr_section_, and build_id_note_.
653 (Layout::finalize): Call create_build_id.
654 (Layout::create_note): New function, broken out of
655 Layout::create_gold_note.
656 (Layout::create_gold_note): Call create_note.
657 (Layout::create_build_id): New function.
658 (Layout::write_build_id): New function.
659 (Close_task_runner::run): Call write_build_id.
661 * x86_64.cc: Correct license to GPLv3.
663 2008-03-23 Ian Lance Taylor <iant@google.com>
665 * options.cc: Include "demangle.h".
666 (parse_optional_string): New function.
667 (parse_long_option): Handle takes_optional_argument.
668 (parse_short_option): Update dash_z initializer. Handle
669 takes_optional_argument.
670 (General_options::General_options): Initialize do_demangle_.
671 (General_options::finalize): Set do_demangle_. Handle demangling
673 * options.h (parse_optional_string): Declare.
674 (struct One_option): Add optional_arg field. Update constructor.
675 Update call constructor calls. Add takes_optional_argument
677 (DEFINE_var): Add optional_arg__ parameter. Change all callers.
678 (DEFINE_optional_string): Define.
679 (General_options::demangle): Change from DEFINE_bool to
680 DEFINE_optional_string.
681 (General_options::no_demangle): New function.
682 (General_options::do_demangle): New function.
683 (General_options::set_do_demangle): New function.
684 (General_options::execstack_status_): Move definition to end of
686 (General_options::static_): Likewise.
687 (General_options::do_demangle_): New field.
688 * object.cc (big_endian>::get_symbol_location_info): Call
689 Options::do_demangle, not Options::demangle.
690 * symtab.cc (demangle): Likewise.
692 2008-03-22 Ian Lance Taylor <iant@google.com>
694 * gold.h: Include <cstddef> and <sys/types.h>
695 * options.h: Include <cstring>.
697 2008-03-21 Ian Lance Taylor <iant@google.com>
699 * Added source code to GNU binutils.