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