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