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