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