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