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