gas/testsuite/
[deliverable/binutils-gdb.git] / gold / ChangeLog
CommitLineData
e09ad04a
ILT
12008-05-29 Kris Van Hees <kris.van.hees@oracle.com>
2
3 PR 6407
4 * target-reloc.h (relocate_for_relocatable): Fix new_offset
5 calculation.
6
62b01cb5
ILT
72008-05-28 Caleb Howe <cshowe@google.com>
8
9 * reduced_debug_output.cc: New file.
10 * reduced_debug_output.h: New file.
11 * options.h (class General_optoins): Add --strip-debug-non-line.
12 * options.cc (General_options::finalize): Add strip_debug_non_line
13 to the strip heirarchy.
14 * layout.h (class Layout): Add debug_abbrev_ and debug_info_
15 fields.
16 * layout.cc: Include "reduced_debug_output.h".
17 (Layout::Layout): Initialize new fields.
18 (line_only_debug_sections): New static array.
19 (is_lines_only_debug_sections): New static inline function.
20 (Layout::include_section): Handle --strip-debug-non-line.
21 (Layout::make_output_section): If --strip-debug-non-line, build
22 new output sections for .debug_abbrev and .debug_info.
23 * dwarf_reader.cc (read_unsigned_LEB_128): Move to namespace
24 gold. Warn about possible overflow.
25 (read_signed_LEB_128): Likewise.
26 * dwarf_reader.h: (read_unsigned_LEB_128): Declare.
27 (read_signed_LEB_128): Declare.
28 * Makefile.am (CCFILES): Add reduced_debug_output.cc.
29 (HFILES): Add reduced_debug_output.h.
30 * Makefile.in: Rebuild.
31
7d9e3d98
ILT
322008-05-21 Ian Lance Taylor <iant@google.com>
33
34 * mapfile.cc: New file.
35 * mapfile.h: New file.
36 * options.h (class General_options): Add -M/--print-map and -Map.
37 * options.cc (General_options::finalize): Make -M equivalent to
38 -Map -.
39 * main.cc: Include <cstdio> and "mapfile.h".
40 (main): Open mapfile if requested.
41 * gold.cc (class Middle_runner): Add mapfile_ field. Update
42 constructor. Change caller.
43 (queue_initial_tasks): Add mapfile parameter. Change caller.
44 (queue_middle_tasks): Likewise.
45 * gold.h (queue_initial_tasks, queue_middle_tasks): Update
46 declarations.
47 * archive.cc: Include "mapfile.h".
48 (Archive::add_symbols): Add mapfile parameter. Change all
49 callers. Pass mapfile, symbol, and reason to include_member.
50 (Archive::include_all_members): Add mapfile parameter. Change all
51 callers.
52 (Archive::include_member): Add mapfile, sym, and why parameters.
53 Change all callers. Report inclusion to map file.
54 * archive.h: Include "fileread.h".
55 (class Archive): Update declarations.
56 (Archive::file): New const method.
57 (class Add_archive_symbols): Add mapfile_ field. Update
58 constructor. Change all callers.
59 * readsyms.h (class Read_symbols): Likewise.
60 (class Finish_group): Likewise.
61 (class Read_script): Likewise.
62 * common.cc: Include "mapfile.h".
63 (Symbol_table::allocate_commons): Add mapfile parameter. Change
64 all callers.
65 (Symbol_table::do_allocate_commons): Likewise.
66 (Symbol_table::do_allocate_commons_list): Likewise. Report common
67 symbol allocation to mapfile.
68 * common.h (class Allocate_commons_task): Add mapfile_ field.
69 Update constructor. Change all callers.
70 * symtab.h (class Symbol_table): Update declarations.
71 * layout.cc: Include "mapfile.h".
72 (Layout_task_runner::run): Print information to mapfile.
73 (Layout::create_gold_note): Change Output_data_fixed_space to
74 Output_data_zero_fill.
75 (Layout::create_build_id): Likewise.
76 (Layout::print_to_mapfile): New function.
77 * layout.h (class Layout_task_runner): Add mapfile_ field. Update
78 constructor. Change caller.
79 (class Layout): Declare print_to_mapfile.
80 * output.cc (Output_section::Input_section::print_to_mapfile): New
81 function.
82 (Output_section::add_input_section): If producing a map, always
83 add to input_sections_ list.
84 (Output_section::do_print_to_mapfile): New function.
85 (Output_segment::print_sections_to_mapfile): New function.
86 (Output_segment::print_section_list_to_mapfile): New function.
87 * output.h: Include "mapfile.h".
88 (Output_data::print_to_mapfile): New function.
89 (Output_data::do_print_to_mapfile): New virtual function.
90 (Output_segment_headers::do_print_to_mapfile): New function.
91 (Output_file_header::do_print_to_mapfile): New function.
92 (Output_data_const::do_print_to_mapfile): New function.
93 (class Output_data_const_buffer): Add map_name_ field. Update
94 constructor. Change all callers. Add do_print_to_mapfile
95 function.
96 (class Output_data_fixed_space): Likewise.
97 (class Output_data_space): Likewise.
98 (class Output_data_zero_fill): New class.
99 (Output_data_strtab::do_print_to_mapfile): New function.
100 (Output_data_reloc_base::do_print_to_mapfile): New function.
101 (Output_relocatable_relocs::do_print_to_mapfile): New function.
102 (Output_data_group::do_print_to_mapfile): New function.
103 (Output_data_got::do_print_to_mapfile): New function.
104 (Output_data_dynamic::do_print_to_mapfile): New function.
105 (Output_symtab_xindex::do_print_to_mapfile): New function.
106 (class Output_section): Declare do_print_to_mapflie. Declare
107 print_to_mapfile in Input_section.
108 (class Output_segment): Declare new functions.
109 * object.h (Sized_relobj::symbol_count): New function.
110 * script-sections.cc
111 (Output_section_element_dot_assignment::set_section_addresses):
112 Change Output_data_fixed_space to Output_data_zero_fill.
113 (Output_data_expression::do_print_to_mapfile): New function.
114 * script.cc (read_input_script): Add mapfile parameter. Change
115 all callers.
116 * script.h (read_input_script): Update declaration.
117 * ehframe.h (Eh_frame_hdr::do_print_to_mapfile): New function.
118 (Eh_frame::do_print_to_mapfile): New function.
119 * merge.h (Output_merge_data::do_print_to_mapfile): New function.
120 (Output_merge_string::do_print_to_mapfile): New function.
121 * i386.cc (Output_data_plt_i386::do_print_to_mapfile): New
122 function.
123 * sparc.cc (Output_data_plt_sparc::do_print_to_mapfile): New
124 function.
125 * x86_64.cc (Output_data_plt_x86_64::do_print_to_mapfile): New
126 function.
127 * Makefile.am (CCFILES): Add mapfile.cc.
128 (HFILES): Add mapfile.h.
129 * Makefile.in: Rebuild.
130
9f1d377b
ILT
1312008-05-19 Ian Lance Taylor <iant@google.com>
132
133 * options.h (class General_options): Add -z relro.
134 * layout.cc (Layout::Layout): Initialize relro_segment_.
135 (Layout::add_output_section_data): Return the output section.
136 (Layout::make_output_section): Rcognize relro sections and mark
137 them appropriately.
138 (Layout::attach_allocated_section_to_segment): Put relro sections
139 in a PT_GNU_RELRO segment.
140 (Layout::create_initial_dynamic_sections): Mark the .dynamic
141 section as relro.
142 (Layout::segment_precedes): Sort PT_GNU_RELRO segments after
143 PT_TLS segments.
144 (Layout::linkonce_mapping): Map d.rel.ro.local to
145 .data.rel.ro.local.
146 (Layout::output_section_name): Us .data.rel.ro.local for any
147 section which begins with that.
148 * layout.h (class Layout): Update add_output_section_data
149 declaration. Add relro_segment_ field.
150 * output.cc (Output_section::Output_section): Initialize is_relro_
151 and is_relro_local_ fields.
152 (Output_segment::add_output_section): Group relro sections.
153 (Output_segment::is_first_section_relro): New function.
154 (Output_segment::maximum_alignment): If there is a relro section,
155 align the segment to the common page size.
156 (Output_segment::set_section_addresses): Track whether we are
157 looking at relro sections. If the last section is a relro
158 section, align to the common page size.
159 (Output_segment::set_section_list_addresses): Add in_relro
160 parameter. Change all callers. Align to the page size when
161 moving from relro to non-relro section.
162 (Output_segment::set_offset): Align memsz of a PT_GNU_RELRO
163 segment.
164 * output.h (class Output_section): Add is_relro_ and
165 is_relro_local_ fields.
166 (Output_section::is_relro): New function.
167 (Output_section::set_is_relro): New function.
168 (Output_section::is_relro_local): New function.
169 (Output_section::set_is_relro_local): New function.
170 (class Output_segment): Update declarations.
171 * i386.cc (Target_i386::got_section): Mark .got section as relro.
172 * sparc.cc (Target_sparc::got_section): Likewise.
173 * x86_64.cc (Target_x86_64::got_section): Likewise.
174 * testsuite/relro_test_main.cc: New file.
175 * testsuite/relro_test.cc: New file.
176 * testsuite/Makefile.am (check_PROGRAMS): Add relro_test.
177 (relro_test_SOURCES, relro_test_DEPENDENCIES): New variables.
178 (relro_test_LDFLAGS, relro_test_LDADD): New variables.
179 (relro_test.so, relro_test_pic.o): New targets.
180 * testsuite/Makefile.in: Rebuild.
181
a984ee1d
ILT
1822008-05-16 Ian Lance Taylor <iant@google.com>
183
01676dcd
ILT
184 * output.cc (Output_segment::add_output_section): Remove front
185 parameter.
186 * output.h (class Output_segment): Remove
187 add_initial_output_section and overloaded add_output_section.
188 Update declaration of remaining add_output_section.
189 * layout.cc (Layout::create_interp): Call add_output_section
190 rather than add_initial_output_section.
191 (Layout::finish_dynamic_section): Likewise.
192
497897f9
ILT
193 * i386.cc (Target_i386::Relocate::relocate_tls): Set dynamic type
194 for TLS_GOTDESC and TLS_DESC_CALL. Only optimize TLS_LDO_32 if we
195 know the dynamic type.
196 * x86_64.cc (Target_x86_64::Relocate): Add saw_tls_block_reloc_
197 field. Initialize it in constructor.
198 (Target_x86_64::Relocate::relocate_tls): Record that we saw a TLS
199 block reloc for TLSGD, GOTPC32_TLSDESC, TLSDESC_CALL, and TLSLD.
200 Only optimize DTPOFF32 and DTPOFF64 if we have seen a TLS block
201 reloc.
202
a984ee1d
ILT
203 * output.cc (Output_reloc::get_address): Change return type to
204 Elf_Addr.
205 * output.h (class Output_reloc): Update get_address declaration.
206 * x86_64.cc (Output_data_plt_x86_64::do_write): Use 64-bit types
207 for section addresses.
208
55ba0940
ILT
2092008-05-09 Ian Lance Taylor <iant@google.com>
210
211 PR 6493
212 * gold.cc (gold_nomem): Use return value of write.
213
75517b77
ILT
2142008-05-08 Ian Lance Taylor <iant@google.com>
215
216 * symtab.c (Symbol::init_base_output_data): Add version
217 parameter. Change all callers.
218 (Symbol::init_base_output_segment): Likewise.
219 (Symbol::init_base_constant): Likewise.
220 (Symbol::init_base_undefined): Likewise.
221 (Sized_symbol::init_output_data): Likewise.
222 (Sized_symbol::init_output_segment): Likewise.
223 (Sized_symbol::init_constant): Likewise.
224 (Sized_symbol::init_undefined): Likewise.
225 (Symbol_table::do_define_in_output_data): If the new symbol has a
226 version, mark it as the default.
227 (Symbol_table::do_define_in_output_segment): Likewise.
228 (Symbol_table::do_define_as_constant): Likewise.
229 * symtab.h (class Symbol): Update declarations.
230 (class Sized_symbol): Likewise.
231 * resolve.cc (Symbol::override_version): New function.
232 (Symbol::override_base: Call override_version.
233 (Symbol::override_base_with_special): Likewise.
234 * testsuite/ver_script_8.script: New file.
235 * testsuite/Makefile.am (check_PROGRAMS): Add ver_test_8.
236 (ver_test_8_SOURCES, ver_test_8_DEPENDENCIES): Define.
237 (ver_test_8_LDFLAGS, ver_test_8_LDADD): Define.
238 (ver_test_8_1.so, ver_test_8_2.so): New targets.
239
f1f70eae
ILT
2402008-05-06 Ian Lance Taylor <iant@google.com>
241
f3e9c5c5
ILT
242 PR 6049
243 * options.h (DEFINE_set): Add VARNAME_begin and VARNAME_end
244 functions.
245 (class General_options): Remove existing --undefined, and add
246 --no-undefined instead. Add new --undefined as synonym for -u.
247 * archive.cc (Archive::add_symbols): Check whether symbol was
248 named with -u.
249 * gold.cc (queue_middle_tasks): Add -u symbols to symbol table.
250 * symtab.h (class Symbol): Rename CONSTANT to IS_CONSTANT; change
251 all uses. Add IS_UNDEFINED. Update declarations to split
252 different versions of init_base. Declare init_base_undefined.
253 (Symbol::is_defined): Handle IS_UNDEFINED.
254 (Symbol::is_undefined): Likewise.
255 (Symbol::is_weak_undefined): Call is_undefined.
256 (Symbol::is_absolute): Handle IS_CONSTANT.
257 (class Sized_symbol): Update declarations to split different
258 versions of init. Declare init_undefined.
259 (class Symbol_table): Declare new functions.
260 * symtab.cc (Symbol::init_base_object): Rename from init_base.
261 Change all callers.
262 (Symbol::init_base_output_data): Likewise.
263 (Symbol::init_base_output_segment): Likewise.
264 (Symbol::init_base_constant): Likewise.
265 (Symbol::init_base_undefined): New function.
266 (Sized_symbol::init_object): Rename from init. Change all
267 callers.
268 (Sized_symbol::init_output_data): Likewise.
269 (Sized_symbol::init_output_segment): Likewise.
270 (Sized_symbol::init_constant): Likewise.
271 (Sized_symbol::init_undefined): New function.
272 (Symbol_table::add_undefined_symbols_from_command_line): New
273 function.
274 (Symbol_table::do_add_undefined_symbols_from_command_line): New
275 function.
276 (Symbol::final_value_is_known): Handle IS_UNDEFINED.
277 (Symbol::output_section): Likewise.
278 (Symbol::set_output_section): Likewise.
279 (Symbol_table::sized_finalize_symbol): Likewise.
280 (Symbol_table::sized_write_globals): Likewise.
281 * resolve.cc (Symbol_table::should_override): Likewise.
282 (Symbol::override_base_with_special): Likewise.
283
8bdcdf2c
ILT
284 * symtab.cc (Symbol_table::add_from_dynobj): If we see a protected
285 symbol, change it to have default visibility.
286 * testsuite/protected_1.cc: New file.
287 * testsuite/protected_2.cc: New file.
288 * testsuite/protected_3.cc: New file.
289 * testsuite/protected_main_1.cc: New file.
290 * testsuite/protected_main_2.cc: New file.
291 * testsuite/protected_main_3.cc: New file.
292 * testsuite/Makefile.am (check_PROGRAMS): Add protected_1.
293 (protected_1_SOURCES, protected_1_DEPENDENCIES): Define.
294 (protected_1_LDFLAGS, protected_1_LDADD): Define.
295 (protected_1.so): New target.
296 (protected_1_pic.o, protected_2_pic.o): New targets.
297 (protected_3_pic.o): New target.
298 (check_PROGRAMS): Add protected_2.
299 (protected_2_SOURCES, protected_2_DEPENDENCIES): Define.
300 (protected_2_LDFLAGS, protected_2_LDADD): Define.
301 * testsuite/Makefile.in: Rebuild.
302
2b706932
ILT
303 * options.h (DEFINE_var): Add set_user_set_##varname__.
304 (DEFINE_bool_alias): New macro.
305 (class General_options): Define -Bstatic using DEFINE_bool_alias
306 rather than DEFINE_special. Add --undefined as an alias for -z
307 defs.
308 * options.cc (General_options::parse_Bstatic): Remove.
309
d82a5bcc
ILT
310 * options.h (class General_options): Add --fatal-warnings.
311 * main.cc (main): Implement --fatal-warnings.
312 * errors.h (Errors::warning_count): New function.
313
f1f70eae
ILT
314 * options.h (class General_options): Add -Bsymbolic-functions.
315 * symtab.h (Symbol::is_preemptible): Check for
316 -Bsymbolic-functions.
317
8825ac63
ILT
3182008-05-05 Ian Lance Taylor <iant@google.com>
319
d98bc257
ILT
320 * options.h (DEFINE_bool): For DASH_Z, create the negative option
321 as noVARNAME rather than no-VARNAME.
322 (class General_options): Add option -z combreloc.
323 * output.h (class Output_reloc) [SHT_REL]: Declare compare and
324 get_address.
325 (Output_reloc::sort_before) [SHT_REL]: New function.
326 (Output_reloc::sort_before) [SHT_RELA]: New function.
327 (class Output_data_reloc_base): Add sort_relocs_ field. Define
328 Sort_relocs_comparison.
329 (Output_data_reloc_base::Output_data_reloc_base): Add sort_relocs
330 parameter. Change all callers.
331 (Output_data_reloc::Output_data_reloc) [both versions]: Add
332 sort_relocs parameter. Change all callers.
333 * output.cc (Output_reloc::get_address): New function, broken out
334 of write_rel.
335 (Output_reloc::write_rel): Call it.
336 (Output_reloc::compare): New function.
337 (Output_data_reloc_base::do_write): Optionally sort relocs.
338
60b2b4e7
ILT
339 * configure.ac: If targ_extra_obj is set, link it in.
340 * configure.tgt: Initialize all variables.
341 (x86_64*): Set targ_extra_obj and targ_extra_size.
342 * configure: Rebuild.
343
8825ac63
ILT
344 * object.cc (Sized_relobj::include_section_group): Adjust section
345 indexes read from group data. Build vector to pass to
346 layout_group.
347 * layout.cc (Layout::layout_group): Add flags and shndxes
348 parameters. Remove contents parameter. Change caller. Update
349 explicit instantiations.
350 * layout.h (class Layout): Update layout_group declaration.
351 * output.cc (Output_data_group::Output_data_group): Add flags and
352 input_shndxes parameters. Remove contents parameter. Change
353 caller.
354 (Output_data_group::do_write): Change input_sections_ to
355 input_shndxes_.
356 * output.h (class Output_data_group): Update constructor
357 declaration. Rename input_sections_ to input_shndxes_.
358 * testsuite/many_sections_test.cc: Add template.
359
e94cf127
CC
3602008-04-30 Cary Coutant <ccoutant@google.com>
361
4418b2d5
CC
362 * target-reloc.h (relocate_section): Fix dead-pointer bug.
363
e94cf127
CC
364 * layout.cc (Layout::include_section): Refactored check for debug
365 info section.
366 (Layout::add_comdat): Add new parameters. Change type
367 of signature parameter. Add object and shndx to signatures table.
368 (Layout::find_kept_object): New function.
369 * layout.h: Include <cstring>.
370 (Layout::is_debug_info_section): New function.
371 (Layout::add_comdat): Add new parameters.
372 (Layout::find_kept_object): New function.
373 (Layout::Kept_section): New struct.
374 (Layout::Signatures): Change type of map range.
375 * object.cc (Relobj::output_section_address): New function.
376 (Sized_relobj::include_section_group): Add new parameters. Change
377 calls to Layout::add_comdat. Change to build table of kept comdat
378 groups and table mapping discarded sections to kept sections.
379 (Sized_relobj::include_linkonce_section): Likewise. Add new parameter.
380 (Sized_relobj::do_layout): Change calls to include_section_group and
381 include_linkonce_section.
382 (Sized_relobj::do_finalize_local_symbols): Do not set local symbol
383 value to zero when section is discarded.
384 (Sized_relobj::map_to_kept_section): New function.
385 * object.h (Relobj::output_section_address): New function.
386 (Relobj::Comdat_group): New type.
387 (Relobj::find_comdat_group): New function.
388 (Relobj::Comdat_group_table): New type.
389 (Relobj::Kept_comdat_section): New type.
390 (Relobj::Kept_comdat_section_table): New type.
391 (Relobj::add_comdat_group): New function.
392 (Relobj::set_kept_comdat_section): New function.
393 (Relobj::get_kept_comdat_section): New function.
394 (Relobj::comdat_groups_): New field.
395 (Relobj::kept_comdat_sections_): New field.
396 (Symbol_value::input_value): Update comment.
397 (Sized_relobj::map_to_kept_section) New function.
398 (Sized_relobj::include_linkonce_section): Add new parameter.
399 * target-reloc.h (Comdat_behavior): New type.
400 (get_comdat_behavior): New function.
401 (relocate_section): Add code to map a discarded section to the
402 corresponding kept section when applying a relocation.
403
e4e5049b
CS
4042008-04-30 Craig Silverstein <csilvers@google.com>
405
406 * dwarf_reader.cc (next_generation_count): New static var.
407 (Addr2line_cache_entry): New struct.
408 (addr2line_cache): New static var.
409 (Dwarf_line_info::one_addr2line): Added caching.
410 (Dwarf_line_info::clear_addr2line_cache): New function.
411 * dwarf_reader.h (Dwarf_line_info::one_addr2line): Add
412 cache-size parameter.
413 (Dwarf_line_info::one_addr2line_cache): New function.
414 * symtab.cc (Symbol_table::detect_odr_violations): Pass
415 new cache-size argument to one_addr2line(), and clear cache.
416
d09e9154
CC
4172008-04-28 Cary Coutant <ccoutant@google.com>
418
419 * i386.cc (Relocate::relocate): Fix typos for R_386_PC16 and
420 R_386_PC8 relocations.
421
7ef73768
ILT
4222008-04-23 Ian Lance Taylor <iant@google.com>
423
55438702
ILT
424 * object.cc (Sized_relobj::include_section_group): Check for
425 invalid section group.
426
c165fb93
ILT
427 * object.cc (make_elf_object): Correct test for 64-bit ELF file
428 header size.
429
7ef73768
ILT
430 * readsyms.cc (Read_symbols::do_read_symbols): Use get_view rather
431 than read for file header.
432 * archive.cc (Archive::include_member): Likewise.
433
6194aaab
L
4342008-04-23 Paolo Bonzini <bonzini@gnu.org>
435
436 * aclocal.m4: Regenerate.
437 * configure: Regenerate.
438
d491d34e
ILT
4392008-04-19 Ian Lance Taylor <iant@google.com>
440
5ea2bac6
ILT
441 * version.cc (version_string): Bump to 1.6.
442
7bc3e21a
ILT
443 * testsuite/Makefile.am (many_sections_r_test): New target.
444 (many_sections_r_test_SOURCES): Remove.
445 (many_sections_r_test_DEPENDENCIES): Remove.
446 (many_sections_r_test_LDFLAGS): Remove.
447 (many_sections_r_test_LDADD): Remove.
448
7fcd3aa9
ILT
449 * object.cc (Sized_relobj::do_add_symbols): Always pass
450 local_symbol_count_ to add_from_relobj.
451
4c94d6ae
ILT
452 * testsuite/Makefile.am (many_sections_check.h): Only check one in
453 every thousand variables.
454 * testsuite/Makefile.in: Rebuild.
455
d491d34e
ILT
456 * object.cc (Xindex::initialize_symtab_xindex): New function.
457 (Xindex::read_symtab_xindex): New function.
458 (Xindex::sym_xindex_to_shndx): New function.
459 (Sized_relobj::find_symtab): Pick up SHT_SYMTAB_SHNDX section if
460 available.
461 (Sized_relobj::do_initialize_xindex): New function.
462 (Sized_relobj::do_read_symbols): Adjust section links.
463 (Sized_relobj::symbol_section_and_value): Add is_ordinary
464 parameter. Change all callers.
465 (Sized_relobj::include_section_group): Adjust section links and
466 symbol section indexes.
467 (Sized_relobj::do_layout): Adjust section links.
468 (Sized_relobj::do_count_local_symbols): Adjust section links and
469 symbol section indexes.
470 (Sized_relobj::do_finalize_local_symbols): Distinguish between
471 ordinary and special symbols.
472 (Sized_relobj::write_local_symbols): Add symtab_xindex and
473 dynsym_xindex parameters. Change all callers. Adjust section
474 links. Use SHN_XINDEX when needed.
475 (Sized_relobj::get_symbol_location_info): Adjust section links.
476 Don't get fooled by special symbols.
477 * object.h (class Xindex): Define.
478 (class Object): Add xindex_ parameter. Declare virtual functoin
479 do_initialize_xindex.
480 (Object::adjust_sym_shndx): New function.
481 (Object::set_xindex): New protected function.
482 (class Symbol_value): Add is_ordinary_shndx_ field.
483 (Symbol_value::Symbol_value): Initialize is_ordinary_shndx_.
484 (Symbol_value::value): Assert ordinary section.
485 (Symbol_value::initialize_input_to_output_map): Likewise.
486 (Symbol_value::set_input_shndx): Add is_ordinary parameter.
487 Change all callers.
488 (Symbol_value::input_shndx): Add is_ordinary parameter. Change
489 all callers.
490 (class Sized_relobj): Update declarations.
491 (Sized_relobj::local_symbol_input_shndx): Add is_ordinary
492 parameter. Change all callers.
493 (Sized_relobj::adjust_shndx): New function.
494 * dynobj.cc (Sized_dynobj::Sized_dynobj): Initialize dynsym_shndx_
495 field.
496 (Sized_dynobj::find_dynsym_sections): Remove pdynsym_shndx
497 parameter. Change all callers. Pick up SHT_DYNSYM_SHNDX section
498 for SHT_DYNSYM section if available. Set dynsym_shndx_ field.
499 (Sized_dynobj::read_dynsym_section): Adjust section links.
500 (Sized_dynobj::read_dynamic): Likewise.
501 (Sized_dynobj::do_read_symbols): Use dynsym_shndx_ field. Adjust
502 section links.
503 (Sized_dynobj::do_initialize_xindex): New function.
504 * dynobj.h (class Sized_dynobj): Add dynsym_shndx_ field. Declare
505 do_initialize_xindex.
506 (Sized_dynobj::adjust_shndx): New function.
507 * layout.cc (Layout::Layout): Initialize symtab_xindex_ and
508 dynsym_xindex_ fields.
509 (Layout::finalize): Add a call to set_section_indexes before
510 creating the symtab sections.
511 (Layout::set_section_indexes): Don't do anything if the section
512 already has a section index.
513 (Layout::create_symtab_sections): Add shnum parameter. Change
514 caller. Create .symtab_shndx section if needed.
515 (Layout::create_shdrs): Add shstrtab_section parameter. Change
516 caller.
517 (Layout::allocated_output_section_count): New function.
518 (Layout::create_dynamic_symtab): Create .dynsym_shndx section if
519 needed.
520 * layout.h (class Layout): Add symtab_xindex_ and dynsym_xindex_
521 fields. Update declarations.
522 (Layout::symtab_xindex): New function.
523 (Layout::dynsym_xindex): New function.
524 (class Write_symbols_task): Add layout_ field.
525 (Write_symbols_task::Write_symbols_task): Add layout parameter.
526 Change caller.
527 * output.cc (Output_section_headers::Output_section_headers): Add
528 shstrtab_section parameter. Change all callers.
529 (Output_section_headers::do_sized_write): Store overflow values
530 for section count and section string table section index in
531 section header zero.
532 (Output_file_header::do_sized_write): Check for overflow of
533 section count and section string table section index.
534 (Output_symtab_xindex::do_write): New function.
535 (Output_symtab_xindex::endian_do_write): New function.
536 * output.h (class Output_section_headers): Add shstrtab_section_.
537 Update declarations.
538 (class Output_symtab_xindex): Define.
539 (Output_section::has_out_shndx): New function.
540 * symtab.cc (Symbol::init_fields): Initialize is_ordinary_shndx_
541 field.
542 (Symbol::init_base): Add st_shndx and is_ordinary parameters.
543 Change all callers.
544 (Sized_symbol::init): Likewise.
545 (Symbol::output_section): Check for ordinary symbol.
546 (Symbol_table::add_from_object): Remove orig_sym parameter. Add
547 st_shndx, is_ordinary, and orig_st_shndx parameters. Change all
548 callers.
549 (Symbol_table::add_from_relobj): Add symndx_offset parameter.
550 Change all callers. Simplify handling of symbols from sections
551 not included in the link.
552 (Symbol_table::add_from_dynobj): Handle ordinary symbol
553 distinction.
554 (Weak_alias_sorter::operator()): Assert that symbols are
555 ordinary.
556 (Symbol_table::sized_finalize_symbol): Handle ordinary symbol
557 distinction.
558 (Symbol_table::write_globals): Add symtab_xindex and dynsym_xindex
559 parameters. Change all callers.
560 (Symbol_table::sized_write_globals): Likewise. Handle ordinary
561 symbol distinction. Use SHN_XINDEX when needed.
562 (Symbol_table::write_section_symbol): Add symtab_xindex
563 parameter. Change all callers.
564 (Symbol_table::sized_write_section_symbol): Likewise. Use
565 SHN_XINDEX when needed.
566 * symtab.h (class Symbol): Add is_ordinary_shndx_ field. Update
567 declarations.
568 (Symbol::shndx): Add is_ordinary parameter. Change all callers.
569 (Symbol::is_defined): Check is_ordinary.
570 (Symbol::is_undefined, Symbol::is_weak_undefined): Likewise.
571 (Symbol::is_absolute, Symbol::is_common): Likewise.
572 (class Sized_symbol): Update declarations.
573 (class Symbol_table): Update declarations.
574 * resolve.cc (Symbol::override_base): Add st_shndx and is_ordinary
575 parameters. Change all callers.
576 (Sized_symbol::override): Likewise.
577 (Symbol_table::override): Likewise.
578 (symbol_to_bits): Add is_ordinary parameter. Change all callers.
579 (Symbol_table::resolve): Remove orig_sym parameter. Add st_shndx,
580 is_ordinary, and orig_st_shndx parameters. Change all callers.
581 * copy-relocs.cc (Copy_relocs::emit_copy_reloc): Require symbol
582 to be in an ordinary section.
583 * dwarf_reader.cc (Sized_dwarf_line_info::symbol_section): Add
584 object and is_ordinary parameters. Change all callers.
585 (Sized_dwarf_line_info::read_relocs): Add object parameter.
586 Change all callers. Don't add undefined or non-ordinary symbols
587 to reloc_map_.
588 (Sized_dwarf_line_info::read_line_mappings): Add object parameter.
589 Change all callers.
590 * dwarf_reader.h (class Sized_dwarf_line_info): Update
591 declarations.
592 * ehframe.cc (Eh_frame::read_fde): Check for ordinary symbol.
593 * reloc.cc (Sized_relobj::do_read_relocs): Adjust section links.
594 (Sized_relobj::relocate_sections): Likewise.
595 * target-reloc.h (scan_relocs): Adjust section symbol index.
596 (scan_relocatable_relocs): Likewise.
597 * i386.cc (Scan::local): Check for ordinary symbols.
598 * sparc.cc (Scan::local): Likewise.
599 * x86_64.cc (Scan::local): Likewise.
600 * testsuite/binary_unittest.cc (Sized_binary_test): Update calls
601 to symbol_section_and_value.
602 * testsuite/many_sections_test.cc: New file.
603 * testsuite/Makefile.am (BUILT_SOURCES): Define.
604 (check_PROGRAMS): Add many_sections_test.
605 (many_sections_test_SOURCES): Define.
606 (many_sections_test_DEPENDENCIES): Define.
607 (many_sections_test_LDFLAGS): Define.
608 (BUILT_SOURCES): Add many_sections_define.h.
609 (many_sections_define.h): New target.
610 (BUILT_SOURCES): Add many_sections_check.h.
611 (many_sections_check.h): New target.
612 (check_PROGRAMS): Add many_sections_r_test.
613 (many_sections_r_test_SOURCES): Define.
614 (many_sections_r_test_DEPENDENCIES): Define.
615 (many_sections_r_test_LDFLAGS): Define.
616 (many_sections_r_test_LDADD): Define.
617 (many_sections_r_test.o): New target.
618 * testsuite/Makefile.in: Rebuild.
619
c5818ff1
CC
6202008-04-17 Cary Coutant <ccoutant@google.com>
621
622 * errors.cc (Errors::info): New function.
623 (gold_info): New function.
624 * errors.h (Errors::info): New function.
625 * gold.h (gold_info): New function.
626 * object.cc (Input_objects::add_object): Print trace output.
627 * options.cc (options::parse_set): New function.
628 (General_options::parse_wrap): Deleted.
629 (General_options::General_options): Deleted initializer.
630 * options.h (options::String_set): New typedef.
631 (options::parse_set): New function.
632 (DEFINE_set): New macro.
633 (General_options::wrap): Changed to use DEFINE_set. Changed
634 callers of any_wrap_symbols and is_wrap_symbol.
635 (General_options::trace, General_options::trace_symbol):
636 New options.
637 (General_options::any_wrap_symbols, General_options::is_wrap_symbol)
638 (General_options::wrap_symbols_): Deleted.
639 * symtab.cc (Symbol_table::add_from_object): Print trace output.
640
b5be4a7c
DM
6412008-04-17 David S. Miller <davem@davemloft.net>
642
643 * options.cc (General_options::parse_V): New function.
644 * options.h: Add entries for -V and -Qy.
645
155a0dd7
ILT
6462008-04-17 Ian Lance Taylor <iant@google.com>
647
648 * common.cc (Symbol_table::allocate_commons): Remove options
649 parameter. Change caller.
650 (Symbol_table::do_allocate_commons): Remove options parameter.
651 Change caller. Just call do_allocate_commons_list twice.
652 (Symbol_table::do_allocate_commons_list): New function, broken out
653 of do_allocate_commons.
654 * common.h (class Allocate_commons_task): Remove options_ field.
655 Update constructor.
656 * symtab.cc (Symbol_table::Symbol_table): Initialize
657 tls_commons_.
658 (Symbol_table::add_from_object): Put TLS common symbols on
659 tls_commons_ list.
660 (Symbol_table::sized_finalize_symbol): Handle STT_TLS symbols
661 which are IN_OUTPUT_DATA.
662 * symtab.h (class Symbol_table): Add tls_commons_ field. Update
663 allocate_commons and do_allocate_commons declarations. Declare
664 do_allocate_commons_list.
665 * gold.cc (queue_middle_tasks): Update creation of
666 Allocate_commons_task to not pass options.
667 * testsuite/Makefile.am (INCLUDES): Add -I.. .
668 (TLS_TEST_C_FLAGS): New variable.
669 (tls_test_c_pic.o): New target.
670 (tls_test_shared.so): Link in tls_test_c_pic.o.
671 (tls_test_c_pic_ie.o): New target.
672 (tls_test_ie_shared.so): Link in tls_test_c_pic_ie.o.
673 (tls_test_DEPENDENCIES, tls_test_LDADD): Add tls_test_c.o.
674 (tls_test_c.o): New target.
675 (tls_pic_test_DEPENDENCIES): Add tls_test_c_pic.o.
676 (tls_pic_test_LDADD): Likewise.
677 (tls_shared_gd_to_ie_test_DEPENDENCIES): Add tls_test_c_pic.o.
678 (tls_shared_gd_to_ie_test_LDADD): Likewise.
679 (tls_test_c_gnu2.o): New target.
680 (tls_shared_gnu2_gd_to_ie_test_DEPENDENCIES): Add
681 tls_test_c_gnu2.o.
682 (tls_shared_gnu2_gd_to_ie_test_LDADD): Likewise.
683 (tls_test_gnu2_shared.so): Link in tls_test_c_gnu2.o.
684 (tls_test_shared_nonpic.so): Link in tls_test_c.o.
685 * testsuite/tls_test.cc: Include "config.h".
686 (t_last): Call t11_last.
687 * testsuite/tls_test.h (t11, t11_last): Declare.
688 * testsuite/tls_test_c.c: New file.
689 * testsuite/tls_test_main.cc (thread_routine): Call t11.
690 * configure.ac: Check for OpenMP support.
691 * configure, config.in, Makefile.in: Rebuild.
692 * testsuite/Makefile.in: Rebuild.
693
edfbb029
CC
6942008-04-16 Cary Coutant <ccoutant@google.com>
695
696 * i386.cc (Target_i386::define_tls_base_symbol): New function.
697 (Target_i386::tls_base_symbol_defined_): New field.
698 (Target_i386::Scan::local): Define _TLS_MODULE_BASE_ symbol.
699 (Target_i386::Scan::global): Likewise.
700 * symtab.cc (sized_finalize_symbol): Add check for TLS symbol.
701 * x86_64.cc (Target_x86_64::define_tls_base_symbol): New function.
702 (Target_x86_64::tls_base_symbol_defined_): New field.
703 (Target_x86_64::Scan::local): Define _TLS_MODULE_BASE_ symbol.
704 (Target_x86_64::Scan::global): Likewise.
705
f3c69fca
CC
7062008-04-16 Cary Coutant <ccoutant@google.com>
707
708 * symtab.h (Symbol::is_strong_undefined): Removed unused function.
709 (Symbol::needs_plt_entry): Allow weak undefined symbols.
710 (Symbol::needs_dynamic_reloc): Allow weak undefined symbols when
711 building shared libraries.
712 * testsuite/Makefile.am (weak_undef_nonpic_test): New target.
713 (weak_undef_file1_nonpic.o, weak_undef_file2_nonpic.o)
714 (weak_undef_lib_nonpic.so, alt/weak_undef_lib_nonpic.so): New targets.
715 * testsuite/Makefile.in: Rebuild.
716 * testsuite/weak_undef.h: New file.
717 * testsuite/weak_undef_file1.cc: Add extra test cases.
718 * testsuite/weak_undef_file2.cc: Likewise.
719 * testsuite/weak_undef_test.cc: Likewise.
720
7c414435
DM
7212008-04-16 David S. Miller <davem@davemloft.net>
722
32b769e1
DM
723 * sparc.cc (Target_sparc::Scan): Change from struct to class.
724 Add issued_non_pic_error_ field. Declare check_non_pic.
725 (Target_sparc::Scan::check_non_pic): New function.
726 (Target_sparc::Scan::local): Call check_non_pic as appropriate.
727 (Target_sparc::Scan::global): Likewise.
728
11936fb1
DM
729 * configure.ac (FN_PTRS_IN_SO_WITHOUT_PIC): Add sparc64.
730 * configure: Rebuild.
731
7c414435
DM
732 * options.h (DEFINE_enable): New macro.
733 (new_dtags): New enable option.
734 (initfirst, interpose, loadfltr, nodefaultlib,
735 nodelete, nodlopen, nodump): New -z options.
736 * layout.cc (Layout:finish_dynamic_section): If new
737 dtags enabled, emit DT_RUNPATH. Also, emit a
738 DT_FLAGS_1 containing any specified -z flags.
739
85c7bf8b
ILT
7402008-04-16 Ian Lance Taylor <iant@google.com>
741
12c0daef
ILT
742 * copy-relocs.cc: New file.
743 * copy-relocs.h: New file.
744 * reloc.cc: Remove Copy_relocs code.
745 * reloc.h: Likewise.
746 * reloc-types.h (struct Reloc_types) [both versions]: Add
747 get_reloc_addend_noerror.
748 * output.h (class Output_data_reloc<elfcpp::SHT_REL>): Add
749 variants of add_global which take an addend which must be zero.
750 * i386.cc: Include "copy-relocs.h".
751 (class Target_i386): Change type of copy_relocs_ to variable,
752 update initializer.
753 (Target_i386::copy_reloc): Rewrite to pass to Copy_relocs class.
754 Change all callers.
755 (Target_i386::do_finalize_sections): Change handling of
756 copy_relocs_.
757 * sparc.cc: Include "copy-relocs.h".
758 (class Target_sparc): Change type of copy_relocs_ to variable,
759 update initializer.
760 (Target_sparc::copy_reloc): Rewrite to pass to Copy_relocs class.
761 Change all callers.
762 (Target_sparc::do_finalize_sections): Change handling of
763 copy_relocs_.
764 * x86_64.cc: Include "copy-relocs.h".
765 (class Target_x86_64): Change type of copy_relocs_ to variable,
766 update initializer.
767 (Target_x86_64::copy_reloc): Rewrite to pass to Copy_relocs
768 class. Change all callers.
769 (Target_x86_64::do_finalize_sections): Change handling of
770 copy_relocs_.
771 * Makefile.am (CCFILES): Add copy-relocs.cc.
772 (HFILES): Add copy-relocs.h.
773
4f4995b6
ILT
774 * Makefile.in, aclocal.m4, testsuite/Makefile.in: Rebuild.
775
85c7bf8b
ILT
776 * testsuite/script_test_4.sh: Permit leading zeroes.
777
4f2a9edd
ILT
7782008-04-15 Ian Lance Taylor <iant@google.com>
779
e6188289
ILT
780 * script-sections.cc (Script_sections::create_segments): Use
781 header_size_adjustment even when there is enough room for the
782 headers.
783 * testsuite/script_test_4.sh: New file.
784 * testsuite/script_test_4.t: New file.
785 * testsuite/Makefile.am (check_SCRIPTS): Add script_test_4.sh.
786 (check_DATA): Add script_test_4.stdout.
787 (MOSTLYCLEANFILES): Likewise.
788 (script_test_4): New target.
789 (script_test_4.stdout): New target.
790 * testsuite/Makefile.in: Rebuild.
791
4f2a9edd
ILT
792 * sparc.cc: Add definitions for Output_data_plt_sparc class
793 constants.
794
f5314dd5
DM
7952008-04-14 David S. Miller <davem@davemloft.net>
796
797 * sparc.cc: New file.
798 * Makefile.am (TARGETSOURCES): Add sparc.cc
799 (ALL_TARGETOBJS): Add sparc.$(OBJEXT)
800 * configure.tgt: Document targ_extra_size and
801 targ_extra_big_endian. Add entries for sparc-* and
802 sparc64-*.
803 * configure.ac: Handle targ_extra_size and
804 targ_extra_big_endian.
805 * Makefile.in: Rebuild.
806 * configure: Likewise.
807 * po/POTFILES.in: Likewise.
808 * po/gold.pot: Likewise.
809
154e0e9a
ILT
8102008-04-14 Ian Lance Taylor <iant@google.com>
811
812 * layout.cc (Layout::Layout): Initialize sections_are_attached_.
813 (Layout::get_output_section): Ignore SHF_WRITE and SHF_EXECINSTR
814 in the name/type/flags to section mapping. Don't call
815 allocate_output_section.
816 (Layout::choose_output_section): Change parameter from adjust_name
817 to is_input_section. Don't permit input sections after sections
818 are attached to segments. Don't call allocate_output_section.
819 (Layout::layout_eh_frame): Call update_flags_for_input_section,
820 not write_enable_output_section.
821 (Layout::make_output_section): Don't push to
822 unattached_section_list_ nor call attach_to_segment. Call
823 attach_section_to_segment if sections are attached.
824 (Layout::attach_sections_to_segments): New function.
825 (Layout::attach_section_to_segment): New function.
826 (Layout::attach_allocated_section_to_segment): Rename from
827 attach_to_segment. Remove flags parameter.
828 (Layout::allocate_output_section): Remove function.
829 (Layout::write_enable_output_section): Remove function.
830 * layout.h (class Layout): Update for above changes. Add new
831 field sections_are_attached_.
832 * output.h (Output_section::update_flags_for_input_section): New
833 function.
834 * output.cc (Output_section::add_input_section): Call
835 update_flags_for_input_section.
836 * gold.cc (queue_middle_tasks): Call attach_sections_to_segments.
837
009a67a2
CC
8382008-04-11 Cary Coutant <ccoutant@google.com>
839
840 * i386.cc (Target_i386::got_mod_index_entry): Restore code previously
841 thought unnecessary.
842 * x86_64.cc (Target_x86_64::got_mod_index_entry): Likewise.
843
759b1a24
ILT
8442008-04-11 Ian Lance Taylor <iant@google.com>
845
846 * output.h (class Output_section_data): Remove inline definition
847 of set_addralign.
848 * output.cc (Output_section_data::set_addralign): New function.
849
c2b45e22
CC
8502008-04-11 Cary Coutant <ccoutant@google.com>
851
852 Add support for TLS descriptors for i386 and x86_64.
853 * i386.cc (Target_i386::Relocate::tls_desc_gd_to_ie): New function.
854 (Target_i386::Relocate::tls_desc_gd_to_le): New function.
855 (Target_i386::Got_type): Add GOT_TYPE_TLS_NOFFSET and
856 GOT_TYPE_TLS_DESC.
857 (Target_i386::got_mod_index_entry): Remove unnecessary code.
858 (Target_i386::Scan::local): Implement R_386_TLS_GOTDESC and
859 R_386_TLS_DESC_CALL relocations. Fix problem with initial-exec
860 relocations.
861 (Target_i386::Scan::global): Fix problem with GD-to-IE relaxation.
862 Implement R_386_TLS_GOTDESC and R_386_TLS_DESC_CALL relocations;
863 Fix problem with initial-exec relocations.
864 (Target_i386::Relocate::relocate_tls): Likewise.
865 (Target_i386::Relocate::tls_gd_to_ie): Fix problem with GD-to-IE
866 relaxation.
867 * output.cc (Output_data_dynamic::Dynamic_entry::write): Add
868 support for section-plus-offset dynamic table entries.
869 * output.h (Output_data_dynamic::add_section_plus_offset): New function.
870 (Output_data_dynamic::Dynamic_entry): Add support for
871 section-plus-offset dynamic table entries.
872 (Output_data_dynamic::Classification): Likewise.
873 (Output_data_dynamic::classification_): Renamed offset_.
874 * x86_64.cc (Target_x86_64::Relocate::tls_desc_gd_to_ie): New function.
875 (Target_x86_64::Relocate::tls_desc_gd_to_le): New function.
876 (Target_x86_64::make_plt_section): New function.
877 (Target_x86_64::reserve_tlsdesc_entries): New function.
878 (Output_data_plt_x86_64::Output_data_plt_x86_64): Add new parameter.
879 (Output_data_plt_x86_64::reserve_tlsdesc_entry): New function.
880 (Output_data_plt_x86_64::has_tlsdesc_entry): New function.
881 (Output_data_plt_x86_64::get_tlsdesc_got_offset): New function.
882 (Output_data_plt_x86_64::get_tlsdesc_plt_offset): New function.
883 (Output_data_plt_x86_64::tlsdesc_plt_entry): New field.
884 (Output_data_plt_x86_64::set_final_data_size): Move out of line;
885 add extra PLT entry for TLS descriptors.
886 (Output_data_plt_x86_64::got_): New field.
887 (Output_data_plt_x86_64::tlsdesc_got_offset_): New field.
888 (Output_data_plt_x86_64::Output_data_plt_x86_64): Initialize new
889 fields.
890 (Output_data_plt_x86_64::do_write): Write extra PLT entry for TLS
891 descriptors.
892 (Target_x86_64::make_plt_entry): Factor out make_plt_section.
893 (Target_x86_64::got_mod_index_entry): Remove unnecessary code.
894 (Target_x86_64::Scan::local): Implement R_386_TLS_GOTDESC and
895 R_386_TLS_DESC_CALL relocations.
896 (Target_x86_64::Scan::global): Likewise.
897 (Target_x86_64::do_finalize_sections): Add dynamic table entries
898 for TLS descriptors.
899 (Relocate::relocate_tls): Fix problem with GD-to-IE relaxation.
900 Implement R_386_TLS_GOTDESC and R_386_TLS_DESC_CALL relocations.
901 (Target_x86_64::Relocate::tls_gd_to_ie): Fix problem with
902 GD-to-IE relaxation.
903 * configure.ac: Export new conditional variables TLS_GNU2_DIALECT
904 and TLS_DESCRIPTORS.
905 * Makefile.in: Rebuild.
906 * configure: Rebuild.
907 * testsuite/Makefile.am (tls_shared_gd_to_ie_test): New target.
908 (tls_test_shared2.so): New target.
909 (tls_shared_gd_to_ie_test_SOURCES): New variable.
910 (tls_shared_gd_to_ie_test_DEPENDENCIES): New variable.
911 (tls_shared_gd_to_ie_test_LDFLAGS): New variable.
912 (tls_shared_gd_to_ie_test_LDADD): New variable.
913 (tls_shared_gnu2_gd_to_ie_test): New target.
914 (tls_test_gnu2.o, tls_test_file2_gnu2.o, tls_test_gnu2_shared2.so):
915 New targets.
916 (tls_shared_gnu2_gd_to_ie_test_SOURCES): New variable.
917 (ls_shared_gnu2_gd_to_ie_test_DEPENDENCIES): New variable.
918 (tls_shared_gnu2_gd_to_ie_test_LDFLAGS): New variable.
919 (tls_shared_gnu2_gd_to_ie_test_LDADD): New variable.
920 (tls_shared_gnu2_test): New target.
921 (tls_test_gnu2_shared.so): New target.
922 (tls_shared_gnu2_test_SOURCES): New variable.
923 (tls_shared_gnu2_test_DEPENDENCIES): New variable.
924 (tls_shared_gnu2_test_LDFLAGS): New variable.
925 (tls_shared_gnu2_test_LDADD): New variable.
926 * testsuite/Makefile.in: Rebuild.
927 * testsuite/Makefile.
928
83bfb6b7
ILT
9292008-04-11 Ian Lance Taylor <iant@google.com>
930
931 * testsuite/Makefile.am (justsyms_2r.o): Add dependency on
932 justsyms.t.
933 * testsuite/Makefile.in: Rebuild.
934
935 * testsuite/script_test_2a.cc (script_test_string_a): Make 8 bytes
936 long.
937 * testsuite/script_test_2.cc (main): Adjust test.
938
706e1f5e
ILT
9392008-04-11 David S. Miller <davem@davemloft.net>
940 Ian Lance Taylor <iant@google.com>
941
942 * options.h (General_options): Add entries for '-Y' and
943 '-relax'.
944 * options.cc (General_options:finalize): If -Y was used, add those
945 entries to the library path instead of the default "/lib" and
946 "/usr/lib".
947
7c98e6bb
DM
9482008-04-11 David S. Miller <davem@davemloft.net>
949
950 * testsuite/justsyms.t: Start at 0x100.
951 * testsuite/justsyms_1.cc: Adjust justsyms_string assertion.
83bfb6b7
ILT
952 * testsuite/script_test_2b.cc (script_test_string_b): Make 8 bytes
953 long.
954 * testsuite/script_test_2.cc: Adjust string and section length
955 checks.
7c98e6bb 956
99a37bfd
ILT
9572008-04-09 Ian Lance Taylor <iant@google.com>
958
2cefc357
ILT
959 PR gold/5996
960 * script-sections.cc (Sections_element::allocate_to_segment): Add
961 orphan parameter.
962 (Output_section_definition::allocate_to_segment): Likewise.
963 (Orphan_output_section::allocate_to_segment): Likewise.
964 (Script_sections::attach_sections_using_phdrs_clause): Don't
965 propagate non-PT_LOAD segments to orphan sections.
966 * testsuite/Makefile.am (script_test_3.stdout): Generate using
967 readelf rather than objdump.
968 * testsuite/script_test_3.sh: Adjust accordingly. Test that
969 .interp section and PT_INTERP segment are the same size.
970 * testsuite/Makefile.in: Rebuild.
971
99a37bfd
ILT
972 * symtab.cc (Symbol_table::add_from_dynobj): Only look for weak
973 aliases for symbols defined in the same object.
974 * testsuite/Makefile.am (check_PROGRAMS): Add weak_alias_test.
975 (weak_alias_test_SOURCES): New variable.
976 (weak_alias_test_DEPENDENCIES): New variable.
977 (weak_alias_test_LDFLAGS): New variable.
978 (weak_alias_test_LDADD): New variable.
979 (weak_alias_test_1_pic.o, weak_alias_test_1.so): New targets.
980 (weak_alias_test_2_pic.o, weak_alias_test_2.so): New targets.
981 (weak_alias_test_3.o): New target.
982 (weak_alias_test_4_pic.o, weak_alias_test_4.so): New targets.
983 * testsuite/weak_alias_test_main.cc: New file.
984 * testsuite/weak_alias_test_1.cc: New file.
985 * testsuite/weak_alias_test_2.cc: New file.
986 * testsuite/weak_alias_test_3.cc: New file.
987
780e49c5
ILT
9882008-04-08 Ian Lance Taylor <iant@google.com>
989
cdb0b8f5
ILT
990 * options.h (class General_options): Add --noinhibit-exec option.
991 * main.cc (main): Check --noinhibit-exec.
992
0864d551
ILT
993 * options.h (class General_options): Define --wrap as a special
994 option. Add wrap_symbols_ field.
995 (General_options::any_wrap_symbols): New function.
996 (General_options::is_wrap_symbol): New function.
997 * options.cc (General_options::parse_wrap): New function.
998 (General_options::General_options): Initialize wrap_symbols_.
999 * symtab.cc (Symbol_table::wrap_symbol): New function.
1000 (Symbol_table::add_from_object): Handle --wrap.
1001 * symtab.h (class Symbol_table): Declare wrap_symbol.
1002 * target.h (Target::wrap_char): New function.
1003 (Target::Target_info): Add wrap_char field.
1004 * i386.cc (Target_i386::i386_info): Initialize wrap_char.
1005 * x86_64.cc (Target_x86_64::x86_64_info): Likewise.
1006 * testsuite/testfile.cc (Target_test::test_target_info):
1007 Likewise.
1008
789aa6de
ILT
1009 * errors.cc (Errors::undefined_symbol): Mention symbol version if
1010 there is one.
1011
2c38906f
ILT
1012 * layout.h (class Layout): Add added_eh_frame_data_ field.
1013 * layout.cc (Layout::Layout): Initialize new field.
1014 (Layout::layout_eh_frame): Don't add eh_frame_data_ to .eh_frame
1015 output section until we find a section we merged successfully.
1016 * object.cc (Sized_relobj::check_eh_frame_flags): Don't require
1017 that the size be non-zero.
1018
780e49c5
ILT
1019 * merge.cc (Object_merge_map::get_output_offset): Remove inline
1020 qualifier.
1021
7fcd0256
ILT
10222008-04-08 Craig Silverstein <csilvers@google.com>
1023
1024 * configure.ac: Export new conditional variable HAVE_ZLIB.
1025 * testsuite/Makefile.am (flagstest_o_specialfile): Condition
1026 on HAVE_ZLIB.
1027 (flagstest_o_specialfile_and_compress_debug_sections): Likewise.
1028 * configure, Makefile.in, testsuite/Makefile.in: Rebuild.
1029
6835af53
ILT
10302008-04-07 Ian Lance Taylor <iant@google.com>
1031
e24f324c
ILT
1032 * version.cc (version_string): Set to "1.5".
1033
a036edd8
ILT
1034 * x86_64.cc (Target_x86_64::Scan): Change from struct to class.
1035 Add issued_non_pic_error_ field. Declare check_non_pic.
1036 (Target_x86_64::Scan::check_non_pic): New function.
1037 (Target_x86_64::Scan::local): Call check_non_pic as appropriate.
1038 (Target_x86_64::Scan::global): Likewise.
1039
624f8810
ILT
1040 * output.cc (Output_reloc<SHT_REL>::local_section_offset): Add
1041 addend parameter. Change caller. Handle merge sections.
1042 (Output_reloc<SHT_REL>::symbol_value): Change parameter type from
1043 Address to Addend. Don't add in the result of
1044 local_section_offset, pass down the addend and use the returned
1045 value.
1046 * output.h (class Output_reloc<SHT_REL>): Add Addend typedef.
1047 Update declarations of local_section_offset and symbol_value.
1048 * testsuite/two_file_test_1.cc (t18): New function.
1049 * testsuite/two_file_test_2.cc (f18): New function.
1050 * testsuite/two_file_test_main.cc (main): Call t18.
1051 * testsuite/two_file_test.h (t18, f18): Declare.
1052
6835af53
ILT
1053 * configure.ac: Don't test for objdump, c++filt, or readelf.
1054 * testsuite/Makefile.am: Remove READELF and OBJDUMP_AND_CPPFILT
1055 conditionals.
1056 (TEST_READELF): New variable.
1057 (TEST_OBJDUMP, TEST_CXXFILT, TEST_STRIP): New variables.
1058 (check_PROGRAMS): Add two_file_strip_test.
1059 (two_file_strip_test): New target.
1060 (check_PROGRAMS): Add two_file_same_shared_strip_test.
1061 (two_file_same_shared_strip_test_SOURCES): New variable.
1062 (two_file_same_shared_strip_test_DEPENDENCIES): New variable.
1063 (two_file_same_shared_strip_test_LDFLAGS): New variable.
1064 (two_file_same_shared_strip_test_LDADD): New variable.
1065 (two_file_shared_strip.so): New target.
1066 (ver_test_2.syms, ver_test_4.syms): Use TEST_READELF.
1067 (ver_test_5.syms, ver_test_7.syms): Likewise.
1068 (ver_matching_test.stdout): Use TEST_OBJDUMP and TEST_CXXFILT.
1069 (strip_test_3.stdout): Use TEST_OBJDUMP.
1070 * configure, Makefile.in, testsuite/Makefile.in: Rebuild.
1071
86925eef
CC
10722008-04-04 Cary Coutant <ccoutant@google.com>
1073
1074 * symtab.h (Symbol::is_weak_undefined): New function.
1075 (Symbol::is_strong_undefined): New function.
1076 (Symbol::is_absolute): New function.
1077 (Symbol::needs_plt_entry): Exclude weak undefined symbols.
1078 (Symbol::needs_dynamic_reloc): Exclude weak undefined and
1079 absolute symbols.
1080 * testsuite/Makefile.am (check_PROGRAMS): Add weak_undef_test.
1081 (weak_undef_test): New target.
1082 * testsuite/Makefile.in: Rebuild.
1083 * testsuite/weak_undef_file1.cc: New file.
1084 * testsuite/weak_undef_file2.cc: New file.
1085 * testsuite/weak_undef_test.cc: New file.
1086
126f3ece
ILT
10872008-04-03 Craig Silverstein <csilvers@google.com>
1088
1089 * compressed_output.h (class Output_compressed_section): Use
1090 unsigned buffer.
1091 * compressed_output.cc (zlib_compress): Use unsigned buffers,
1092 add zlib header.
1093 (zlib_compressed_suffix): Removed.
1094 (Output_compressed_section::set_final_data_size): Use unsigned
1095 buffers.
1096 * testsuite/Makefile.am (flagstest_compress_debug_sections):
1097 Fix linker invocation.
1098 (flagstest_o_specialfile_and_compress_debug_sections):
1099 Likewise.
1100 * testsuite/Makefile.in: Regenerated.
1101
deae2a14
DM
11022008-04-02 David S. Miller <davem@davemloft.net>
1103
1104 * dwarf_reader.cc (Sized_dwarf_line_info::read_header_prolog,
1105 Sized_dwarf_line_info::process_one_opcode): Use Swap_unaligned.
1106
70752818
ILT
11072008-04-02 Craig Silverstein <csilvers@google.com>
1108
1109 * TODO: New file.
1110
39d0cb0e
ILT
11112008-04-02 Ian Lance Taylor <iant@google.com>
1112
1113 * fileread.cc (File_read::find_view): Add byteshift and vshifted
1114 parameters. Update for new key type to views_. Change all
1115 callers.
1116 (File_read::read): Adjust for byteshift in returned view.
1117 (File_read::add_view): New function, broken out of
1118 find_and_make_view.
1119 (File_read::make_view): New function, broken out of
1120 find_and_make_view.
1121 (File_read::find_or_make_view): Add offset and aligned
1122 parameters. Rewrite accordingly. Change all callers.
1123 (File_read::get_view): Add offset and aligned parameters. Adjust
1124 for byteshift in return value.
1125 (File_read::get_lasting_view): Likewise.
1126 * fileread.h (class File_read): Update declarations.
1127 (class File_read::View): Add byteshift_ field. Add byteshift to
1128 constructor. Add byteshift method.
1129 * archive.h (Archive::clear_uncached_views): New function.
1130 (Archive::get_view): Add aligned parameter. Change all callers.
1131 * object.h (Object::get_view): Add aligned parameter. Change all
1132 callers.
1133 (Object::get_lasting_view): Likewise.
1134
1135 * fileread.cc (File_read::release): Don't call clear_views if
1136 there are multiple objects.
1137 * fileread.h (File_read::clear_uncached_views): New function.
1138 * archive.cc (Add_archive_symbols::run): Call clear_uncached_views
1139 on the archive.
1140
a1207466
CC
11412008-03-31 Cary Coutant <ccoutant@google.com>
1142
1143 Add thin archive support.
1144 * archive.cc (Archive::armagt): New const.
1145 (Archive::setup): Remove task parameter and calls to unlock.
1146 (Archive::unlock_nested_archives): New function.
1147 (Archive::read_header): Add nested_off parameter. Change
1148 all callers.
1149 (Archive::interpret_header): Likewise.
1150 (Archive::include_all_members): Change to handle thin
1151 archives.
1152 (Archive::include_member): Likewise.
1153 * archive.h (Archive::Archive): Add new parameters and
1154 initializers.
1155 (Archive::armagt): New const.
1156 (Archive::setup): Remove task parameter.
1157 (Archive::unlock_nested_archives): New function.
1158 (Archive::read_header): Add nested_off parameter.
1159 (Archive::interpret_header): Likewise.
1160 (Archive::Nested_archive_table): New typedef.
1161 (Archive::is_thin_archive_): New field.
1162 (Archive::nested_archives_): New field.
1163 (Archive::options_): New field.
1164 (Archive::dirpath_): New field.
1165 (Archive::task_): New field.
1166 * readsyms.cc (Read_symbols::do_read_symbols): Add check
1167 for thin archives. Pass additional parameters to
1168 Archive::Archive. Unlock the archive file after calling
1169 Archive::setup.
1170
479f6503
ILT
11712008-03-29 Ian Lance Taylor <iant@google.com>
1172
686c8caf
ILT
1173 * symtab.cc (Symbol_table::do_define_as_constant): Don't force a
1174 version symbol to be local.
1175 * testsuite/ver_test_4.sh: New file.
1176 * testsuite/Makefile.am (check_SCRIPTS): Add ver_test_4.sh.
1177 (check_DATA): Add ver_test_4.syms.
1178 (ver_test_4.syms): New target.
1179 * testsuite/Makefile.in: Rebuild.
1180
ab794b6b
ILT
1181 * output.cc
1182 (Output_section::Input_section_sort_entry::has_priority): New
1183 function.
1184 (Output_section::Input_section_sort_entry::match_file_name): New
1185 function.
1186 (Output_section::Input_section_sort_entry::match_section_name):
1187 Remove.
1188 (Output_section::Input_section_sort_entry::match_section_name_prefix):
1189 Remove.
1190 (Output_section::Input_section_sort_entry::match_section_file):
1191 Remove.
1192 (Output_section::Input_section_sort_compare::operator()): Rewrite
1193 using new Input_section_sort_entry functions. Sort crtbegin and
1194 crtend first. Sort sections with no priority before sections with
1195 a priority.
1196 * testsuite/initpri1.c (d3): Check j != 4.
1197 (cd5): New constructor/destructor function.
1198 (main): Check j != 2.
1199
479f6503
ILT
1200 * symtab.cc (Symbol_table::add_from_object): If we don't use the
1201 new symbol when resolving, don't call set_is_default.
1202 * testsuite/ver_test_7.cc: New file.
1203 * testsuite/ver_test_7.sh: New file.
1204 * testsuite/Makefile.am (ver_test_7.so): New target.
1205 (ver_test_7.o): New target.
1206 (check_SCRIPTS): Add ver_test_7.sh.
1207 (check_DATA): Add ver_test_7.syms.
1208 (ver_test_7.syms): New target.
1209
2fd32231
ILT
12102008-03-28 Ian Lance Taylor <iant@google.com>
1211
1212 * layout.cc (Layout::layout): If we see an input section with a
1213 name that needs sorting, set the must_sort flag for the output
1214 section.
1215 (Layout::make_output_section): If the name of the output section
1216 indicates that it might require sorting, set the may_sort flag.
1217 * output.h (Output_section::may_sort_attached_input_sections): New
1218 function.
1219 (Output_section::set_may_sort_attached_input_sections): New
1220 function.
1221 (Output_section::must_sort_attached_input_sections): New
1222 function.
1223 (Output_section::set_must_sort_attached_input_sections): New
1224 function.
1225 (class Output_section): Declare Input_section_sort_entry. Define
1226 Input_section_sort_compare. Declare
1227 sort_attached_input_sections. Add new fields:
1228 may_sort_attached_input_sections_,
1229 must_sort_attached_input_sections_,
1230 attached_input_sections_are_sorted_.
1231 * output.cc (Output_section::Output_section): Initialize new
1232 fields.
1233 (Output_section::add_input_section): Add an entry to
1234 input_sections_ if may_sort or must_sort are true.
1235 (Output_section::set_final_data_size): Call
1236 sort_attached_input_sections if necessary.
1237 (Output_section::Input_section_sort_entry): Define new class.
1238 (Output_section::Input_section_sort_compare::operator()): New
1239 function.
1240 (Output_section::sort_attached_input_sections): New function.
1241 * configure.ac: Check whether the compiler supports constructor
1242 priorities. Define a CONSTRUCTOR_PRIORITY automake conditional.
1243 * testsuite/initpri1.c: New file.
1244 * testsuite/Makefile.am (check_PROGRAMS): Add initpri1 if
1245 CONSTRUCTOR_PRIORITY.
1246 (initpri1_SOURCES, initpri1_DEPENDENCIES): New variables.
1247 (initpri1_LDFLAGS): New variable.
1248 * configure, Makefile.in, testsuite/Makefile.in: Rebuild.
1249
18e6b24e
ILT
12502008-03-27 Ian Lance Taylor <iant@google.com>
1251
49bdd526
ILT
1252 * common.cc (Sort_commons::operator): Correct sorting algorithm.
1253 * testsuite/common_test_1.c: New file.
1254 * testsuite/Makefile.am (check_PROGRAMS): Add common_test_1.
1255 (common_test_1_SOURCES): New variable.
1256 (common_test_1_DEPENDENCIES): New variable.
1257 (common_test_1_LDFLAGS): New variable.
1258
18e6b24e
ILT
1259 * symtab.cc (Symbol_table::add_from_object): Handle saw_undefined_
1260 and commons_ correctly when NAME/VERSION does not override
1261 NAME/NULL.
1262 * testsuite/ver_test_6.c: New file.
1263 * testsuite/Makefile.am (check_PROGRAMS): Add ver_test_6
1264 (ver_test_6_SOURCES, ver_test_6_DEPENDENCIES): New variables.
1265 (ver_test_6_LDFLAGS, ver_test_6_LDADD): New variables.
1266
04bf7072
ILT
12672008-03-26 Ian Lance Taylor <iant@google.com>
1268
5871526f
ILT
1269 * symtab.cc (Symbol_table::add_from_relobj): Don't set the version
1270 of an undefined symbol from a version script.
1271 * testsuite/Makefile.am (ver_test_5.so): New target.
1272 (ver_test_5.o): New target.
1273 (check_SCRIPTS): Add ver_test_5.sh.
1274 (check_DATA): Add ver_test_5.syms.
1275 (ver_test_5.syms): New target.
1276 * testsuite/ver_test_5.cc: New file.
1277 * testsuite/ver_test_5.script: New file.
1278 * testsuite/ver_test_5.sh: New file.
1279 * Makefile.in, testsuite/Makefile.in: Rebuild.
1280
04bf7072
ILT
1281 PR gold/5986
1282 Fix problems building gold with gcc 4.3.0.
1283 * gold.h (TEMPLATE_ATTRIBUTE_PRINTF_4): Define.
1284 (gold_error_at_location, gold_warning_at_location): Use it.
1285 * configure.ac: Check whether we can compile and use a template
1286 function with a printf attribute.
1287 * x86_64.cc (Target_x86_64::do_code_fill): Swap out a 32-bit value
1288 when jumping over bytes.
1289 * object.cc: Instantiate Object::read_section_data.
1290 * debug.h: Include <cstring>
1291 * dwarf_reader.cc: Include <algorithm>
1292 * main.cc: Include <cstring>.
1293 * options.cc: Include <cstring>.
1294 * output.cc: Include <cstring>.
1295 * script.cc: Include <cstring>.
1296 * script.h: Include <string>.
1297 * symtab.cc: Include <cstring> and <algorithm>.
1298 * target-select.cc: Include <cstring>.
1299 * version.cc: Include <string>.
1300 * testsuite/testmain.cc: Include <cstdlib>.
1301 * configure, config.in: Rebuild.
1302
874c5b28
ILT
13032008-03-25 Ian Lance Taylor <iant@google.com>
1304
819d6c3a
ILT
1305 * options.cc: Include "../bfd/bfdver.h".
1306 (options::help): Print bug reporting address.
1307
f4b2c6f5
ILT
1308 * version.cc (print_version): Adjust output for current value of
1309 BFD_VERSION_STRING.
1310
1311 * NEWS: New file.
1312
e96caa79
ILT
1313 * options.cc (options::help): Print list of supported targets.
1314 * target-select.h: Include <vector>.
1315 (class Target_selector): Make machine_, size_, and is_big_endian_
1316 fields const. Add bfd_name_ and instantiated_target_ fields.
1317 (Target_selector::Target_selector): Add bfd_name parameter.
1318 (Target_selector::recognize): Make non-virtual, call
1319 do_recognize.
1320 (Target_selector::recognize_by_name): Make non-virtual, call
1321 do_recognize_by_name.
1322 (Target_selector::supported_names): New function.
1323 (Target_selector::bfd_name): New function.
1324 (Target_selector::do_instantiate_target): New pure virtual
1325 function.
1326 (Target_selector::do_recognize): New virtual function.
1327 (Target_selector::do_recognize_by_name): New virtual function.
1328 (Target_selector::instantiate_target): New private function.
1329 (supported_target_names): Declare.
1330 * target-select.cc (Target_selector::Target_selector): Update for
1331 new parameter and fields.
1332 (select_target_by_name): Check that the name matches before
1333 calling recognize_by_name.
1334 (supported_target_names): New function.
1335 * i386.cc (class Target_selector_i386): Update Target_selector
1336 constructor call. Remove recognize and recognize_by_name. Add
1337 do_instantiate_target.
1338 * x86_64.cc (class Target_selector_x86_64): Likewise.
1339 * testsuite/testfile.cc (class Target_selector_test): Update for
1340 changes to Target_selector.
1341
874c5b28
ILT
1342 * README: Rewrite, with some notes on unsupported features.
1343
0a65a3a7
CC
13442008-03-24 Cary Coutant <ccoutant@google.com>
1345
1346 * i386.cc (Target_i386::Got_type): New enum declaration.
1347 (Target_i386::Scan::local): Updated callers of Output_data_got
1348 member functions.
1349 (Target_i386::Scan::global): Likewise.
1350 (Target_i386::Relocate::relocate): Likewise.
1351 (Target_i386::Relocate::relocate_tls): Likewise.
1352 * object.h (Got_offset_list): New class.
1353 (Sized_relobj::local_has_got_offset): Added got_type parameter.
1354 (Sized_relobj::local_got_offset): Likewise.
1355 (Sized_relobj::set_local_got_offset): Likewise.
1356 (Sized_relobj::local_has_tls_got_offset): Removed.
1357 (Sized_relobj::local_tls_got_offset): Removed.
1358 (Sized_relobj::set_local_tls_got_offset): Removed.
1359 (Sized_relobj::Local_got_offsets): Changed to store a list of offsets.
1360 * output.cc (Output_data_got::add_global): Added got_type parameter.
1361 (Output_data_got::add_global_with_rel): Likewise.
1362 (Output_data_got::add_global_with_rela): Likewise.
1363 (Output_data_got::add_global_pair_with_rel): New function.
1364 (Output_data_got::add_global_pair_with_rela): New function.
1365 (Output_data_got::add_local): Added got_type parameter.
1366 (Output_data_got::add_local_with_rel): Likewise.
1367 (Output_data_got::add_local_with_rela): Likewise.
1368 (Output_data_got::add_local_pair_with_rel): New function.
1369 (Output_data_got::add_local_pair_with_rela): New function.
1370 (Output_data_got::add_global_tls): Removed.
1371 (Output_data_got::add_global_tls_with_rel): Removed.
1372 (Output_data_got::add_global_tls_with_rela): Removed.
1373 (Output_data_got::add_local_tls): Removed.
1374 (Output_data_got::add_local_tls_with_rel): Removed.
1375 (Output_data_got::add_local_tls_with_rela): Removed.
1376 * output.h (Output_data_got::add_global): Added got_type parameter.
1377 (Output_data_got::add_global_with_rel): Likewise.
1378 (Output_data_got::add_global_with_rela): Likewise.
1379 (Output_data_got::add_global_pair_with_rel): New function.
1380 (Output_data_got::add_global_pair_with_rela): New function.
1381 (Output_data_got::add_local): Added got_type parameter.
1382 (Output_data_got::add_local_with_rel): Likewise.
1383 (Output_data_got::add_local_with_rela): Likewise.
1384 (Output_data_got::add_local_pair_with_rel): New function.
1385 (Output_data_got::add_local_pair_with_rela): New function.
1386 (Output_data_got::add_global_tls): Removed.
1387 (Output_data_got::add_global_tls_with_rel): Removed.
1388 (Output_data_got::add_global_tls_with_rela): Removed.
1389 (Output_data_got::add_local_tls): Removed.
1390 (Output_data_got::add_local_tls_with_rel): Removed.
1391 (Output_data_got::add_local_tls_with_rela): Removed.
1392 * resolve.cc (Symbol::override_base_with_special): Removed
1393 reference to has_got_offset_ field.
1394 * symtab.cc (Symbol::init_fields): Replaced initialization
1395 of got_offset_ with got_offsets_. Removed initialization
1396 of has_got_offset_
53fcba31 1397 * symtab.h (Symbol::has_got_offset): Aded got_type parameter.
0a65a3a7
CC
1398 (Symbol::got_offset): Likewise.
1399 (Symbol::set_got_offset): Likewise.
1400 (Symbol::has_tls_got_offset): Removed.
1401 (Symbol::tls_got_offset): Removed.
1402 (Symbol::set_tls_got_offset): Removed.
1403 (Symbol::got_offset_): Removed.
1404 (Symbol::tls_mod_got_offset_): Removed.
1405 (Symbol::tls_pair_got_offset_): Removed.
1406 (Symbol::got_offsets_): New field.
1407 (Symbol::has_got_offset): Removed.
1408 (Symbol::has_tls_mod_got_offset): Removed.
1409 (Symbol::has_tls_pair_got_offset): Removed.
1410 * x86_64.cc (Target_x86_64::Got_type): New enum declaration.
1411 (Target_x86_64::Scan::local): Updated callers of Output_data_got
1412 member functions.
1413 (Target_x86_64::Scan::global): Likewise.
1414 (Target_x86_64::Relocate::relocate): Likewise.
1415 (Target_x86_64::Relocate::relocate_tls): Likewise.
1416
bd52eafb
BE
14172008-03-25 Ben Elliston <bje@au.ibm.com>
1418
1419 * yyscript.y: Fix spelling error in comment.
1420
8b105e34
ILT
14212008-03-24 Ian Lance Taylor <iant@google.com>
1422
8ed814a9
ILT
1423 * options.h (class General_options): Define build_id option.
1424 * layout.h (class Layout): Declare write_build_id, create_note,
1425 create_build_id. Add build_id_note_ member.
1426 * layout.cc: Include <cerrno>, <fcntl.h>, <unistd.h>,
1427 "libiberty.h", "md5.h", "sha1.h".
1428 (Layout::Layout): Initialize eh_frame_data_,
1429 eh_frame_hdr_section_, and build_id_note_.
1430 (Layout::finalize): Call create_build_id.
1431 (Layout::create_note): New function, broken out of
1432 Layout::create_gold_note.
1433 (Layout::create_gold_note): Call create_note.
1434 (Layout::create_build_id): New function.
1435 (Layout::write_build_id): New function.
1436 (Close_task_runner::run): Call write_build_id.
1437
8b105e34
ILT
1438 * x86_64.cc: Correct license to GPLv3.
1439
086a1841
ILT
14402008-03-23 Ian Lance Taylor <iant@google.com>
1441
1442 * options.cc: Include "demangle.h".
1443 (parse_optional_string): New function.
1444 (parse_long_option): Handle takes_optional_argument.
1445 (parse_short_option): Update dash_z initializer. Handle
1446 takes_optional_argument.
1447 (General_options::General_options): Initialize do_demangle_.
1448 (General_options::finalize): Set do_demangle_. Handle demangling
1449 style.
1450 * options.h (parse_optional_string): Declare.
1451 (struct One_option): Add optional_arg field. Update constructor.
1452 Update call constructor calls. Add takes_optional_argument
1453 function.
1454 (DEFINE_var): Add optional_arg__ parameter. Change all callers.
1455 (DEFINE_optional_string): Define.
1456 (General_options::demangle): Change from DEFINE_bool to
1457 DEFINE_optional_string.
1458 (General_options::no_demangle): New function.
1459 (General_options::do_demangle): New function.
1460 (General_options::set_do_demangle): New function.
1461 (General_options::execstack_status_): Move definition to end of
1462 class definition.
1463 (General_options::static_): Likewise.
1464 (General_options::do_demangle_): New field.
1465 * object.cc (big_endian>::get_symbol_location_info): Call
1466 Options::do_demangle, not Options::demangle.
1467 * symtab.cc (demangle): Likewise.
1468
cbb93e63
ILT
14692008-03-22 Ian Lance Taylor <iant@google.com>
1470
1471 * gold.h: Include <cstddef> and <sys/types.h>
1472 * options.h: Include <cstring>.
1473
ec531623
ILT
14742008-03-21 Ian Lance Taylor <iant@google.com>
1475
1476 * Added source code to GNU binutils.
1477
This page took 0.094191 seconds and 4 git commands to generate.