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