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