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