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