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