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