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