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