Correct last patch.
[deliverable/binutils-gdb.git] / gold / ChangeLog
CommitLineData
8825ac63
ILT
12008-05-05 Ian Lance Taylor <iant@google.com>
2
d98bc257
ILT
3 * options.h (DEFINE_bool): For DASH_Z, create the negative option
4 as noVARNAME rather than no-VARNAME.
5 (class General_options): Add option -z combreloc.
6 * output.h (class Output_reloc) [SHT_REL]: Declare compare and
7 get_address.
8 (Output_reloc::sort_before) [SHT_REL]: New function.
9 (Output_reloc::sort_before) [SHT_RELA]: New function.
10 (class Output_data_reloc_base): Add sort_relocs_ field. Define
11 Sort_relocs_comparison.
12 (Output_data_reloc_base::Output_data_reloc_base): Add sort_relocs
13 parameter. Change all callers.
14 (Output_data_reloc::Output_data_reloc) [both versions]: Add
15 sort_relocs parameter. Change all callers.
16 * output.cc (Output_reloc::get_address): New function, broken out
17 of write_rel.
18 (Output_reloc::write_rel): Call it.
19 (Output_reloc::compare): New function.
20 (Output_data_reloc_base::do_write): Optionally sort relocs.
21
60b2b4e7
ILT
22 * configure.ac: If targ_extra_obj is set, link it in.
23 * configure.tgt: Initialize all variables.
24 (x86_64*): Set targ_extra_obj and targ_extra_size.
25 * configure: Rebuild.
26
8825ac63
ILT
27 * object.cc (Sized_relobj::include_section_group): Adjust section
28 indexes read from group data. Build vector to pass to
29 layout_group.
30 * layout.cc (Layout::layout_group): Add flags and shndxes
31 parameters. Remove contents parameter. Change caller. Update
32 explicit instantiations.
33 * layout.h (class Layout): Update layout_group declaration.
34 * output.cc (Output_data_group::Output_data_group): Add flags and
35 input_shndxes parameters. Remove contents parameter. Change
36 caller.
37 (Output_data_group::do_write): Change input_sections_ to
38 input_shndxes_.
39 * output.h (class Output_data_group): Update constructor
40 declaration. Rename input_sections_ to input_shndxes_.
41 * testsuite/many_sections_test.cc: Add template.
42
e94cf127
CC
432008-04-30 Cary Coutant <ccoutant@google.com>
44
4418b2d5
CC
45 * target-reloc.h (relocate_section): Fix dead-pointer bug.
46
e94cf127
CC
47 * layout.cc (Layout::include_section): Refactored check for debug
48 info section.
49 (Layout::add_comdat): Add new parameters. Change type
50 of signature parameter. Add object and shndx to signatures table.
51 (Layout::find_kept_object): New function.
52 * layout.h: Include <cstring>.
53 (Layout::is_debug_info_section): New function.
54 (Layout::add_comdat): Add new parameters.
55 (Layout::find_kept_object): New function.
56 (Layout::Kept_section): New struct.
57 (Layout::Signatures): Change type of map range.
58 * object.cc (Relobj::output_section_address): New function.
59 (Sized_relobj::include_section_group): Add new parameters. Change
60 calls to Layout::add_comdat. Change to build table of kept comdat
61 groups and table mapping discarded sections to kept sections.
62 (Sized_relobj::include_linkonce_section): Likewise. Add new parameter.
63 (Sized_relobj::do_layout): Change calls to include_section_group and
64 include_linkonce_section.
65 (Sized_relobj::do_finalize_local_symbols): Do not set local symbol
66 value to zero when section is discarded.
67 (Sized_relobj::map_to_kept_section): New function.
68 * object.h (Relobj::output_section_address): New function.
69 (Relobj::Comdat_group): New type.
70 (Relobj::find_comdat_group): New function.
71 (Relobj::Comdat_group_table): New type.
72 (Relobj::Kept_comdat_section): New type.
73 (Relobj::Kept_comdat_section_table): New type.
74 (Relobj::add_comdat_group): New function.
75 (Relobj::set_kept_comdat_section): New function.
76 (Relobj::get_kept_comdat_section): New function.
77 (Relobj::comdat_groups_): New field.
78 (Relobj::kept_comdat_sections_): New field.
79 (Symbol_value::input_value): Update comment.
80 (Sized_relobj::map_to_kept_section) New function.
81 (Sized_relobj::include_linkonce_section): Add new parameter.
82 * target-reloc.h (Comdat_behavior): New type.
83 (get_comdat_behavior): New function.
84 (relocate_section): Add code to map a discarded section to the
85 corresponding kept section when applying a relocation.
86
e4e5049b
CS
872008-04-30 Craig Silverstein <csilvers@google.com>
88
89 * dwarf_reader.cc (next_generation_count): New static var.
90 (Addr2line_cache_entry): New struct.
91 (addr2line_cache): New static var.
92 (Dwarf_line_info::one_addr2line): Added caching.
93 (Dwarf_line_info::clear_addr2line_cache): New function.
94 * dwarf_reader.h (Dwarf_line_info::one_addr2line): Add
95 cache-size parameter.
96 (Dwarf_line_info::one_addr2line_cache): New function.
97 * symtab.cc (Symbol_table::detect_odr_violations): Pass
98 new cache-size argument to one_addr2line(), and clear cache.
99
d09e9154
CC
1002008-04-28 Cary Coutant <ccoutant@google.com>
101
102 * i386.cc (Relocate::relocate): Fix typos for R_386_PC16 and
103 R_386_PC8 relocations.
104
7ef73768
ILT
1052008-04-23 Ian Lance Taylor <iant@google.com>
106
55438702
ILT
107 * object.cc (Sized_relobj::include_section_group): Check for
108 invalid section group.
109
c165fb93
ILT
110 * object.cc (make_elf_object): Correct test for 64-bit ELF file
111 header size.
112
7ef73768
ILT
113 * readsyms.cc (Read_symbols::do_read_symbols): Use get_view rather
114 than read for file header.
115 * archive.cc (Archive::include_member): Likewise.
116
6194aaab
L
1172008-04-23 Paolo Bonzini <bonzini@gnu.org>
118
119 * aclocal.m4: Regenerate.
120 * configure: Regenerate.
121
d491d34e
ILT
1222008-04-19 Ian Lance Taylor <iant@google.com>
123
5ea2bac6
ILT
124 * version.cc (version_string): Bump to 1.6.
125
7bc3e21a
ILT
126 * testsuite/Makefile.am (many_sections_r_test): New target.
127 (many_sections_r_test_SOURCES): Remove.
128 (many_sections_r_test_DEPENDENCIES): Remove.
129 (many_sections_r_test_LDFLAGS): Remove.
130 (many_sections_r_test_LDADD): Remove.
131
7fcd3aa9
ILT
132 * object.cc (Sized_relobj::do_add_symbols): Always pass
133 local_symbol_count_ to add_from_relobj.
134
4c94d6ae
ILT
135 * testsuite/Makefile.am (many_sections_check.h): Only check one in
136 every thousand variables.
137 * testsuite/Makefile.in: Rebuild.
138
d491d34e
ILT
139 * object.cc (Xindex::initialize_symtab_xindex): New function.
140 (Xindex::read_symtab_xindex): New function.
141 (Xindex::sym_xindex_to_shndx): New function.
142 (Sized_relobj::find_symtab): Pick up SHT_SYMTAB_SHNDX section if
143 available.
144 (Sized_relobj::do_initialize_xindex): New function.
145 (Sized_relobj::do_read_symbols): Adjust section links.
146 (Sized_relobj::symbol_section_and_value): Add is_ordinary
147 parameter. Change all callers.
148 (Sized_relobj::include_section_group): Adjust section links and
149 symbol section indexes.
150 (Sized_relobj::do_layout): Adjust section links.
151 (Sized_relobj::do_count_local_symbols): Adjust section links and
152 symbol section indexes.
153 (Sized_relobj::do_finalize_local_symbols): Distinguish between
154 ordinary and special symbols.
155 (Sized_relobj::write_local_symbols): Add symtab_xindex and
156 dynsym_xindex parameters. Change all callers. Adjust section
157 links. Use SHN_XINDEX when needed.
158 (Sized_relobj::get_symbol_location_info): Adjust section links.
159 Don't get fooled by special symbols.
160 * object.h (class Xindex): Define.
161 (class Object): Add xindex_ parameter. Declare virtual functoin
162 do_initialize_xindex.
163 (Object::adjust_sym_shndx): New function.
164 (Object::set_xindex): New protected function.
165 (class Symbol_value): Add is_ordinary_shndx_ field.
166 (Symbol_value::Symbol_value): Initialize is_ordinary_shndx_.
167 (Symbol_value::value): Assert ordinary section.
168 (Symbol_value::initialize_input_to_output_map): Likewise.
169 (Symbol_value::set_input_shndx): Add is_ordinary parameter.
170 Change all callers.
171 (Symbol_value::input_shndx): Add is_ordinary parameter. Change
172 all callers.
173 (class Sized_relobj): Update declarations.
174 (Sized_relobj::local_symbol_input_shndx): Add is_ordinary
175 parameter. Change all callers.
176 (Sized_relobj::adjust_shndx): New function.
177 * dynobj.cc (Sized_dynobj::Sized_dynobj): Initialize dynsym_shndx_
178 field.
179 (Sized_dynobj::find_dynsym_sections): Remove pdynsym_shndx
180 parameter. Change all callers. Pick up SHT_DYNSYM_SHNDX section
181 for SHT_DYNSYM section if available. Set dynsym_shndx_ field.
182 (Sized_dynobj::read_dynsym_section): Adjust section links.
183 (Sized_dynobj::read_dynamic): Likewise.
184 (Sized_dynobj::do_read_symbols): Use dynsym_shndx_ field. Adjust
185 section links.
186 (Sized_dynobj::do_initialize_xindex): New function.
187 * dynobj.h (class Sized_dynobj): Add dynsym_shndx_ field. Declare
188 do_initialize_xindex.
189 (Sized_dynobj::adjust_shndx): New function.
190 * layout.cc (Layout::Layout): Initialize symtab_xindex_ and
191 dynsym_xindex_ fields.
192 (Layout::finalize): Add a call to set_section_indexes before
193 creating the symtab sections.
194 (Layout::set_section_indexes): Don't do anything if the section
195 already has a section index.
196 (Layout::create_symtab_sections): Add shnum parameter. Change
197 caller. Create .symtab_shndx section if needed.
198 (Layout::create_shdrs): Add shstrtab_section parameter. Change
199 caller.
200 (Layout::allocated_output_section_count): New function.
201 (Layout::create_dynamic_symtab): Create .dynsym_shndx section if
202 needed.
203 * layout.h (class Layout): Add symtab_xindex_ and dynsym_xindex_
204 fields. Update declarations.
205 (Layout::symtab_xindex): New function.
206 (Layout::dynsym_xindex): New function.
207 (class Write_symbols_task): Add layout_ field.
208 (Write_symbols_task::Write_symbols_task): Add layout parameter.
209 Change caller.
210 * output.cc (Output_section_headers::Output_section_headers): Add
211 shstrtab_section parameter. Change all callers.
212 (Output_section_headers::do_sized_write): Store overflow values
213 for section count and section string table section index in
214 section header zero.
215 (Output_file_header::do_sized_write): Check for overflow of
216 section count and section string table section index.
217 (Output_symtab_xindex::do_write): New function.
218 (Output_symtab_xindex::endian_do_write): New function.
219 * output.h (class Output_section_headers): Add shstrtab_section_.
220 Update declarations.
221 (class Output_symtab_xindex): Define.
222 (Output_section::has_out_shndx): New function.
223 * symtab.cc (Symbol::init_fields): Initialize is_ordinary_shndx_
224 field.
225 (Symbol::init_base): Add st_shndx and is_ordinary parameters.
226 Change all callers.
227 (Sized_symbol::init): Likewise.
228 (Symbol::output_section): Check for ordinary symbol.
229 (Symbol_table::add_from_object): Remove orig_sym parameter. Add
230 st_shndx, is_ordinary, and orig_st_shndx parameters. Change all
231 callers.
232 (Symbol_table::add_from_relobj): Add symndx_offset parameter.
233 Change all callers. Simplify handling of symbols from sections
234 not included in the link.
235 (Symbol_table::add_from_dynobj): Handle ordinary symbol
236 distinction.
237 (Weak_alias_sorter::operator()): Assert that symbols are
238 ordinary.
239 (Symbol_table::sized_finalize_symbol): Handle ordinary symbol
240 distinction.
241 (Symbol_table::write_globals): Add symtab_xindex and dynsym_xindex
242 parameters. Change all callers.
243 (Symbol_table::sized_write_globals): Likewise. Handle ordinary
244 symbol distinction. Use SHN_XINDEX when needed.
245 (Symbol_table::write_section_symbol): Add symtab_xindex
246 parameter. Change all callers.
247 (Symbol_table::sized_write_section_symbol): Likewise. Use
248 SHN_XINDEX when needed.
249 * symtab.h (class Symbol): Add is_ordinary_shndx_ field. Update
250 declarations.
251 (Symbol::shndx): Add is_ordinary parameter. Change all callers.
252 (Symbol::is_defined): Check is_ordinary.
253 (Symbol::is_undefined, Symbol::is_weak_undefined): Likewise.
254 (Symbol::is_absolute, Symbol::is_common): Likewise.
255 (class Sized_symbol): Update declarations.
256 (class Symbol_table): Update declarations.
257 * resolve.cc (Symbol::override_base): Add st_shndx and is_ordinary
258 parameters. Change all callers.
259 (Sized_symbol::override): Likewise.
260 (Symbol_table::override): Likewise.
261 (symbol_to_bits): Add is_ordinary parameter. Change all callers.
262 (Symbol_table::resolve): Remove orig_sym parameter. Add st_shndx,
263 is_ordinary, and orig_st_shndx parameters. Change all callers.
264 * copy-relocs.cc (Copy_relocs::emit_copy_reloc): Require symbol
265 to be in an ordinary section.
266 * dwarf_reader.cc (Sized_dwarf_line_info::symbol_section): Add
267 object and is_ordinary parameters. Change all callers.
268 (Sized_dwarf_line_info::read_relocs): Add object parameter.
269 Change all callers. Don't add undefined or non-ordinary symbols
270 to reloc_map_.
271 (Sized_dwarf_line_info::read_line_mappings): Add object parameter.
272 Change all callers.
273 * dwarf_reader.h (class Sized_dwarf_line_info): Update
274 declarations.
275 * ehframe.cc (Eh_frame::read_fde): Check for ordinary symbol.
276 * reloc.cc (Sized_relobj::do_read_relocs): Adjust section links.
277 (Sized_relobj::relocate_sections): Likewise.
278 * target-reloc.h (scan_relocs): Adjust section symbol index.
279 (scan_relocatable_relocs): Likewise.
280 * i386.cc (Scan::local): Check for ordinary symbols.
281 * sparc.cc (Scan::local): Likewise.
282 * x86_64.cc (Scan::local): Likewise.
283 * testsuite/binary_unittest.cc (Sized_binary_test): Update calls
284 to symbol_section_and_value.
285 * testsuite/many_sections_test.cc: New file.
286 * testsuite/Makefile.am (BUILT_SOURCES): Define.
287 (check_PROGRAMS): Add many_sections_test.
288 (many_sections_test_SOURCES): Define.
289 (many_sections_test_DEPENDENCIES): Define.
290 (many_sections_test_LDFLAGS): Define.
291 (BUILT_SOURCES): Add many_sections_define.h.
292 (many_sections_define.h): New target.
293 (BUILT_SOURCES): Add many_sections_check.h.
294 (many_sections_check.h): New target.
295 (check_PROGRAMS): Add many_sections_r_test.
296 (many_sections_r_test_SOURCES): Define.
297 (many_sections_r_test_DEPENDENCIES): Define.
298 (many_sections_r_test_LDFLAGS): Define.
299 (many_sections_r_test_LDADD): Define.
300 (many_sections_r_test.o): New target.
301 * testsuite/Makefile.in: Rebuild.
302
c5818ff1
CC
3032008-04-17 Cary Coutant <ccoutant@google.com>
304
305 * errors.cc (Errors::info): New function.
306 (gold_info): New function.
307 * errors.h (Errors::info): New function.
308 * gold.h (gold_info): New function.
309 * object.cc (Input_objects::add_object): Print trace output.
310 * options.cc (options::parse_set): New function.
311 (General_options::parse_wrap): Deleted.
312 (General_options::General_options): Deleted initializer.
313 * options.h (options::String_set): New typedef.
314 (options::parse_set): New function.
315 (DEFINE_set): New macro.
316 (General_options::wrap): Changed to use DEFINE_set. Changed
317 callers of any_wrap_symbols and is_wrap_symbol.
318 (General_options::trace, General_options::trace_symbol):
319 New options.
320 (General_options::any_wrap_symbols, General_options::is_wrap_symbol)
321 (General_options::wrap_symbols_): Deleted.
322 * symtab.cc (Symbol_table::add_from_object): Print trace output.
323
b5be4a7c
DM
3242008-04-17 David S. Miller <davem@davemloft.net>
325
326 * options.cc (General_options::parse_V): New function.
327 * options.h: Add entries for -V and -Qy.
328
155a0dd7
ILT
3292008-04-17 Ian Lance Taylor <iant@google.com>
330
331 * common.cc (Symbol_table::allocate_commons): Remove options
332 parameter. Change caller.
333 (Symbol_table::do_allocate_commons): Remove options parameter.
334 Change caller. Just call do_allocate_commons_list twice.
335 (Symbol_table::do_allocate_commons_list): New function, broken out
336 of do_allocate_commons.
337 * common.h (class Allocate_commons_task): Remove options_ field.
338 Update constructor.
339 * symtab.cc (Symbol_table::Symbol_table): Initialize
340 tls_commons_.
341 (Symbol_table::add_from_object): Put TLS common symbols on
342 tls_commons_ list.
343 (Symbol_table::sized_finalize_symbol): Handle STT_TLS symbols
344 which are IN_OUTPUT_DATA.
345 * symtab.h (class Symbol_table): Add tls_commons_ field. Update
346 allocate_commons and do_allocate_commons declarations. Declare
347 do_allocate_commons_list.
348 * gold.cc (queue_middle_tasks): Update creation of
349 Allocate_commons_task to not pass options.
350 * testsuite/Makefile.am (INCLUDES): Add -I.. .
351 (TLS_TEST_C_FLAGS): New variable.
352 (tls_test_c_pic.o): New target.
353 (tls_test_shared.so): Link in tls_test_c_pic.o.
354 (tls_test_c_pic_ie.o): New target.
355 (tls_test_ie_shared.so): Link in tls_test_c_pic_ie.o.
356 (tls_test_DEPENDENCIES, tls_test_LDADD): Add tls_test_c.o.
357 (tls_test_c.o): New target.
358 (tls_pic_test_DEPENDENCIES): Add tls_test_c_pic.o.
359 (tls_pic_test_LDADD): Likewise.
360 (tls_shared_gd_to_ie_test_DEPENDENCIES): Add tls_test_c_pic.o.
361 (tls_shared_gd_to_ie_test_LDADD): Likewise.
362 (tls_test_c_gnu2.o): New target.
363 (tls_shared_gnu2_gd_to_ie_test_DEPENDENCIES): Add
364 tls_test_c_gnu2.o.
365 (tls_shared_gnu2_gd_to_ie_test_LDADD): Likewise.
366 (tls_test_gnu2_shared.so): Link in tls_test_c_gnu2.o.
367 (tls_test_shared_nonpic.so): Link in tls_test_c.o.
368 * testsuite/tls_test.cc: Include "config.h".
369 (t_last): Call t11_last.
370 * testsuite/tls_test.h (t11, t11_last): Declare.
371 * testsuite/tls_test_c.c: New file.
372 * testsuite/tls_test_main.cc (thread_routine): Call t11.
373 * configure.ac: Check for OpenMP support.
374 * configure, config.in, Makefile.in: Rebuild.
375 * testsuite/Makefile.in: Rebuild.
376
edfbb029
CC
3772008-04-16 Cary Coutant <ccoutant@google.com>
378
379 * i386.cc (Target_i386::define_tls_base_symbol): New function.
380 (Target_i386::tls_base_symbol_defined_): New field.
381 (Target_i386::Scan::local): Define _TLS_MODULE_BASE_ symbol.
382 (Target_i386::Scan::global): Likewise.
383 * symtab.cc (sized_finalize_symbol): Add check for TLS symbol.
384 * x86_64.cc (Target_x86_64::define_tls_base_symbol): New function.
385 (Target_x86_64::tls_base_symbol_defined_): New field.
386 (Target_x86_64::Scan::local): Define _TLS_MODULE_BASE_ symbol.
387 (Target_x86_64::Scan::global): Likewise.
388
f3c69fca
CC
3892008-04-16 Cary Coutant <ccoutant@google.com>
390
391 * symtab.h (Symbol::is_strong_undefined): Removed unused function.
392 (Symbol::needs_plt_entry): Allow weak undefined symbols.
393 (Symbol::needs_dynamic_reloc): Allow weak undefined symbols when
394 building shared libraries.
395 * testsuite/Makefile.am (weak_undef_nonpic_test): New target.
396 (weak_undef_file1_nonpic.o, weak_undef_file2_nonpic.o)
397 (weak_undef_lib_nonpic.so, alt/weak_undef_lib_nonpic.so): New targets.
398 * testsuite/Makefile.in: Rebuild.
399 * testsuite/weak_undef.h: New file.
400 * testsuite/weak_undef_file1.cc: Add extra test cases.
401 * testsuite/weak_undef_file2.cc: Likewise.
402 * testsuite/weak_undef_test.cc: Likewise.
403
7c414435
DM
4042008-04-16 David S. Miller <davem@davemloft.net>
405
32b769e1
DM
406 * sparc.cc (Target_sparc::Scan): Change from struct to class.
407 Add issued_non_pic_error_ field. Declare check_non_pic.
408 (Target_sparc::Scan::check_non_pic): New function.
409 (Target_sparc::Scan::local): Call check_non_pic as appropriate.
410 (Target_sparc::Scan::global): Likewise.
411
11936fb1
DM
412 * configure.ac (FN_PTRS_IN_SO_WITHOUT_PIC): Add sparc64.
413 * configure: Rebuild.
414
7c414435
DM
415 * options.h (DEFINE_enable): New macro.
416 (new_dtags): New enable option.
417 (initfirst, interpose, loadfltr, nodefaultlib,
418 nodelete, nodlopen, nodump): New -z options.
419 * layout.cc (Layout:finish_dynamic_section): If new
420 dtags enabled, emit DT_RUNPATH. Also, emit a
421 DT_FLAGS_1 containing any specified -z flags.
422
85c7bf8b
ILT
4232008-04-16 Ian Lance Taylor <iant@google.com>
424
12c0daef
ILT
425 * copy-relocs.cc: New file.
426 * copy-relocs.h: New file.
427 * reloc.cc: Remove Copy_relocs code.
428 * reloc.h: Likewise.
429 * reloc-types.h (struct Reloc_types) [both versions]: Add
430 get_reloc_addend_noerror.
431 * output.h (class Output_data_reloc<elfcpp::SHT_REL>): Add
432 variants of add_global which take an addend which must be zero.
433 * i386.cc: Include "copy-relocs.h".
434 (class Target_i386): Change type of copy_relocs_ to variable,
435 update initializer.
436 (Target_i386::copy_reloc): Rewrite to pass to Copy_relocs class.
437 Change all callers.
438 (Target_i386::do_finalize_sections): Change handling of
439 copy_relocs_.
440 * sparc.cc: Include "copy-relocs.h".
441 (class Target_sparc): Change type of copy_relocs_ to variable,
442 update initializer.
443 (Target_sparc::copy_reloc): Rewrite to pass to Copy_relocs class.
444 Change all callers.
445 (Target_sparc::do_finalize_sections): Change handling of
446 copy_relocs_.
447 * x86_64.cc: Include "copy-relocs.h".
448 (class Target_x86_64): Change type of copy_relocs_ to variable,
449 update initializer.
450 (Target_x86_64::copy_reloc): Rewrite to pass to Copy_relocs
451 class. Change all callers.
452 (Target_x86_64::do_finalize_sections): Change handling of
453 copy_relocs_.
454 * Makefile.am (CCFILES): Add copy-relocs.cc.
455 (HFILES): Add copy-relocs.h.
456
4f4995b6
ILT
457 * Makefile.in, aclocal.m4, testsuite/Makefile.in: Rebuild.
458
85c7bf8b
ILT
459 * testsuite/script_test_4.sh: Permit leading zeroes.
460
4f2a9edd
ILT
4612008-04-15 Ian Lance Taylor <iant@google.com>
462
e6188289
ILT
463 * script-sections.cc (Script_sections::create_segments): Use
464 header_size_adjustment even when there is enough room for the
465 headers.
466 * testsuite/script_test_4.sh: New file.
467 * testsuite/script_test_4.t: New file.
468 * testsuite/Makefile.am (check_SCRIPTS): Add script_test_4.sh.
469 (check_DATA): Add script_test_4.stdout.
470 (MOSTLYCLEANFILES): Likewise.
471 (script_test_4): New target.
472 (script_test_4.stdout): New target.
473 * testsuite/Makefile.in: Rebuild.
474
4f2a9edd
ILT
475 * sparc.cc: Add definitions for Output_data_plt_sparc class
476 constants.
477
f5314dd5
DM
4782008-04-14 David S. Miller <davem@davemloft.net>
479
480 * sparc.cc: New file.
481 * Makefile.am (TARGETSOURCES): Add sparc.cc
482 (ALL_TARGETOBJS): Add sparc.$(OBJEXT)
483 * configure.tgt: Document targ_extra_size and
484 targ_extra_big_endian. Add entries for sparc-* and
485 sparc64-*.
486 * configure.ac: Handle targ_extra_size and
487 targ_extra_big_endian.
488 * Makefile.in: Rebuild.
489 * configure: Likewise.
490 * po/POTFILES.in: Likewise.
491 * po/gold.pot: Likewise.
492
154e0e9a
ILT
4932008-04-14 Ian Lance Taylor <iant@google.com>
494
495 * layout.cc (Layout::Layout): Initialize sections_are_attached_.
496 (Layout::get_output_section): Ignore SHF_WRITE and SHF_EXECINSTR
497 in the name/type/flags to section mapping. Don't call
498 allocate_output_section.
499 (Layout::choose_output_section): Change parameter from adjust_name
500 to is_input_section. Don't permit input sections after sections
501 are attached to segments. Don't call allocate_output_section.
502 (Layout::layout_eh_frame): Call update_flags_for_input_section,
503 not write_enable_output_section.
504 (Layout::make_output_section): Don't push to
505 unattached_section_list_ nor call attach_to_segment. Call
506 attach_section_to_segment if sections are attached.
507 (Layout::attach_sections_to_segments): New function.
508 (Layout::attach_section_to_segment): New function.
509 (Layout::attach_allocated_section_to_segment): Rename from
510 attach_to_segment. Remove flags parameter.
511 (Layout::allocate_output_section): Remove function.
512 (Layout::write_enable_output_section): Remove function.
513 * layout.h (class Layout): Update for above changes. Add new
514 field sections_are_attached_.
515 * output.h (Output_section::update_flags_for_input_section): New
516 function.
517 * output.cc (Output_section::add_input_section): Call
518 update_flags_for_input_section.
519 * gold.cc (queue_middle_tasks): Call attach_sections_to_segments.
520
009a67a2
CC
5212008-04-11 Cary Coutant <ccoutant@google.com>
522
523 * i386.cc (Target_i386::got_mod_index_entry): Restore code previously
524 thought unnecessary.
525 * x86_64.cc (Target_x86_64::got_mod_index_entry): Likewise.
526
759b1a24
ILT
5272008-04-11 Ian Lance Taylor <iant@google.com>
528
529 * output.h (class Output_section_data): Remove inline definition
530 of set_addralign.
531 * output.cc (Output_section_data::set_addralign): New function.
532
c2b45e22
CC
5332008-04-11 Cary Coutant <ccoutant@google.com>
534
535 Add support for TLS descriptors for i386 and x86_64.
536 * i386.cc (Target_i386::Relocate::tls_desc_gd_to_ie): New function.
537 (Target_i386::Relocate::tls_desc_gd_to_le): New function.
538 (Target_i386::Got_type): Add GOT_TYPE_TLS_NOFFSET and
539 GOT_TYPE_TLS_DESC.
540 (Target_i386::got_mod_index_entry): Remove unnecessary code.
541 (Target_i386::Scan::local): Implement R_386_TLS_GOTDESC and
542 R_386_TLS_DESC_CALL relocations. Fix problem with initial-exec
543 relocations.
544 (Target_i386::Scan::global): Fix problem with GD-to-IE relaxation.
545 Implement R_386_TLS_GOTDESC and R_386_TLS_DESC_CALL relocations;
546 Fix problem with initial-exec relocations.
547 (Target_i386::Relocate::relocate_tls): Likewise.
548 (Target_i386::Relocate::tls_gd_to_ie): Fix problem with GD-to-IE
549 relaxation.
550 * output.cc (Output_data_dynamic::Dynamic_entry::write): Add
551 support for section-plus-offset dynamic table entries.
552 * output.h (Output_data_dynamic::add_section_plus_offset): New function.
553 (Output_data_dynamic::Dynamic_entry): Add support for
554 section-plus-offset dynamic table entries.
555 (Output_data_dynamic::Classification): Likewise.
556 (Output_data_dynamic::classification_): Renamed offset_.
557 * x86_64.cc (Target_x86_64::Relocate::tls_desc_gd_to_ie): New function.
558 (Target_x86_64::Relocate::tls_desc_gd_to_le): New function.
559 (Target_x86_64::make_plt_section): New function.
560 (Target_x86_64::reserve_tlsdesc_entries): New function.
561 (Output_data_plt_x86_64::Output_data_plt_x86_64): Add new parameter.
562 (Output_data_plt_x86_64::reserve_tlsdesc_entry): New function.
563 (Output_data_plt_x86_64::has_tlsdesc_entry): New function.
564 (Output_data_plt_x86_64::get_tlsdesc_got_offset): New function.
565 (Output_data_plt_x86_64::get_tlsdesc_plt_offset): New function.
566 (Output_data_plt_x86_64::tlsdesc_plt_entry): New field.
567 (Output_data_plt_x86_64::set_final_data_size): Move out of line;
568 add extra PLT entry for TLS descriptors.
569 (Output_data_plt_x86_64::got_): New field.
570 (Output_data_plt_x86_64::tlsdesc_got_offset_): New field.
571 (Output_data_plt_x86_64::Output_data_plt_x86_64): Initialize new
572 fields.
573 (Output_data_plt_x86_64::do_write): Write extra PLT entry for TLS
574 descriptors.
575 (Target_x86_64::make_plt_entry): Factor out make_plt_section.
576 (Target_x86_64::got_mod_index_entry): Remove unnecessary code.
577 (Target_x86_64::Scan::local): Implement R_386_TLS_GOTDESC and
578 R_386_TLS_DESC_CALL relocations.
579 (Target_x86_64::Scan::global): Likewise.
580 (Target_x86_64::do_finalize_sections): Add dynamic table entries
581 for TLS descriptors.
582 (Relocate::relocate_tls): Fix problem with GD-to-IE relaxation.
583 Implement R_386_TLS_GOTDESC and R_386_TLS_DESC_CALL relocations.
584 (Target_x86_64::Relocate::tls_gd_to_ie): Fix problem with
585 GD-to-IE relaxation.
586 * configure.ac: Export new conditional variables TLS_GNU2_DIALECT
587 and TLS_DESCRIPTORS.
588 * Makefile.in: Rebuild.
589 * configure: Rebuild.
590 * testsuite/Makefile.am (tls_shared_gd_to_ie_test): New target.
591 (tls_test_shared2.so): New target.
592 (tls_shared_gd_to_ie_test_SOURCES): New variable.
593 (tls_shared_gd_to_ie_test_DEPENDENCIES): New variable.
594 (tls_shared_gd_to_ie_test_LDFLAGS): New variable.
595 (tls_shared_gd_to_ie_test_LDADD): New variable.
596 (tls_shared_gnu2_gd_to_ie_test): New target.
597 (tls_test_gnu2.o, tls_test_file2_gnu2.o, tls_test_gnu2_shared2.so):
598 New targets.
599 (tls_shared_gnu2_gd_to_ie_test_SOURCES): New variable.
600 (ls_shared_gnu2_gd_to_ie_test_DEPENDENCIES): New variable.
601 (tls_shared_gnu2_gd_to_ie_test_LDFLAGS): New variable.
602 (tls_shared_gnu2_gd_to_ie_test_LDADD): New variable.
603 (tls_shared_gnu2_test): New target.
604 (tls_test_gnu2_shared.so): New target.
605 (tls_shared_gnu2_test_SOURCES): New variable.
606 (tls_shared_gnu2_test_DEPENDENCIES): New variable.
607 (tls_shared_gnu2_test_LDFLAGS): New variable.
608 (tls_shared_gnu2_test_LDADD): New variable.
609 * testsuite/Makefile.in: Rebuild.
610 * testsuite/Makefile.
611
83bfb6b7
ILT
6122008-04-11 Ian Lance Taylor <iant@google.com>
613
614 * testsuite/Makefile.am (justsyms_2r.o): Add dependency on
615 justsyms.t.
616 * testsuite/Makefile.in: Rebuild.
617
618 * testsuite/script_test_2a.cc (script_test_string_a): Make 8 bytes
619 long.
620 * testsuite/script_test_2.cc (main): Adjust test.
621
706e1f5e
ILT
6222008-04-11 David S. Miller <davem@davemloft.net>
623 Ian Lance Taylor <iant@google.com>
624
625 * options.h (General_options): Add entries for '-Y' and
626 '-relax'.
627 * options.cc (General_options:finalize): If -Y was used, add those
628 entries to the library path instead of the default "/lib" and
629 "/usr/lib".
630
7c98e6bb
DM
6312008-04-11 David S. Miller <davem@davemloft.net>
632
633 * testsuite/justsyms.t: Start at 0x100.
634 * testsuite/justsyms_1.cc: Adjust justsyms_string assertion.
83bfb6b7
ILT
635 * testsuite/script_test_2b.cc (script_test_string_b): Make 8 bytes
636 long.
637 * testsuite/script_test_2.cc: Adjust string and section length
638 checks.
7c98e6bb 639
99a37bfd
ILT
6402008-04-09 Ian Lance Taylor <iant@google.com>
641
2cefc357
ILT
642 PR gold/5996
643 * script-sections.cc (Sections_element::allocate_to_segment): Add
644 orphan parameter.
645 (Output_section_definition::allocate_to_segment): Likewise.
646 (Orphan_output_section::allocate_to_segment): Likewise.
647 (Script_sections::attach_sections_using_phdrs_clause): Don't
648 propagate non-PT_LOAD segments to orphan sections.
649 * testsuite/Makefile.am (script_test_3.stdout): Generate using
650 readelf rather than objdump.
651 * testsuite/script_test_3.sh: Adjust accordingly. Test that
652 .interp section and PT_INTERP segment are the same size.
653 * testsuite/Makefile.in: Rebuild.
654
99a37bfd
ILT
655 * symtab.cc (Symbol_table::add_from_dynobj): Only look for weak
656 aliases for symbols defined in the same object.
657 * testsuite/Makefile.am (check_PROGRAMS): Add weak_alias_test.
658 (weak_alias_test_SOURCES): New variable.
659 (weak_alias_test_DEPENDENCIES): New variable.
660 (weak_alias_test_LDFLAGS): New variable.
661 (weak_alias_test_LDADD): New variable.
662 (weak_alias_test_1_pic.o, weak_alias_test_1.so): New targets.
663 (weak_alias_test_2_pic.o, weak_alias_test_2.so): New targets.
664 (weak_alias_test_3.o): New target.
665 (weak_alias_test_4_pic.o, weak_alias_test_4.so): New targets.
666 * testsuite/weak_alias_test_main.cc: New file.
667 * testsuite/weak_alias_test_1.cc: New file.
668 * testsuite/weak_alias_test_2.cc: New file.
669 * testsuite/weak_alias_test_3.cc: New file.
670
780e49c5
ILT
6712008-04-08 Ian Lance Taylor <iant@google.com>
672
cdb0b8f5
ILT
673 * options.h (class General_options): Add --noinhibit-exec option.
674 * main.cc (main): Check --noinhibit-exec.
675
0864d551
ILT
676 * options.h (class General_options): Define --wrap as a special
677 option. Add wrap_symbols_ field.
678 (General_options::any_wrap_symbols): New function.
679 (General_options::is_wrap_symbol): New function.
680 * options.cc (General_options::parse_wrap): New function.
681 (General_options::General_options): Initialize wrap_symbols_.
682 * symtab.cc (Symbol_table::wrap_symbol): New function.
683 (Symbol_table::add_from_object): Handle --wrap.
684 * symtab.h (class Symbol_table): Declare wrap_symbol.
685 * target.h (Target::wrap_char): New function.
686 (Target::Target_info): Add wrap_char field.
687 * i386.cc (Target_i386::i386_info): Initialize wrap_char.
688 * x86_64.cc (Target_x86_64::x86_64_info): Likewise.
689 * testsuite/testfile.cc (Target_test::test_target_info):
690 Likewise.
691
789aa6de
ILT
692 * errors.cc (Errors::undefined_symbol): Mention symbol version if
693 there is one.
694
2c38906f
ILT
695 * layout.h (class Layout): Add added_eh_frame_data_ field.
696 * layout.cc (Layout::Layout): Initialize new field.
697 (Layout::layout_eh_frame): Don't add eh_frame_data_ to .eh_frame
698 output section until we find a section we merged successfully.
699 * object.cc (Sized_relobj::check_eh_frame_flags): Don't require
700 that the size be non-zero.
701
780e49c5
ILT
702 * merge.cc (Object_merge_map::get_output_offset): Remove inline
703 qualifier.
704
7fcd0256
ILT
7052008-04-08 Craig Silverstein <csilvers@google.com>
706
707 * configure.ac: Export new conditional variable HAVE_ZLIB.
708 * testsuite/Makefile.am (flagstest_o_specialfile): Condition
709 on HAVE_ZLIB.
710 (flagstest_o_specialfile_and_compress_debug_sections): Likewise.
711 * configure, Makefile.in, testsuite/Makefile.in: Rebuild.
712
6835af53
ILT
7132008-04-07 Ian Lance Taylor <iant@google.com>
714
e24f324c
ILT
715 * version.cc (version_string): Set to "1.5".
716
a036edd8
ILT
717 * x86_64.cc (Target_x86_64::Scan): Change from struct to class.
718 Add issued_non_pic_error_ field. Declare check_non_pic.
719 (Target_x86_64::Scan::check_non_pic): New function.
720 (Target_x86_64::Scan::local): Call check_non_pic as appropriate.
721 (Target_x86_64::Scan::global): Likewise.
722
624f8810
ILT
723 * output.cc (Output_reloc<SHT_REL>::local_section_offset): Add
724 addend parameter. Change caller. Handle merge sections.
725 (Output_reloc<SHT_REL>::symbol_value): Change parameter type from
726 Address to Addend. Don't add in the result of
727 local_section_offset, pass down the addend and use the returned
728 value.
729 * output.h (class Output_reloc<SHT_REL>): Add Addend typedef.
730 Update declarations of local_section_offset and symbol_value.
731 * testsuite/two_file_test_1.cc (t18): New function.
732 * testsuite/two_file_test_2.cc (f18): New function.
733 * testsuite/two_file_test_main.cc (main): Call t18.
734 * testsuite/two_file_test.h (t18, f18): Declare.
735
6835af53
ILT
736 * configure.ac: Don't test for objdump, c++filt, or readelf.
737 * testsuite/Makefile.am: Remove READELF and OBJDUMP_AND_CPPFILT
738 conditionals.
739 (TEST_READELF): New variable.
740 (TEST_OBJDUMP, TEST_CXXFILT, TEST_STRIP): New variables.
741 (check_PROGRAMS): Add two_file_strip_test.
742 (two_file_strip_test): New target.
743 (check_PROGRAMS): Add two_file_same_shared_strip_test.
744 (two_file_same_shared_strip_test_SOURCES): New variable.
745 (two_file_same_shared_strip_test_DEPENDENCIES): New variable.
746 (two_file_same_shared_strip_test_LDFLAGS): New variable.
747 (two_file_same_shared_strip_test_LDADD): New variable.
748 (two_file_shared_strip.so): New target.
749 (ver_test_2.syms, ver_test_4.syms): Use TEST_READELF.
750 (ver_test_5.syms, ver_test_7.syms): Likewise.
751 (ver_matching_test.stdout): Use TEST_OBJDUMP and TEST_CXXFILT.
752 (strip_test_3.stdout): Use TEST_OBJDUMP.
753 * configure, Makefile.in, testsuite/Makefile.in: Rebuild.
754
86925eef
CC
7552008-04-04 Cary Coutant <ccoutant@google.com>
756
757 * symtab.h (Symbol::is_weak_undefined): New function.
758 (Symbol::is_strong_undefined): New function.
759 (Symbol::is_absolute): New function.
760 (Symbol::needs_plt_entry): Exclude weak undefined symbols.
761 (Symbol::needs_dynamic_reloc): Exclude weak undefined and
762 absolute symbols.
763 * testsuite/Makefile.am (check_PROGRAMS): Add weak_undef_test.
764 (weak_undef_test): New target.
765 * testsuite/Makefile.in: Rebuild.
766 * testsuite/weak_undef_file1.cc: New file.
767 * testsuite/weak_undef_file2.cc: New file.
768 * testsuite/weak_undef_test.cc: New file.
769
126f3ece
ILT
7702008-04-03 Craig Silverstein <csilvers@google.com>
771
772 * compressed_output.h (class Output_compressed_section): Use
773 unsigned buffer.
774 * compressed_output.cc (zlib_compress): Use unsigned buffers,
775 add zlib header.
776 (zlib_compressed_suffix): Removed.
777 (Output_compressed_section::set_final_data_size): Use unsigned
778 buffers.
779 * testsuite/Makefile.am (flagstest_compress_debug_sections):
780 Fix linker invocation.
781 (flagstest_o_specialfile_and_compress_debug_sections):
782 Likewise.
783 * testsuite/Makefile.in: Regenerated.
784
deae2a14
DM
7852008-04-02 David S. Miller <davem@davemloft.net>
786
787 * dwarf_reader.cc (Sized_dwarf_line_info::read_header_prolog,
788 Sized_dwarf_line_info::process_one_opcode): Use Swap_unaligned.
789
70752818
ILT
7902008-04-02 Craig Silverstein <csilvers@google.com>
791
792 * TODO: New file.
793
39d0cb0e
ILT
7942008-04-02 Ian Lance Taylor <iant@google.com>
795
796 * fileread.cc (File_read::find_view): Add byteshift and vshifted
797 parameters. Update for new key type to views_. Change all
798 callers.
799 (File_read::read): Adjust for byteshift in returned view.
800 (File_read::add_view): New function, broken out of
801 find_and_make_view.
802 (File_read::make_view): New function, broken out of
803 find_and_make_view.
804 (File_read::find_or_make_view): Add offset and aligned
805 parameters. Rewrite accordingly. Change all callers.
806 (File_read::get_view): Add offset and aligned parameters. Adjust
807 for byteshift in return value.
808 (File_read::get_lasting_view): Likewise.
809 * fileread.h (class File_read): Update declarations.
810 (class File_read::View): Add byteshift_ field. Add byteshift to
811 constructor. Add byteshift method.
812 * archive.h (Archive::clear_uncached_views): New function.
813 (Archive::get_view): Add aligned parameter. Change all callers.
814 * object.h (Object::get_view): Add aligned parameter. Change all
815 callers.
816 (Object::get_lasting_view): Likewise.
817
818 * fileread.cc (File_read::release): Don't call clear_views if
819 there are multiple objects.
820 * fileread.h (File_read::clear_uncached_views): New function.
821 * archive.cc (Add_archive_symbols::run): Call clear_uncached_views
822 on the archive.
823
a1207466
CC
8242008-03-31 Cary Coutant <ccoutant@google.com>
825
826 Add thin archive support.
827 * archive.cc (Archive::armagt): New const.
828 (Archive::setup): Remove task parameter and calls to unlock.
829 (Archive::unlock_nested_archives): New function.
830 (Archive::read_header): Add nested_off parameter. Change
831 all callers.
832 (Archive::interpret_header): Likewise.
833 (Archive::include_all_members): Change to handle thin
834 archives.
835 (Archive::include_member): Likewise.
836 * archive.h (Archive::Archive): Add new parameters and
837 initializers.
838 (Archive::armagt): New const.
839 (Archive::setup): Remove task parameter.
840 (Archive::unlock_nested_archives): New function.
841 (Archive::read_header): Add nested_off parameter.
842 (Archive::interpret_header): Likewise.
843 (Archive::Nested_archive_table): New typedef.
844 (Archive::is_thin_archive_): New field.
845 (Archive::nested_archives_): New field.
846 (Archive::options_): New field.
847 (Archive::dirpath_): New field.
848 (Archive::task_): New field.
849 * readsyms.cc (Read_symbols::do_read_symbols): Add check
850 for thin archives. Pass additional parameters to
851 Archive::Archive. Unlock the archive file after calling
852 Archive::setup.
853
479f6503
ILT
8542008-03-29 Ian Lance Taylor <iant@google.com>
855
686c8caf
ILT
856 * symtab.cc (Symbol_table::do_define_as_constant): Don't force a
857 version symbol to be local.
858 * testsuite/ver_test_4.sh: New file.
859 * testsuite/Makefile.am (check_SCRIPTS): Add ver_test_4.sh.
860 (check_DATA): Add ver_test_4.syms.
861 (ver_test_4.syms): New target.
862 * testsuite/Makefile.in: Rebuild.
863
ab794b6b
ILT
864 * output.cc
865 (Output_section::Input_section_sort_entry::has_priority): New
866 function.
867 (Output_section::Input_section_sort_entry::match_file_name): New
868 function.
869 (Output_section::Input_section_sort_entry::match_section_name):
870 Remove.
871 (Output_section::Input_section_sort_entry::match_section_name_prefix):
872 Remove.
873 (Output_section::Input_section_sort_entry::match_section_file):
874 Remove.
875 (Output_section::Input_section_sort_compare::operator()): Rewrite
876 using new Input_section_sort_entry functions. Sort crtbegin and
877 crtend first. Sort sections with no priority before sections with
878 a priority.
879 * testsuite/initpri1.c (d3): Check j != 4.
880 (cd5): New constructor/destructor function.
881 (main): Check j != 2.
882
479f6503
ILT
883 * symtab.cc (Symbol_table::add_from_object): If we don't use the
884 new symbol when resolving, don't call set_is_default.
885 * testsuite/ver_test_7.cc: New file.
886 * testsuite/ver_test_7.sh: New file.
887 * testsuite/Makefile.am (ver_test_7.so): New target.
888 (ver_test_7.o): New target.
889 (check_SCRIPTS): Add ver_test_7.sh.
890 (check_DATA): Add ver_test_7.syms.
891 (ver_test_7.syms): New target.
892
2fd32231
ILT
8932008-03-28 Ian Lance Taylor <iant@google.com>
894
895 * layout.cc (Layout::layout): If we see an input section with a
896 name that needs sorting, set the must_sort flag for the output
897 section.
898 (Layout::make_output_section): If the name of the output section
899 indicates that it might require sorting, set the may_sort flag.
900 * output.h (Output_section::may_sort_attached_input_sections): New
901 function.
902 (Output_section::set_may_sort_attached_input_sections): New
903 function.
904 (Output_section::must_sort_attached_input_sections): New
905 function.
906 (Output_section::set_must_sort_attached_input_sections): New
907 function.
908 (class Output_section): Declare Input_section_sort_entry. Define
909 Input_section_sort_compare. Declare
910 sort_attached_input_sections. Add new fields:
911 may_sort_attached_input_sections_,
912 must_sort_attached_input_sections_,
913 attached_input_sections_are_sorted_.
914 * output.cc (Output_section::Output_section): Initialize new
915 fields.
916 (Output_section::add_input_section): Add an entry to
917 input_sections_ if may_sort or must_sort are true.
918 (Output_section::set_final_data_size): Call
919 sort_attached_input_sections if necessary.
920 (Output_section::Input_section_sort_entry): Define new class.
921 (Output_section::Input_section_sort_compare::operator()): New
922 function.
923 (Output_section::sort_attached_input_sections): New function.
924 * configure.ac: Check whether the compiler supports constructor
925 priorities. Define a CONSTRUCTOR_PRIORITY automake conditional.
926 * testsuite/initpri1.c: New file.
927 * testsuite/Makefile.am (check_PROGRAMS): Add initpri1 if
928 CONSTRUCTOR_PRIORITY.
929 (initpri1_SOURCES, initpri1_DEPENDENCIES): New variables.
930 (initpri1_LDFLAGS): New variable.
931 * configure, Makefile.in, testsuite/Makefile.in: Rebuild.
932
18e6b24e
ILT
9332008-03-27 Ian Lance Taylor <iant@google.com>
934
49bdd526
ILT
935 * common.cc (Sort_commons::operator): Correct sorting algorithm.
936 * testsuite/common_test_1.c: New file.
937 * testsuite/Makefile.am (check_PROGRAMS): Add common_test_1.
938 (common_test_1_SOURCES): New variable.
939 (common_test_1_DEPENDENCIES): New variable.
940 (common_test_1_LDFLAGS): New variable.
941
18e6b24e
ILT
942 * symtab.cc (Symbol_table::add_from_object): Handle saw_undefined_
943 and commons_ correctly when NAME/VERSION does not override
944 NAME/NULL.
945 * testsuite/ver_test_6.c: New file.
946 * testsuite/Makefile.am (check_PROGRAMS): Add ver_test_6
947 (ver_test_6_SOURCES, ver_test_6_DEPENDENCIES): New variables.
948 (ver_test_6_LDFLAGS, ver_test_6_LDADD): New variables.
949
04bf7072
ILT
9502008-03-26 Ian Lance Taylor <iant@google.com>
951
5871526f
ILT
952 * symtab.cc (Symbol_table::add_from_relobj): Don't set the version
953 of an undefined symbol from a version script.
954 * testsuite/Makefile.am (ver_test_5.so): New target.
955 (ver_test_5.o): New target.
956 (check_SCRIPTS): Add ver_test_5.sh.
957 (check_DATA): Add ver_test_5.syms.
958 (ver_test_5.syms): New target.
959 * testsuite/ver_test_5.cc: New file.
960 * testsuite/ver_test_5.script: New file.
961 * testsuite/ver_test_5.sh: New file.
962 * Makefile.in, testsuite/Makefile.in: Rebuild.
963
04bf7072
ILT
964 PR gold/5986
965 Fix problems building gold with gcc 4.3.0.
966 * gold.h (TEMPLATE_ATTRIBUTE_PRINTF_4): Define.
967 (gold_error_at_location, gold_warning_at_location): Use it.
968 * configure.ac: Check whether we can compile and use a template
969 function with a printf attribute.
970 * x86_64.cc (Target_x86_64::do_code_fill): Swap out a 32-bit value
971 when jumping over bytes.
972 * object.cc: Instantiate Object::read_section_data.
973 * debug.h: Include <cstring>
974 * dwarf_reader.cc: Include <algorithm>
975 * main.cc: Include <cstring>.
976 * options.cc: Include <cstring>.
977 * output.cc: Include <cstring>.
978 * script.cc: Include <cstring>.
979 * script.h: Include <string>.
980 * symtab.cc: Include <cstring> and <algorithm>.
981 * target-select.cc: Include <cstring>.
982 * version.cc: Include <string>.
983 * testsuite/testmain.cc: Include <cstdlib>.
984 * configure, config.in: Rebuild.
985
874c5b28
ILT
9862008-03-25 Ian Lance Taylor <iant@google.com>
987
819d6c3a
ILT
988 * options.cc: Include "../bfd/bfdver.h".
989 (options::help): Print bug reporting address.
990
f4b2c6f5
ILT
991 * version.cc (print_version): Adjust output for current value of
992 BFD_VERSION_STRING.
993
994 * NEWS: New file.
995
e96caa79
ILT
996 * options.cc (options::help): Print list of supported targets.
997 * target-select.h: Include <vector>.
998 (class Target_selector): Make machine_, size_, and is_big_endian_
999 fields const. Add bfd_name_ and instantiated_target_ fields.
1000 (Target_selector::Target_selector): Add bfd_name parameter.
1001 (Target_selector::recognize): Make non-virtual, call
1002 do_recognize.
1003 (Target_selector::recognize_by_name): Make non-virtual, call
1004 do_recognize_by_name.
1005 (Target_selector::supported_names): New function.
1006 (Target_selector::bfd_name): New function.
1007 (Target_selector::do_instantiate_target): New pure virtual
1008 function.
1009 (Target_selector::do_recognize): New virtual function.
1010 (Target_selector::do_recognize_by_name): New virtual function.
1011 (Target_selector::instantiate_target): New private function.
1012 (supported_target_names): Declare.
1013 * target-select.cc (Target_selector::Target_selector): Update for
1014 new parameter and fields.
1015 (select_target_by_name): Check that the name matches before
1016 calling recognize_by_name.
1017 (supported_target_names): New function.
1018 * i386.cc (class Target_selector_i386): Update Target_selector
1019 constructor call. Remove recognize and recognize_by_name. Add
1020 do_instantiate_target.
1021 * x86_64.cc (class Target_selector_x86_64): Likewise.
1022 * testsuite/testfile.cc (class Target_selector_test): Update for
1023 changes to Target_selector.
1024
874c5b28
ILT
1025 * README: Rewrite, with some notes on unsupported features.
1026
0a65a3a7
CC
10272008-03-24 Cary Coutant <ccoutant@google.com>
1028
1029 * i386.cc (Target_i386::Got_type): New enum declaration.
1030 (Target_i386::Scan::local): Updated callers of Output_data_got
1031 member functions.
1032 (Target_i386::Scan::global): Likewise.
1033 (Target_i386::Relocate::relocate): Likewise.
1034 (Target_i386::Relocate::relocate_tls): Likewise.
1035 * object.h (Got_offset_list): New class.
1036 (Sized_relobj::local_has_got_offset): Added got_type parameter.
1037 (Sized_relobj::local_got_offset): Likewise.
1038 (Sized_relobj::set_local_got_offset): Likewise.
1039 (Sized_relobj::local_has_tls_got_offset): Removed.
1040 (Sized_relobj::local_tls_got_offset): Removed.
1041 (Sized_relobj::set_local_tls_got_offset): Removed.
1042 (Sized_relobj::Local_got_offsets): Changed to store a list of offsets.
1043 * output.cc (Output_data_got::add_global): Added got_type parameter.
1044 (Output_data_got::add_global_with_rel): Likewise.
1045 (Output_data_got::add_global_with_rela): Likewise.
1046 (Output_data_got::add_global_pair_with_rel): New function.
1047 (Output_data_got::add_global_pair_with_rela): New function.
1048 (Output_data_got::add_local): Added got_type parameter.
1049 (Output_data_got::add_local_with_rel): Likewise.
1050 (Output_data_got::add_local_with_rela): Likewise.
1051 (Output_data_got::add_local_pair_with_rel): New function.
1052 (Output_data_got::add_local_pair_with_rela): New function.
1053 (Output_data_got::add_global_tls): Removed.
1054 (Output_data_got::add_global_tls_with_rel): Removed.
1055 (Output_data_got::add_global_tls_with_rela): Removed.
1056 (Output_data_got::add_local_tls): Removed.
1057 (Output_data_got::add_local_tls_with_rel): Removed.
1058 (Output_data_got::add_local_tls_with_rela): Removed.
1059 * output.h (Output_data_got::add_global): Added got_type parameter.
1060 (Output_data_got::add_global_with_rel): Likewise.
1061 (Output_data_got::add_global_with_rela): Likewise.
1062 (Output_data_got::add_global_pair_with_rel): New function.
1063 (Output_data_got::add_global_pair_with_rela): New function.
1064 (Output_data_got::add_local): Added got_type parameter.
1065 (Output_data_got::add_local_with_rel): Likewise.
1066 (Output_data_got::add_local_with_rela): Likewise.
1067 (Output_data_got::add_local_pair_with_rel): New function.
1068 (Output_data_got::add_local_pair_with_rela): New function.
1069 (Output_data_got::add_global_tls): Removed.
1070 (Output_data_got::add_global_tls_with_rel): Removed.
1071 (Output_data_got::add_global_tls_with_rela): Removed.
1072 (Output_data_got::add_local_tls): Removed.
1073 (Output_data_got::add_local_tls_with_rel): Removed.
1074 (Output_data_got::add_local_tls_with_rela): Removed.
1075 * resolve.cc (Symbol::override_base_with_special): Removed
1076 reference to has_got_offset_ field.
1077 * symtab.cc (Symbol::init_fields): Replaced initialization
1078 of got_offset_ with got_offsets_. Removed initialization
1079 of has_got_offset_
53fcba31 1080 * symtab.h (Symbol::has_got_offset): Aded got_type parameter.
0a65a3a7
CC
1081 (Symbol::got_offset): Likewise.
1082 (Symbol::set_got_offset): Likewise.
1083 (Symbol::has_tls_got_offset): Removed.
1084 (Symbol::tls_got_offset): Removed.
1085 (Symbol::set_tls_got_offset): Removed.
1086 (Symbol::got_offset_): Removed.
1087 (Symbol::tls_mod_got_offset_): Removed.
1088 (Symbol::tls_pair_got_offset_): Removed.
1089 (Symbol::got_offsets_): New field.
1090 (Symbol::has_got_offset): Removed.
1091 (Symbol::has_tls_mod_got_offset): Removed.
1092 (Symbol::has_tls_pair_got_offset): Removed.
1093 * x86_64.cc (Target_x86_64::Got_type): New enum declaration.
1094 (Target_x86_64::Scan::local): Updated callers of Output_data_got
1095 member functions.
1096 (Target_x86_64::Scan::global): Likewise.
1097 (Target_x86_64::Relocate::relocate): Likewise.
1098 (Target_x86_64::Relocate::relocate_tls): Likewise.
1099
bd52eafb
BE
11002008-03-25 Ben Elliston <bje@au.ibm.com>
1101
1102 * yyscript.y: Fix spelling error in comment.
1103
8b105e34
ILT
11042008-03-24 Ian Lance Taylor <iant@google.com>
1105
8ed814a9
ILT
1106 * options.h (class General_options): Define build_id option.
1107 * layout.h (class Layout): Declare write_build_id, create_note,
1108 create_build_id. Add build_id_note_ member.
1109 * layout.cc: Include <cerrno>, <fcntl.h>, <unistd.h>,
1110 "libiberty.h", "md5.h", "sha1.h".
1111 (Layout::Layout): Initialize eh_frame_data_,
1112 eh_frame_hdr_section_, and build_id_note_.
1113 (Layout::finalize): Call create_build_id.
1114 (Layout::create_note): New function, broken out of
1115 Layout::create_gold_note.
1116 (Layout::create_gold_note): Call create_note.
1117 (Layout::create_build_id): New function.
1118 (Layout::write_build_id): New function.
1119 (Close_task_runner::run): Call write_build_id.
1120
8b105e34
ILT
1121 * x86_64.cc: Correct license to GPLv3.
1122
086a1841
ILT
11232008-03-23 Ian Lance Taylor <iant@google.com>
1124
1125 * options.cc: Include "demangle.h".
1126 (parse_optional_string): New function.
1127 (parse_long_option): Handle takes_optional_argument.
1128 (parse_short_option): Update dash_z initializer. Handle
1129 takes_optional_argument.
1130 (General_options::General_options): Initialize do_demangle_.
1131 (General_options::finalize): Set do_demangle_. Handle demangling
1132 style.
1133 * options.h (parse_optional_string): Declare.
1134 (struct One_option): Add optional_arg field. Update constructor.
1135 Update call constructor calls. Add takes_optional_argument
1136 function.
1137 (DEFINE_var): Add optional_arg__ parameter. Change all callers.
1138 (DEFINE_optional_string): Define.
1139 (General_options::demangle): Change from DEFINE_bool to
1140 DEFINE_optional_string.
1141 (General_options::no_demangle): New function.
1142 (General_options::do_demangle): New function.
1143 (General_options::set_do_demangle): New function.
1144 (General_options::execstack_status_): Move definition to end of
1145 class definition.
1146 (General_options::static_): Likewise.
1147 (General_options::do_demangle_): New field.
1148 * object.cc (big_endian>::get_symbol_location_info): Call
1149 Options::do_demangle, not Options::demangle.
1150 * symtab.cc (demangle): Likewise.
1151
cbb93e63
ILT
11522008-03-22 Ian Lance Taylor <iant@google.com>
1153
1154 * gold.h: Include <cstddef> and <sys/types.h>
1155 * options.h: Include <cstring>.
1156
ec531623
ILT
11572008-03-21 Ian Lance Taylor <iant@google.com>
1158
1159 * Added source code to GNU binutils.
1160
This page took 0.078496 seconds and 4 git commands to generate.