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