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