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