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