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