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