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