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