* script-sections.cc (Script_sections::place_orphan): Initialize
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2008-06-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2
3 * configure: Regenerate.
4
5 2008-06-17 Alan Modra <amodra@bigpond.net.au>
6
7 * elf32-spu.c (struct spu_link_hash_table): Add extra_stack_space.
8 (spu_elf_check_vma): Add extra_stack_space param, copy to htab.
9 (spu_elf_auto_overlay): Use it.
10 (RECURSE_UNMARK): Define as 0.
11 (unmark_overlay_section): Heed RECURSE_UNMARK.
12 * elf32-spu.h (spu_elf_check_vma): Update prototype.
13
14 2008-06-12 DJ Delorie <dj@redhat.com>
15
16 * elf32-m32c.c (ELF_MACHINE_ALT1): Define as EM_M32C_OLD.
17
18 2008-06-09 Paul Brook <paul@codesourcery.com>
19
20 bfd/
21 * elf32-arm.c (elf32_arm_merge_private_bfd_data): Allow BE8 shared
22 libraries.
23
24 2008-06-09 Christophe Lyon <christophe.lyon@st.com>
25
26 * elf32-arm.c (arm_stub_is_thumb): Define.
27 (elf32_arm_final_link_relocate): Handle near mode switching stubs.
28
29 2008-06-07 Alan Modra <amodra@bigpond.net.au>
30
31 * elf32-spu.c (spu_elf_auto_overlay): Add valid area below sp
32 to stack calculation.
33
34 2008-06-06 Paul Brook <paul@codesourcery.com>
35
36 bfd/
37 * elf32-arm.c (elf32_arm_merge_private_bfd_data): Reject BE8 input.
38
39 2008-06-06 Alan Modra <amodra@bigpond.net.au>
40
41 * elf32-spu.c (spu_elf_auto_overlay): Relax requirement that
42 file names be unique. Specify archive:path in overlay script.
43
44 2008-06-05 Alan Modra <amodra@bigpond.net.au>
45
46 PR ld/6590
47 * elf64-ppc.c (ppc_build_one_stub): Correct reloc offsets.
48
49 2008-06-04 Alan Modra <amodra@bigpond.net.au>
50
51 * elf.c (ignore_section_sym): Don't test section sym value here.
52 (elf_map_symbols): Instead check zero value here as was done prior
53 to 2006-05-26 change.
54
55 2008-06-04 Nick Clifton <nickc@redhat.com>
56
57 PR ld/6019
58 * elf32-avr.c (elf32_avr_relax_section): Handle the case where
59 there are no local symbols.
60
61 2008-06-04 Alan Modra <amodra@bigpond.net.au>
62
63 * elf32-spu.c (get_sym_h): Don't attempt to read global syms.
64 (process_stubs): Likewise.
65 (discover_functions): Don't used cached symbols.
66 (maybe_insert_function): Correct condition under which function
67 array is realloc'd.
68 (mark_functions_via_relocs): Delete unused variable.
69
70 2008-05-30 Frediano Ziglio <frediano.ziglio@vodafone.com>
71 Nick Clifton <nickc@redhat.com>
72
73 PR ld/6511
74 * elf64-hppa.c (allocate_global_data_opd): Default to using the
75 dynamic symbol table for local function names in shared libraries.
76
77 2008-05-29 Jan Kratochvil <jan.kratochvil@redhat.com>
78
79 * elf.c (assign_file_positions_for_load_sections): Adjust pre-section
80 gaps based on VMA and P_VADDR instead of LMA and P_PADDR addresses.
81
82 2008-05-28 Alan Modra <amodra@bigpond.net.au>
83
84 * elf32-spu.c (spu_elf_object_p): New function.
85 (elf_backend_object_p): Define.
86 (build_stub): Correct second word of 8 byte overlay stubs.
87 (spu_elf_relocate_section): Formatting.
88
89 2008-05-24 Carlos Eduardo Seo <cseo@linux.vnet.ibm.com>
90
91 * elf.c (elfcore_write_register_note): New function.
92 * elf-bfd.h (elfcore_write_register_note): New prototype.
93
94 2008-05-22 Christophe Lyon <christophe.lyon@st.com>
95
96 * elf32-arm.c (arm_type_of_stub): Ignore STT_SECTION symbols.
97 (elf32_arm_stub_add_mapping_symbol): Remove.
98 (elf32_arm_add_stub): Don't generate mapping symbols. Change
99 prototype.
100 (elf32_arm_size_stubs): Use new elf32_arm_add_stub
101 prototype. Don't generate thumb to arm glue for calls.
102 (arm_map_one_stub): Define.
103 (elf32_arm_output_arch_local_syms): Generate mapping symbols for
104 long calls stubs.
105
106 2008-05-21 Maxim Kuvyrkov <maxim@codesourcery.com>
107
108 Add multi-GOT support for m68k.
109 * elf32-m68k.c (struct elf_m68k_link_hash_entry: got_entry_key,
110 glist): New fields.
111 (struct elf_m68k_got_entry_key, struct elf_m68k_got_entry,
112 struct elf_m68k_got, struct elf_m68k_bfd2got_entry,
113 struct elf_m68k_multi_got): New data structures.
114 (struct elf_m68k_link_hash_table: local_gp_p, use_neg_got_offsets_p,
115 allow_multigot_p, multi_got_): New fields.
116 (elf_m68k_multi_got): New macro.
117 (elf_m68k_link_hash_newfunc): Initialize new fields of
118 struct elf_m68k_link_hash_entry.
119 (elf_m68k_link_hash_table_create): Initialize new fields of
120 struct elf_m68k_link_hash_table.
121 (elf_m68k_link_hash_table_free): New static function implementing hook.
122 (elf_m68k_init_got, elf_m68k_clear_got, elf_m68k_create_empty_got): New
123 static functions for struct elf_m68k_got.
124 (elf_m68k_init_got_entry_key, elf_m68k_got_entry_hash,
125 elf_m68k_got_entry_eq): New static functions for
126 struct elf_m68k_got_entry.
127 (ELF_M68K_REL_8O_MAX_N_ENTRIES_IN_GOT,
128 ELF_M68K_REL_8O_16O_MAX_N_ENTRIES_IN_GOT): New macros.
129 (enum elf_m68k_get_entry_howto): New enum.
130 (elf_m68k_get_got_entry, elf_m68k_update_got_entry_type,
131 elf_m68k_remove_got_entry_type): New static functions for
132 struct elf_m68k_got_entry.
133 (elf_m68k_add_entry_to_got): New static function.
134 (elf_m68k_bfd2got_entry_hash, elf_m68k_bfd2got_entry_eq,
135 elf_m68k_bfd2got_entry_del, elf_m68k_get_bfd2got_entry): New static
136 functions for struct elf_m68k_bfd2got_entry.
137 (struct elf_m68k_can_merge_gots_arg, elf_m68k_can_merge_gots_1,
138 elf_m68k_can_merge_gots): New traversal.
139 (struct elf_m68k_merge_gots_arg, elf_m68k_merge_gots_1,
140 elf_m68k_merge_gots): Ditto.
141 (struct elf_m68k_finalize_got_offsets_arg,
142 elf_m68k_finalize_got_offsets_1, elf_m68k_finalize_got_offsets): Ditto.
143 (struct elf_m68k_partition_multi_got_arg,
144 elf_m68k_partition_multi_got_1, elf_m68k_init_symndx2h_1,
145 elf_m68k_partition_multi_got): Ditto.
146 (elf_m68k_find_got_entry_ptr, elf_m68k_remove_got_entry): New static
147 functions.
148 (elf_m68k_copy_indirect_symbol): New static function implementing
149 a hook.
150 (elf_m68k_check_relocs): Update to add entries to multi-GOT.
151 (elf_m68k_gc_sweep_hook): Update to remove entries from multi-GOT.
152 (elf_m68k_always_size_sections): Assign BFDs to GOTs.
153 (elf_m68k_relocate_section): Update to properly handle GOT relocations.
154 (elf_m68k_finish_dynamic_symbol): Update to traverse all GOT entries
155 of a global symbol.
156 (bfd_elf_m68k_set_target_options): New function.
157 (bfd_elf32_bfd_link_hash_table_free): Define hook.
158 (bfd_elf32_bfd_final_link): Change expansion to bfd_elf_final_link
159 to skip generic calculation of GOT offsets.
160 (elf_backend_copy_indirect_symbol): Define hook.
161 * bfd-in.h (bfd_elf_m68k_set_target_options): Declare function.
162 * bfd-in2.h: Regenerate.
163
164 2008-05-21 André Johansen <andrejoh@gmail.com>
165
166 PR 868
167 * dwarf2.c (_bfd_dwarf2_cleanup_debug_info): Free memory allocated
168 for filenames in function tables and variable tables.
169
170 2008-05-19 Alan Modra <amodra@bigpond.net.au>
171
172 PR 2995, PR 6473
173 * elf.c (_bfd_elf_make_section_from_shdr): Leave lma equal to
174 vma when all p_paddr fields are zero and there is more than
175 one PT_LOAD header.
176
177 2008-05-15 Christophe Lyon <christophe.lyon@st.com>
178
179 Add long call support for ARM.
180 * elf32-arm.c (THM2_MAX_FWD_BRANCH_OFFSET): Define.
181 (THM2_MAX_BWD_BRANCH_OFFSET): Define.
182 (ARM_MAX_FWD_BRANCH_OFFSET): Define.
183 (ARM_MAX_BWD_BRANCH_OFFSET): Define.
184 (THM_MAX_FWD_BRANCH_OFFSET): Define.
185 (THM_MAX_BWD_BRANCH_OFFSET): Define.
186 (arm_long_branch_stub): Define.
187 (arm_pic_long_branch_stub): Define.
188 (arm_thumb_v4t_long_branch_stub): Define.
189 (arm_thumb_thumb_long_branch_stub): Define.
190 (arm_thumb_arm_v4t_long_branch_stub): Define.
191 (STUB_SUFFIX): Define.
192 (elf32_arm_stub_type): Define.
193 (elf32_arm_stub_hash_entry): Define.
194 (elf32_arm_link_hash_entry): Add stub_cache field.
195 (arm_stub_hash_lookup): Define.
196 (elf32_arm_link_hash_table): Add stub_hash_table, stub_bfd,
197 add_stub_section, layout_sections_again, stub_group, bfd_count,
198 top_index, input_list fields.
199 (elf32_arm_link_hash_newfunc): Init new field.
200 (stub_hash_newfunc): New function.
201 (elf32_arm_link_hash_table_create): Init stub_hash_table.
202 (elf32_arm_hash_table_free): New function.
203 (arm_type_of_stub): New function.
204 (elf32_arm_stub_name): New function.
205 (elf32_arm_get_stub_entry): New function.
206 (elf32_arm_stub_add_mapping_symbol): New function.
207 (elf32_arm_add_stub): New function.
208 (arm_build_one_stub): New function.
209 (arm_size_one_stub): New function.
210 (elf32_arm_setup_section_lists): New function.
211 (elf32_arm_next_input_section): New function.
212 (group_sections): New function.
213 (elf32_arm_size_stubs): New function.
214 (elf32_arm_build_stubs): New function.
215 (bfd_elf32_arm_add_glue_sections_to_bfd): Skip stub sections.
216 (bfd_elf32_arm_process_before_allocation): No longer handle
217 R_ARM_CALL and R_ARM_THM_CALL.
218 (using_thumb_only): New function.
219 (elf32_arm_final_link_relocate): Redirect calls to stub if range
220 exceeds encoding capabilities.
221 (bfd_elf32_bfd_link_hash_table_free): Define.
222 * bfd-in.h (R_ARM_max): Fix value to 130.
223 (elf32_arm_setup_section_lists): Protype.
224 (elf32_arm_next_input_section): Protype.
225 (elf32_arm_size_stubs): Protype.
226 (elf32_arm_build_stubs): Protype.
227 * bfd-in2.h: Regenerate.
228
229 2008-05-14 Ulrich Weigand <uweigand@de.ibm.com>
230
231 * elf32-ppc.c (ppc_elf_get_synthetic_symtab): Fix memset calls.
232 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Likewise.
233
234 2008-05-14 Alan Modra <amodra@bigpond.net.au>
235
236 * Makefile.am: Run "make dep-am".
237 * Makefile.in: Regenerate.
238
239 2008-05-14 Ulrich Weigand <uweigand@de.ibm.com>
240 Alan Modra <amodra@bigpond.net.au>
241
242 * elf32-ppc.c (section_covers_vma): New function.
243 (ppc_elf_get_synthetic_symtab): New function.
244 (bfd_elf32_get_synthetic_symtab): Define.
245 * elf64-ppc.c (section_covers_vma): New function.
246 (ppc64_elf_get_synthetic_symtab): Generate sym@plt on glink branch
247 table entries, and __glink_PLTresolve on resolver stub.
248 (ppc64_elf_build_stubs): Rename __glink sym to __glink_PLTresolve.
249
250 2008-05-12 Alan Modra <amodra@bigpond.net.au>
251
252 PR 6443
253 * elf32-ppc.c (MUST_BE_DYN_RELOC): Delete.
254 (must_be_dyn_reloc): New function.
255 (ppc_elf_check_relocs): Don't set DF_STATIC_TLS for tprel relocs
256 in pies.
257 (ppc_elf_tls_optimize): Optimise pies.
258 (ppc_elf_relocate_section): Use a section symbol rather than no
259 symbol if possible for LD->IE TLS sequence, but don't error if
260 we must use no symbol.
261 * elf64-ppc.c (MUST_BE_DYN_RELOC): As for elf32-ppc.c.
262 (must_be_dyn_reloc): Likewise.
263 (ppc64_elf_check_relocs): Likewise.
264 (ppc64_elf_tls_optimize): Likewise.
265 (ppc64_elf_relocate_section): Likewise.
266
267 2008-05-12 Alan Modra <amodra@bigpond.net.au>
268
269 * elf32-spu.c (spu_elf_relocate_section): Rename is_ea to is_ea_sym.
270
271 2008-05-10 Paul Pluzhnikov <ppluzhnikov@google.com>
272
273 * elfcore.h (elf_core_file_p): Warn about core truncation.
274
275 2008-05-07 Bob Wilson <bob.wilson@acm.org>
276
277 * elf32-xtensa.c (xtensa_property_section_name): New.
278 (xtensa_make_property_section): New.
279 (xtensa_get_property_section): Make static. Do not create a new
280 section if it does not exist.
281
282 2008-05-08 Alan Modra <amodra@bigpond.net.au>
283
284 * elf32-spu.c (spu_elf_special_sections): Add "._ea".
285 (spu_elf_relocate_section): Handle relocations against symbols
286 defined in ._ea specially.
287
288 2008-05-03 Daniel Jacobowitz <dan@codesourcery.com>
289
290 * elf32-arm.c (elf32_arm_symbian_link_hash_table_create): Use
291 ARRAY_SIZE.
292 (elf32_arm_symbian_plt_sym_val): New.
293 (elf_backend_plt_sym_val): Define.
294
295 2008-05-03 Alan Modra <amodra@bigpond.net.au>
296
297 PR 2995, PR 6473
298 * elf.c (rewrite_elf_program_header): Rather than clearing
299 p_paddr_valid at end, don't set it in the first place. Delete
300 comment no longer relevant. When not p_paddr_valid, don't set
301 paddr from vaddr, and don't set p_vaddr_offset.
302
303 2008-05-01 Cary Coutant <ccoutant@google.com>
304
305 * elf.c (bfd_elf_get_str_section): Fix memory leak caused by
306 corrupt string table.
307
308 2008-05-01 Joel Brobecker <brobecker@adacore.com>
309
310 * cache.c (cache_bread_1): Renames cache_bread.
311 (cache_bread): New function.
312
313 2008-05-01 Alan Modra <amodra@bigpond.net.au>
314
315 PR 2995, PR 6473
316 * elf.c (_bfd_elf_make_section_from_shdr): Always set lma from p_paddr.
317 (assign_file_positions_for_load_sections): Combine nested "if".
318 (copy_elf_program_header): Don't set p_paddr_valid or p_vaddr_offset
319 when all header p_paddr fields are zero.
320
321 2008-04-30 Edmar Wienskoski <edmar@freescale.com>
322
323 * cpu-powerpc.c (bfd_powerpc_archs): Add e500mc entry.
324
325 2008-04-29 Daniel Jacobowitz <dan@codesourcery.com>
326
327 * elf.c (_bfd_elf_get_dynamic_reloc_upper_bound)
328 (_bfd_elf_canonicalize_dynamic_reloc): Find dynamic relocations
329 even if they are not loaded.
330 * elflink.c (_bfd_elf_init_2_index_sections): Set data_index_section
331 first.
332
333 2008-04-25 Jay Foad <jay.foad@gmail.com>
334
335 * reloc16.c (bfd_coff_reloc16_get_value): Add support for
336 undefined weak symbols.
337
338 2008-04-25 Nick Clifton <nickc@redhat.com>
339
340 * po/vi.po: Updated Vietnamese translation.
341
342 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
343
344 * aclocal.m4: Regenerate.
345 * configure: Regenerate.
346
347 2008-04-21 Cary Coutant <ccoutant@google.com>
348
349 * archive.c (_bfd_write_archive_contents): Fix incorrect use of
350 ARFMAG.
351
352 2008-04-21 Nathan Sidwell <nathan@codesourcery.com>
353
354 * elfxx-mips.c (_bfd_mips_vxworks_adjust_dynamic_symbol): Don't
355 set the value of undefined symbols in shared objects.
356 (_bfd_mips_vxworks_finish_dynamic_symbol): Clear value for
357 undefined symbols unless pointer equality is needed.
358
359 2008-04-18 Dennis Roberts <dennis.roberts@sunquestinfo.com>
360
361 * aix5ppc-core.c: Define macros for the default architecture and
362 machine for matching core files.
363 (xcoff64_core_p): Set the architecture and machine to the default
364 values defined in the macros mentioned above.
365 * rs6000-core.c: Define macros to determine whether or not the
366 core file header uses the core_dumpxx header format.
367 (rs6000coff_core_p): Don't match core files that use the
368 core_dumpxx header format.
369
370 2008-04-16 Pedro Alves <pedro@codesourcery.com>
371
372 * config.bfd (i[3-7]86-*-dicos*, x86_64-*-dicos*): Add.
373
374 2008-04-16 David S. Miller <davem@davemloft.net>
375
376 * reloc.c (BFD_RELOC_SPARC_GOTDATA_HIX22,
377 BFD_RELOC_SPARC_GOTDATA_LOX10, BFD_RELOC_SPARC_GOTDATA_OP_HIX22,
378 BFD_RELOC_SPARC_GOTDATA_OP_LOX10, BFD_RELOC_SPARC_GOTDATA_OP): New.
379 * libbfd.h: Regnerate.
380 * bfd-in2.h: Regenerate.
381 * elfxx-sparc.c (_bfd_sparc_elf_howto_table): Add entries for
382 GOTDATA relocations.
383 (sparc_reloc_map): Likewise.
384 (_bfd_sparc_elf_check_relocs): Handle R_SPARC_GOTDATA_* like
385 R_SPARC_GOT*.
386 (_bfd_sparc_elf_gc_sweep_hook): Likewise.
387 (_bfd_sparc_elf_relocate_section): Transform R_SPARC_GOTDATA_HIX22,
388 R_SPARC_GOTDATA_LOX10, R_SPARC_GOTDATA_OP_HIX22, and
389 R_SPARC_GOTDATA_OP_LOX10 into the equivalent R_SPARC_GOT* reloc.
390 Simply ignore R_SPARC_GOTDATA_OP relocations.
391
392 2008-04-14 Aurelien Jarno <aurelien@aurel32.net>
393
394 * configure.in: Link with the PIC version of libiberty on
395 Linux/MIPS hosts.
396 * configure: Regenerate.
397
398 2008-04-14 Edmar Wienskoski <edmar@freescale.com>
399
400 * archures.c: Add bfd_mach_ppc_e500mc.
401 * bfd-in2.h: Regenerate.
402
403 2008-04-08 Alan Modra <amodra@bigpond.net.au>
404
405 * elf32-spu.c (spu_elf_build_stubs): Correct error message.
406 (mark_functions_via_relocs): Remove premature init of symtab_hdr.
407 (collect_overlays): Commment typo fix.
408
409 2008-04-08 Kees Cook <kees@canonical.com>
410
411 * elflink.c (bfd_elf_size_dynamic_sections): Ignore GNU-stack note
412 in EXEC_P bfds.
413
414 2008-04-08 Alan Modra <amodra@bigpond.net.au>
415
416 * elf32-spu.c: Include libiberty.h.
417 (struct spu_link_hash_table): Add local_stire, overlay_fixed, reserved,
418 non_ovly_stub, spu_elf_load_ovl_mgr, spu_elf_open_overlay_script,
419 spu_elf_relink, auto_overlay fields.
420 (AUTO_OVERLAY, AUTO_RELINK, OVERLAY_RODATA): Define.
421 (needs_ovl_stub): Flip test so that call to non-function warning
422 is emitted during relocate_section rather than earlier.
423 (spu_elf_check_vma): Stash --auto-overlay parameters, and clear
424 auto_overlay if no section exceeds local store.
425 (struct call_info): Add count, max_depth, is_pasted fields.
426 (struct function_info): Add rodata, last_caller, call_count,
427 depth, new visit flags.
428 (insert_callee): Increment call count.
429 (copy_callee): New function.
430 (mark_functions_via_relocs): Investigate all reloc types to count
431 possible function pointer stubs for --auto-overlay. Track
432 last_caller and increment function call_count.
433 (pasted_function): Insert a "call" into call info for pasted section.
434 (remove_cycles): Track max depth of calls. Don't emit call graph
435 pruning warning for --auto-overlay.
436 (build_call_tree): Don't transfer_calls for --auto-overlay.
437 Adjust remove_cycles call.
438 (sort_calls, sort_lib, sort_bfds): New functions.
439 (struct _mos_param, struct _uos_param, struct _cl_param): New.
440 (mark_overlay_section, unmark_overlay_section): New functions.
441 (collect_lib_sectios, auto_ovl_lib_functions): New functions.
442 (collect_overlays, find_pasted_call): New functions.
443 (sum_stack): Deal with is_pasted "calls". Exit before printing
444 when --auto-overlay.
445 (spu_elf_auto_overlay): New function.
446 (spu_elf_final_link): Call spu_elf_auto_overlay.
447 * elf32-spu.h (spu_elf_check_vma): Update prototype.
448
449 2008-04-07 Alan Modra <amodra@bigpond.net.au>
450
451 * elf32-spu.c (allocate_spuear_stubs): Ensure _SPUEAR_ symbol
452 is defined in overlay section before creating a stub.
453 (build_spuear_stubs): Likewise.
454 (spu_elf_size_stubs, spu_elf_build_stubs): Adjust calls.
455
456 2008-04-02 Alan Modra <amodra@bigpond.net.au>
457
458 * elf32-spu.c (insert_callee): Reorder call list so most recent
459 call is always first.
460 (interesting_section): Move.
461 (mark_functions_via_relocs): Fold interesting_section and
462 reloc_count tests in callers to here. Simplify output section
463 owner test.
464 (discover_functions): Set "gaps" when no symbols and some
465 "interesting_section". Run pasted_function loop for no symbol
466 bfds.
467 (for_each_node, transfer_calls): New functions.
468 (mark_non_root): Adjust to suit for_each_node.
469 (call_graph_traverse): Likewise. Fix memory leak. Rename to..
470 (remove_cycles): ..this.
471 (build_call_tree): Use for_each_node and transfer_calls.
472 (struct _sum_stack_param): New.
473 (sum_stack): Adjust to suit for_each_node. Return error on
474 malloc failure. Move code to print root node cumulative stack from..
475 (spu_elf_stack_analysis): ..here. Use for_each_node.
476
477 2008-03-31 Cary Coutant <ccoutant@google.com>
478
479 PR 6006
480 * archive.c (_bfd_slurp_extended_name_table): Change
481 ARFMAG[0] to ARFMAG[1].
482 (_bfd_construct_extended_name_table): Likewise.
483
484 2008-03-31 Daniel Jacobowitz <dan@codesourcery.com>
485
486 * elfxx-mips.c (mips_elf_record_got_page_entry): Update comment.
487 (_bfd_mips_elf_check_relocs): Update comments. Always call
488 mips_elf_record_got_page_entry for R_MIPS_GOT_PAGE.
489
490 2008-03-27 Cary Coutant <ccoutant@google.com>
491
492 Add support for thin archives.
493 * archive.c (_bfd_find_nested_archive): New function.
494 (get_extended_arelt_filename): Add origin parameter.
495 (_bfd_generic_read_ar_hdr_mag): Deal with extended name
496 combined with a file offset.
497 (append_relative_path): New function.
498 (_bfd_get_elt_at_filepos): Deal with external members and
499 nested archives.
500 (bfd_generic_openr_next_archived_file): Thin archives.
501 (bfd_generic_archive_p): Recognize new magic string.
502 (adjust_relative_path): New function.
503 (_bfd_construct_extended_name_table): Construct extended
504 names for thin archive members.
505 (_bfd_write_archive_contents): Emit new magic string, skip
506 copying files for thin archives.
507 * bfd-in.h (bfd_is_thin_archive): New macro.
508 * bfd.c (struct bfd): New fields for thin archives.
509 * libbfd-in.h (struct areltdata): New field for thin archives.
510 * opncls.c (bfd_close): Delete BFDs for nested archives.
511
512 2008-03-25 Bernd Schmidt <bernd.schmidt@analog.com>
513
514 * elf32-bfin.c (bfin_final_link_relocate): New function, wrapper around
515 _bfd_final_link_relocate that also handles R_pcrel24 relocs.
516 (bfinfdpic_relocate_section, bfin_relocate_section): Use it.
517
518 2008-03-25 Nathan Sidwell <nathan@codesourcery.com>
519
520 * elf32-arm.c (elf32_arm_final_link_relocate): Skip dynamic relocs
521 in vxworks tls_vars sections.
522 (allocate_dynrelocs, elf32_arm_size_dynamic_sections): Likewise.
523 * elf32-i386.c (allocate_dynrelocs,
524 elf_i386_size_dynamic_sections, elf_i386_relocate_section): Likewise.
525 * elf32-ppc.c (allocate_dynrelocs, ppc_elf_size_dynamic_sections,
526 ppc_elf_relocate_section): Likewise.
527 * elf32-sh.c (allocate_dynrelocs, sh_elf_size_dynamic_sections,
528 sh_elf_relocate_section): Likewise.
529 * elfxx-sparc.c (allocate_dynrelocs,
530 _bfd_sparc_elf_size_dynamic_sections,
531 _bfd_sparc_elf_relocate_section): Likewise.
532
533 2008-03-21 Adam Nemet <anemet@caviumnetworks.com>
534
535 * elf.c (_bfd_elf_print_private_bfd_data): Use bfd_fprintf_vma to
536 print the values from the dynamic section.
537
538 2008-03-20 Richard Sandiford <rsandifo@nildram.co.uk>
539
540 * elfxx-mips.c (MIPS_ELF_GNU_GOT1_MASK): New macro.
541 (_bfd_mips_elf_finish_dynamic_sections): Use it instead of 0x80000000.
542
543 2008-03-20 Alan Modra <amodra@bigpond.net.au>
544
545 * elf32-spu.c (spu_elf_create_sections): Remove output_bfd parameter.
546 (spu_elf_find_overlays, spu_elf_size_stubs): Likewise
547 (process_stubs, discover_functions, build_call_tree): Likewise.
548 (spu_elf_stack_analysis): Likewise.
549 (spu_elf_check_vma): Likewise. Move.
550 (struct call_info): Make "is_tail" a bitfield.
551 (insert_callee): Clear fun->start and set fun->is_func if we find
552 a non-tail call.
553 * elf32-spu.h (spu_elf_create_sections): Update prototype.
554 (spu_elf_find_overlays, spu_elf_size_stubs, spu_elf_check_vma): Ditto.
555
556 2008-03-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
557
558 * aclocal.m4: Regenerate.
559 * configure: Likewise.
560 * Makefile.in: Likewise.
561
562 2008-03-16 H.J. Lu <hongjiu.lu@intel.com>
563
564 PR ld/5789
565 PR ld/5943
566 * elf32-i386.c (elf_i386_relocate_section): Issue an error
567 for R_386_GOTOFF relocaton against undefined hidden/internal
568 symbols when building a shared object.
569
570 * elf64-x86-64.c (elf64_x86_64_relocate_section): Issue an
571 error for R_X86_64_PC8/R_X86_64_PC16/R_X86_64_PC32
572 relocaton against undefined hidden/internal symbols when
573 building a shared object.
574 (elf64_x86_64_finish_dynamic_symbol): Return FALSE when symbol
575 is referenced locally, but isn't defined in a regular file.
576
577 2008-03-15 H.J. Lu <hongjiu.lu@intel.com>
578
579 * bfd-in.h (BFD_NO_FLAGS, HAS_RELOC, EXEC_P, HAS_LINENO,
580 HAS_DEBUG, HAS_SYMS, HAS_LOCALS, DYNAMIC, WP_TEXT, D_PAGED,
581 BFD_IS_RELAXABLE, BFD_TRADITIONAL_FORMAT, BFD_IN_MEMORY,
582 HAS_LOAD_PAGE, BFD_LINKER_CREATED): Moved to ...
583 * bfd.c: Here.
584
585 * bfd.c (bfd): Change cacheable, target_defaulted, opened_once,
586 mtime_set, no_export, output_has_begun and has_armap to bit
587 field.
588
589 * bfd-in2.h: Regenerated.
590
591 2008-03-14 Daniel Jacobowitz <dan@codesourcery.com>
592
593 * cache.c (close_one): Remove mtime hack.
594
595 2008-03-14 H.J. Lu <hongjiu.lu@intel.com>
596
597 PR ld/5913
598 * elfxx-ia64.c (elfNN_ia64_tprel_base): Remove BFD_ASSERT.
599 (elfNN_ia64_dtprel_base): Likewise.
600 (elfNN_ia64_relocate_section): Go to missing_tls_sec if
601 tls_sec is NULL before calling elfNN_ia64_tprel_base or
602 elfNN_ia64_dtprel_base. Report unsupported TLS relocations.
603
604 2008-03-14 Alan Modra <amodra@bigpond.net.au>
605
606 * elf32-spu.c (process_stubs, spu_elf_relocate_section): Move
607 common code to..
608 (maybe_needs_stub): ..here, a new function that also omits stubs
609 for .eh_frame, and..
610 (needs_ovl_stub): ..here. Create stubs for labels in code section
611 referenced by switch jump table.
612 (spu_elf_find_overlays): Set htab->ovly_load and htab->ovly_return.
613 (enum _insn_type): Delete.
614 (enum _stub_type): New.
615 (count_stub, build_stub): Adjust.
616 (allocate_spuear_stubs, build_spuear_stubs): Adjust.
617
618 2008-03-13 Alan Modra <amodra@bigpond.net.au>
619
620 * elf.c (_bfd_elf_make_section_from_shdr): Remove unnecessary cast.
621 (_bfd_elf_assign_file_position_for_section): Simplify align.
622 (_bfd_elf_init_reloc_shdr): Ensure shift expression wide enough
623 for sh_addralign.
624 (elf_fake_sections, swap_out_syms): Likewise.
625 * elflink.c (bfd_elf_final_link): Likewise.
626
627 2008-03-13 Alan Modra <amodra@bigpond.net.au>
628
629 * Makefile.am: Run "make dep-am".
630 * Makefile.in: Regenerate.
631 * po/SRC-POTFILES.in: Regenerate.
632
633 2008-03-12 Bernd Schmidt <bernd.schmidt@analog.com>
634
635 From Jie Zhang <jie.zhang@analog.com>
636 * elf32-bfin.c (struct bfinfdpic_relocs_info): Make got17m4,
637 gothilo, fd, fdgot17m4, fdgothilo, fdgoff17m4, fdgoffhilo,
638 gotoff, call and sym not bitfields.
639 (bfinfdpic_gc_sweep_hook): New function; update the relocation
640 information for the relocations of the section being removed.
641 (bfinfdpic_check_relocs): Accumulate the number of relocations
642 which set got17m4, gothilo, fd, fdgot17m4, fdgothilo, fdgoff17m4,
643 fdgoffhilo, gotoff, call and sym fields.
644 (elf_backend_gc_sweep_hook): Redefine for FD-PIC.
645
646 2008-03-12 Alan Modra <amodra@bigpond.net.au>
647
648 PR 5900
649 * elf-bfd.h: Include elf/internal.h after elf/external.h.
650 * elfcode.h (elf_swap_symbol_in): Map reserved shndx range.
651 (elf_swap_symbol_out): Adjust SHN_XINDEX test.
652 (elf_swap_ehdr_out): Mask SHN_LORESERVE and SHN_XINDEX to values
653 seen in external structs.
654 (valid_section_index_p): Delete.
655 (elf_object_p): Don't increment section numbers over reserved range.
656 Simplify test for valid sh_link, sh_info and e_shstrndx fields.
657 (elf_write_shdrs_and_ehdr): Mask SHN_LORESERVE and SHN_XINDEX to values
658 seen in external structs. Don't increment section numbers over
659 reserved range.
660 * elf.c (bfd_elf_sym_name): Remove redundant tests on st_shndx.
661 (bfd_section_from_shdr): Likewise.
662 (group_signature): Range check before accessing elf_elfsections.
663 (_bfd_elf_setup_sections): Likewise.
664 (bfd_section_from_shdr): Likewise.
665 (bfd_section_from_shdr): Don't increment section number over
666 reserved sections.
667 (assign_file_positions_for_non_load_sections): Likewise.
668 (assign_file_positions_except_relocs): Likewise.
669 (_bfd_elf_write_object_contents): Likewise.
670 (assign_section_numbers): Likewise. Adjust for changed SHN_*.
671 (prep_headers): Delete unused variable.
672 * elflink.c (bfd_elf_link_record_local_dynamic_symbol): Adjust
673 for changed SHN_* values.
674 (check_dynsym, elf_link_input_bfd): Likewise.
675 (bfd_elf_final_link): Likewise. Don't skip over reserved section
676 range.
677 (elf_fixup_link_order): Check that sh_link field is valid.
678 * elf-hppa.h (elf_hppa_add_symbol_hook): Make "index" unsigned.
679 * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Range check before
680 accesssing elf_elfsections.
681 * elf32-avr.c (elf32_avr_size_stubs): Likewise.
682 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
683 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Likewise.
684 * elf64-hppa.c (elf64_hppa_check_relocs): Adjust for changed
685 SHN_* defines. Test for SHN_BAD return from
686 _bfd_elf_section_from_bfd_section
687
688 2008-03-12 Alan Modra <amodra@bigpond.net.au>
689
690 * elf-bfd.h (_bfd_elf_section_from_bfd_section): Update prototype.
691 * elf.c (_bfd_elf_section_from_bfd_section): Return unsigned int,
692 SHN_BAD on error.
693 (_bfd_elf_print_private_bfd_data): Test for SHN_BAD result from
694 _bfd_elf_section_from_bfd_section, not -1.
695 (swap_out_syms): Likewise.
696 * elflink.c (elf_link_add_object_symbols): Likewise.
697 (bfd_elf_get_bfd_needed_list): Likewise.
698 (bfd_elf_match_symbols_in_sections): Likewise.
699 (elf_link_add_object_symbols): Don't bother testing for symbols
700 using normal sections before calling bfd_section_from_elf_index.
701 (elf_link_input_bfd, bfd_elf_final_link): Likewise.
702 (bfd_elf_reloc_symbol_deleted_p): Likewise.
703 * elfcode.h (elf_slurp_symbol_table): Likewise.
704 * elf32-spu.c (get_sym_h): Likewise.
705 * elf32-xtensa.c (get_elf_r_symndx_section): Likewise.
706 * elf64-ppc.c (opd_entry_value, get_sym_h, ppc64_elf_edit_toc): Ditto.
707 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
708
709 2008-03-11 Alan Modra <amodra@bigpond.net.au>
710
711 * elf32-spu.c (spu_elf_relocate_section): Test identical conditions
712 to those in process_stubs for overlay symbols.
713
714 2008-03-09 Paul Brook <paul@codesourcery.com>
715
716 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Handle new
717 Tag_VFP_arch values.
718
719 2008-03-08 Paul Brook <paul@codesourcery.com>
720
721 * elf32-arm.c (insert_thumb_branch): Rewrite.
722 (elf32_thumb_to_arm_stub): Use new insert_thumb_branch.
723
724 2008-03-07 Paul Brook <paul@codesourcery.com>
725
726 * elf32-arm.c (elf32_arm_howto_table_1): Fix bitmasks for MOVW and
727 MOVT relocations.
728 (elf32_arm_final_link_relocate): Fix off by one MOVW/MOVT sign
729 extension.
730 (elf32_arm_relocate_section): Handle MOVW and MOVT
731 relocations. Improve safety check for other weird relocations.
732 (elf32_arm_check_relocs): Only set h->needs_plt for branch/call
733 relocations.
734
735 2008-03-03 Bob Wilson <bob.wilson@acm.org>
736
737 * xtensa-isa.c (xtensa_isa_num_pipe_stages): Make max_stage static and
738 only compute its value once.
739
740 2008-03-03 Alan Modra <amodra@bigpond.net.au>
741
742 * elf32-spu.c (struct got_entry): Add "addend" field.
743 (count_stub, build_stub): Use a new stub if relocation addend
744 differs from existing stubs for this symbol.
745 (process_stubs): Deal with addends.
746 (spu_elf_relocate_section, spu_elf_output_symbol_hook): Likewise.
747
748 2008-03-02 H.J. Lu <hongjiu.lu@intel.com>
749
750 PR ld/5789
751 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return true
752 for hidden and local symbols.
753
754 2008-03-03 Alan Modra <amodra@bigpond.net.au>
755
756 * elf32-ppc.c (allocate_dynrelocs): Discard relocs on
757 undefined symbols with internal or hidden visibility.
758 (ppc_elf_relocate_section): Likewise. Use SYMBOL_CALLS_LOCAL
759 rather than SYMBOL_REFERENCES_LOCAL on branches. Don't
760 return immediately on dynamic reloc error.
761
762 2008-03-01 Alan Modra <amodra@bigpond.net.au>
763
764 * elf64-ppc.c (build_plt_stub): Add relocs on plt call stubs
765 if emitrelocations.
766 (get_relocs): New function, split out from..
767 (ppc_build_one_stub): ..here. Add relocs on plt_branch stubs if
768 emitrelocations. Remove indx temp.
769 (ppc_size_one_stub): Count new stub relocs.
770 (ppc64_elf_size_stubs): Count new glink reloc.
771 (ppc64_elf_build_stubs): Emit glink reloc if emitrelocations.
772 (ppc64_elf_finish_dynamic_sections): Output glink relocs.
773 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Describe non-pic
774 glink code.
775
776 2008-02-28 Alan Modra <amodra@bigpond.net.au>
777
778 * elf32-spu.c (mark_functions_via_relocs): Don't assume that
779 the "->start" pointer reaches to function origin, so that we
780 can handle functions split over more than two sections.
781 (build_call_tree): Likewise.
782 (pasted_function): Don't attempt to set fun->start back to the
783 function origin, just go back one section.
784
785 2008-02-27 Catherine Moore <clm@codesourcery.com>
786
787 * elf.c ( _bfd_elf_print_private_bfd_data): Call
788 elf_backend_get_target_dtag if defined.
789 * elf32-mips.c (elf_backend_get_target_dtag): Define.
790 * elf64-mips.c: Likewise.
791 * elfn32-mips.c: Likewise.
792 * elfxx-mips.c (_bfd_mips_elf_get_target_dtag): New.
793 * elfxx-mips.h (_bfd_mips_elf_get_target_dtag): Declare.
794 * elf-bfd.h (elf_backend_get_target_dtag): Add prototype.
795 * elfxx-target.h (elf_backend_get_target_dtag): Add default.
796 (elf_backend_data): Add elf_backend_get_target_dtag.
797
798 2008-02-26 Alan Modra <amodra@bigpond.net.au>
799
800 * elf32-ppc.c (ppc_elf_check_relocs): Set pointer_equality_needed
801 for R_PPC_REL32 syms. Don't set non_got_ref on branch reloc syms,
802 and assume branch relocs are not dynamic when non-shared.
803 (readonly_dynrelocs): New function, split out from..
804 (maybe_set_textrel): ..here, renamed from old readonly_dynrelocs.
805 (ppc_elf_adjust_dynamic_symbol): For symbols generating plt entries,
806 clear non_got_ref..
807 (allocate_dynrelocs): ..and don't set u.def for undefined weak.
808 Do allow dynamic relocs on undefined symbols.
809 (ppc_elf_adjust_dynamic_symbol): Use readonly_dynrelocs.
810 (ppc_elf_relocate_section): Mirror dynamic reloc changes in
811 check_relocs.
812 (ppc_elf_finish_dynamic_symbol): Don't give a warning on weak
813 plt symbols needing pointer_equality_needed.
814
815 2008-02-23 Alan Modra <amodra@bigpond.net.au>
816
817 * elf32-ppc.c (ppc_elf_check_relocs): Revert non_got_ref change.
818
819 2008-02-23 Alan Modra <amodra@bigpond.net.au>
820
821 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Copy
822 pointer_equality_needed.
823 (ppc_elf_check_relocs): Split out non-branch relocs from others
824 that might emit dynamic relocs. Set pointer_equality_needed
825 for their symbols. Don't set non_got_ref on branch reloc symbols.
826 (ppc_elf_hash_symbol): New function.
827 (elf_backend_hash_symbol): Define.
828 (ppc_elf_finish_dynamic_symbol): Handle pointer_equality_needed.
829 Error if pointer_equality_needed on weak plt symbol.
830
831 2008-02-22 H.J. Lu <hongjiu.lu@intel.com>
832
833 PR ld/5788
834 * elflink.c (elf_create_symbuf): Correct buffer size and
835 position.
836
837 2008-02-22 Nick Clifton <nickc@redhat.com>
838
839 PR 868
840 * dwarf2.c: Revert previous patch. All of the allocate memory is
841 on an obstack which will be freed at some other time.
842
843 2008-02-20 Nick Clifton <nickc@redhat.com>
844
845 PR 868
846 * libbfd.c (bfd_realloc_or_free): New function. Performs like
847 bfd_realloc, but if the (re)allocation fails, the pointer is
848 freed.
849 * libbfd-in.h: Prototype.
850 * libbfd.h: Regenerate.
851 * bfdio.c (bfd_bwrite): Use the new function.
852 (bfd_seek): Likewise.
853 * bfdwin.c:(bfd_get_file_window): Likewise.
854 * elf-strtab.c (_bfd_elf_strtab_add): Likewise.
855 * elf32-ppc.c (ppc_elf_relax_section): Likewise.
856 * elf32-xtensa.c (vsprintf_msg): Likewise.
857 * mach-o.c (bfd_mach_o_core_fetch_environment): Likewise.
858 * stabs.c (_bfd_link_seciton_stabs): Likewise.
859 * vms-misc.c (_bfd_vms_get_record): Likewise.
860 * vms-tir.c (check_section): Likewise.
861 * vms.c (vms_new_section_hook): Likewise.
862 * elf32-arm.c (elf32_arm_section_map_add): Check that the
863 allocation of sec_data->map succeeded before using it.
864 * elflink.c (elf_link_output_sym): Do not overwrite finfo->
865 symshndxbuf until it is known that the reallocation succeeded.
866
867 2008-02-20 Diogo de Carvalho Kraemer <diogo@kraemer.eng.br>
868 Nick Clifton <nickc@redhat.com>
869
870 PR 868
871 * dwarf2.c (read_abbrevs): Free the abbreviation table if we run
872 out of memory.
873 (decode_line_info): Free the line_info_table before returning a
874 failure result.
875 (_bfd_dwarf2_cleanup_debug_info): Free the abbreviation table.
876 Free the line table. Free the function table. Free the variable
877 table.
878
879 2008-02-17 Mark Kettenis <kettenis@gnu.org>
880
881 * elf.c (swap_out_syms): Avoid preprocessing directive within
882 macro arg.
883
884 2008-02-17 Jan Kratochvil <jan.kratochvil@redhat.com>
885
886 * elf.c (assign_file_positions_for_load_sections): Set the type of
887 PT_NOTE sections to SHT_NOTE.
888
889 2008-02-17 Ulrich Weigand <uweigand@de.ibm.com>
890
891 * simple.c (bfd_simple_get_relocated_section_contents): Set
892 link_info.output_bfd.
893
894 2008-02-16 Nathan Sidwell <nathan@codesourcery.com>
895
896 * dwarf2.c (find_line): Don't trust debug information after an
897 unparseable compilation unit.
898
899 2008-02-15 Alan Modra <amodra@bigpond.net.au>
900
901 PR 5765
902 * section.c (SEC_LINK_DUPLICATES): Correct. Renumber following flags.
903 * bfd-in2.h: Regenerate.
904
905 2008-02-15 Alan Modra <amodra@bigpond.net.au>
906
907 * elf-bfd.h (enum elf_object_id): Add HPPA_ELF_TDATA.
908 * elf.c (bfd_elf_allocate_object): Don't check for already allocated
909 tdata.
910 * elf32-hppa.c (elf32_hppa_mkobject): New function.
911 (bfd_elf32_mkobject): Define.
912 * elf32-ppc.c (is_ppc_elf_target): Delete. Replace all uses with..
913 (is_ppc_elf): ..this new macro.
914 * elf64-ppc.c (is_ppc64_elf_target): Delete. Replace all uses with..
915 (is_ppc64_elf): ..this new macro.
916
917 2008-02-15 Alan Modra <amodra@bigpond.net.au>
918
919 * elflink.c: Replace all accesses to hash->creator field with
920 output_bfd->xvec.
921 * cofflink.c: Likewise.
922 * coff-h8300.c: Likewise.
923 * ecoff.c: Likewise.
924 * elf32-m68hc1x.c: Likewise.
925 * elf32-ppc.c: Likewise.
926 * elf64-alpha.c: Likewise.
927 * elf64-ppc.c: Likewise.
928 * elf64-sparc.c: Likewise.
929 * elfxx-mips.c: Likewise.
930 * i386linux.c: Likewise.
931 * m68klinux.c: Likewise.
932 * sparclinux.c: Likewise.
933 * sunos.c: Likewise.
934 * xcofflink.c: Likewise.
935 * linker.c: Likewise.
936 (_bfd_link_hash_table_init): Don't store creator.
937
938 2008-02-14 Peter Jones <pjones@redhat.com>
939
940 * efi-rtdrv-ia32.c: New file.
941 * efi-bsdrv-ia32.c: New file.
942 * efi-rtdrv-ia64.c: New file.
943 * efi-bsdrv-ia64.c: New file.
944 * efi-rtdrv-x86_64.c: New file.
945 * efi-bsdrv-x86_64.c: New file.
946 * peicode.h (pe_bfd_object_p): Add support for boot service and
947 runtime service drivers.
948 * libpei.h: Add macros for EFI formats, and rename the efi application
949 format macros to disambiguate.
950 * targets.c: Add bfd_target _vec externs.
951 (_bfd_tar): Add EFI _vec entries.
952 * config.bfd: Add EFI vectors into the selection routines.
953 * configure.in: add EFI _vec entries.
954 * configure: Regenerate.
955 * Makefile.am: Add EFI files.
956 * Makefile.in: Regenerate.
957
958 2008-02-14 Nathan Sidwell <nathan@codesourcery.com>
959
960 * dwarf1.c (struct dwarf1_debug): Add syms member.
961 (alloc_dwarf1_unit, alloc_dwarf1_func): Check for out of memory.
962 (parse_line_table, _bfd_dwarf1_find_nearest_line): Relocate
963 section contents, check for out of memory.
964
965 * dwarf1.c (struct dwarf1_debug): Change data pointers to bfd_byte.
966 (parse_die): Change data pointers to bfd_byte.
967 (parse_line_table, parse_functions_in_unit): Likewise.
968
969 2008-02-14 Alan Modra <amodra@bigpond.net.au>
970
971 * elflink.c (compute_bucket_count): Warning fixes.
972
973 2008-02-12 DJ Delorie <dj@redhat.com>
974
975 * elf32-iq2000.c (iq2000_elf_relocate_section): Adjust addend of
976 relocation pointing to local symbol in merged section.
977
978 * elf32-iq2000.c (iq2000_elf_relocate_offset16): New.
979 (iq2000_elf_relocate_section): Call it.
980
981 2008-02-12 Nick Clifton <nickc@redhat.com>
982
983 PR ld/5692
984 * elf-bfd.h (enum elf_object_id): New enum, used to identify
985 target specific extensions to the elf_obj_tdata structure.
986 (struct elf_obj_tdata): New field 'object_id'.
987 (elf_object_id, elf_program_header_size, elf_symtab_hdr): New
988 macros for accessing fields in the elf_obj_tdata structure.
989 (bfd_elf_mkobject): Rename to bfd_elf_make_generic_object.
990 (bfd_elf_allocate_object): New function.
991 * elf.c (bfd_elf_mkobject): Rename to bfd_elf_make_generic_object
992 and implement by calling bfd_elf_allocate_object.
993 (bfd_elf_allocate_object): New function: Allocates an
994 elf_obj_tdata structure, possibly with a target specific
995 extension.
996 * elfxx-target.h (bfd_elfNN_mkobject): Use
997 bfd_elf_make_generic_object as the default value.
998 * elf32-arm.c (elf32_arm_obj_tdata): Rename to elf_arm_obj_tdata
999 for consistency with other, similar structures.
1000 (is_arm_elf): New macro. Checks a BFD to make sure that is an ARM
1001 ELF bfd.
1002 (elf32_arm_mkobject): Call bfd_elf_allocate_object.
1003 (bfd_elf32_arm_vfp11_erratum_scan): Use is_arm_elf macro to check
1004 the bfd being processed.
1005 (bfd_elf32_arm_vfp11_fix_veneer_locations): Likewise.
1006 (bfd_elf32_arm_set_target_relocs): Likewise.
1007 (bfd_elf32_arm_final_link_relocate): Likewise.
1008 (bfd_elf32_arm_copy_private_bfd_data): Likewise.
1009 (bfd_elf32_arm_merge_eabi_attributes): Likewise.
1010 (bfd_elf32_arm_merge_private_bfd_data): Likewise.
1011 (bfd_elf32_arm_check_relocs): Likewise.
1012 (bfd_elf32_arm_gc_mark_extra_sections): Likewise.
1013 (bfd_elf32_arm_size_dynamic_sections): Likewise.
1014 (bfd_elf32_arm_process_before_allocation): Use elf_symtab_hdr.
1015 (bfd_elf32_arm_init_maps): Likewise.
1016 (bfd_elf32_arm_final_link_relocate): Likewise.
1017 (bfd_elf32_arm_relocate_section): Likewise.
1018 (bfd_elf32_arm_gc_sweep_hook): Likewise.
1019 (bfd_elf32_arm_check_relocs): Likewise.
1020 (bfd_elf32_arm_size_dynamic_sections): Likewise.
1021 * elf32-i386.c (elf_i386_mkobject): Call bfd_elf_allocate_object.
1022 (is_i386_elf): New macro. Checks a BFD to make sure that is an x86
1023 ELF bfd.
1024 (elf_i386_check_relocs): Use is_i386_elf macro to check the bfd
1025 being processed.
1026 (elf_i386_size_dynamic_sections): Likewise.
1027 (elf_i386_relocate_section): Likewise.
1028 (elf_i386_check_relocs): Use elf_symtab_hdr.
1029 (elf_i386_gc_sweep_hook): Likewise.
1030 (elf_i386_size_dynamic_sections): Likewise.
1031 (elf_i386_relocate_section): Likewise.
1032 * elf32-ppc.c (ppc_elf_mkobject): Call bfd_elf_allocate_object.
1033 (elf_create_pointer_linker_section): Use is_ppc_elf_target to
1034 verify that the bfd before accessing target specific fields.
1035 (ppc_elf_check_relocs): Likewise.
1036 (elf_finish_pointer_linker_section): Likewise.
1037 (elf_create_pointer_linker_section): Use elf_symtab_hdr.
1038 (ppc_elf_check_relocs): Likewise.
1039 (ppc_elf_gc_sweep_hook): Likewise.
1040 (ppc_elf_tls_optimize): Likewise.
1041 (ppc_elf_size_dynamic_sections): Likewise.
1042 (ppc_elf_relax_section): Likewise.
1043 (ppc_elf_relocate_section): Likewise.
1044 * elf32-s390.c (struct elf_s390_obj_tdata): Add a comment
1045 reminding programmers to keep this structure in sync with the one
1046 defined in elf64-s390.c.
1047 (elf_s390_mkobject): Call bfd_elf_allocate_object.
1048 (is_s390_elf): New macro. Checks a BFD to make sure that is an s390
1049 ELF bfd.
1050 (elf_s390_check_relocs): Use is_s390_elf macro to check the bfd
1051 being processed.
1052 (elf_s390_size_dynamic_sections): Likewise.
1053 (elf_s390_relocate_section): Likewise.
1054 (elf_s390_check_relocs): Use elf_symtab_hdr.
1055 (elf_s390_gc_sweep_hook): Likewise.
1056 (elf_s390_size_dynamic_sections): Likewise.
1057 (elf_s390_relocate_section): Likewise.
1058 * elf32-sh.c (sh_elf_mkobject): Call bfd_elf_allocate_object.
1059 (is_sh_elf): New macro. Checks a BFD to make sure that is an SH
1060 ELF bfd.
1061 (sh_elf_size_dynamic_sections): Use is_sh_elf macro to check the
1062 bfd being processed.
1063 (sh_elf_relocate_section): Likewise.
1064 (sh_elf_check_relocs): Likewise.
1065 (sh_elf_copy_private_data): Likewise.
1066 (sh_elf_relax_section): Use elf_symtab_hdr.
1067 (sh_elf_size_dynamic_sections): Likewise.
1068 (sh_elf_relocate_section): Likewise.
1069 (sh_elf_get_relocated_section_contents): Likewise.
1070 (sh_elf_gc_sweep_hook): Likewise.
1071 (sh_elf_check_relocs): Likewise.
1072 * elf64-alpha.c (elf64_alpha_mkobject): Call bfd_elf_allocate_object.
1073 (is_alpha_elf): New macro. Checks a BFD to make sure that is an
1074 Alpha ELF bfd.
1075 (elf64_alpha_create_got_section): Use is_alpha_elf macro to check
1076 the bfd being processed.
1077 (elf64_alpha_create_dynamic_section): Likewise.
1078 (elf64_alpha_check_relocs): Likewise.
1079 (elf64_alpha_size_got_sections): Likewise.
1080 (elf64_alpha_relax_section): Likewise.
1081 (elf64_alpha_relocate_section): Likewise.
1082 (elf64_alpha_final_link): Likewise.
1083 (elf64_alpha_check_relocs): Use elf_symtab_hdr.
1084 (elf64_alpha_relax_section): Likewise.
1085 (elf64_alpha_relocate_section_r): Likewise.
1086 (elf64_alpha_relocate_section): Likewise.
1087 * elf64-ppc.c (ppc64_elf_mkobject): Call bfd_elf_allocate_object.
1088 (ppc64_elf_check_relocs): Use is_ppc64_elf_target to check the bfd
1089 being processed.
1090 (opd_entry_value): Likewise.
1091 (allocate_dynrelocs): Likewise.
1092 (ppc64_elf_relocate_section): Likewise.
1093 (ppc64_elf_check_relocs): Use elf_symtab_hdr.
1094 (opd_entry_value): Likewise.
1095 (ppc64_elf_gc_sweep_hook): Likewise.
1096 (get_sym_h): Likewise.
1097 (ppc64_elf_edit_opd): Likewise.
1098 (ppc64_elf_tls_optimize): Likewise.
1099 (ppc64_elf_edit_toc): Likewise.
1100 (ppc64_elf_size_dynamic_sections): Likewise.
1101 (toc_adjusting_stub_needed): Likewise.
1102 (ppc64_elf_size_stubs): Likewise.
1103 (ppc64_elf_relocate_section): Likewise.
1104 * elf64-s390.c (struct elf_s390_obj_tdata): Add a comment
1105 reminding programmers to keep this structure in sync with the one
1106 defined in elf32-s390.c.
1107 (elf_s390_mkobject): Call bfd_elf_allocate_object.
1108 (is_s390_elf): New macro. Checks a BFD to make sure that is an s390
1109 ELF bfd.
1110 (elf_s390_check_relocs): Use is_s390_elf macro to check the bfd
1111 being processed.
1112 (elf_s390_size_dynamic_sections): Likewise.
1113 (elf_s390_relocate_section): Likewise.
1114 (elf_s390_check_relocs): Use elf_symtab_hdr.
1115 (elf_s390_gc_sweep_hook): Likewise.
1116 (elf_s390_size_dynamic_sections): Likewise.
1117 (elf_s390_relocate_section): Likewise.
1118 * elf64-x86_64.c (elf64_x86_64_mkobject): Call bfd_elf_allocate_object.
1119 (is_x86_64_elf): New macro. Checks a BFD to make sure that is an
1120 x86_64 ELF bfd.
1121 (elf64_x86_64_check_relocs): Use is_x86_64_elf macro to check the bfd
1122 being processed.
1123 (elf64_x86_64_size_dynamic_sections): Likewise.
1124 (elf64_x86_64_relocate_section): Likewise.
1125 (elf64_x86_64_check_relocs): Use elf_symtab_hdr.
1126 (elf64_x86_64_gc_sweep_hook): Likewise.
1127 (elf64_x86_64_size_dynamic_sections): Likewise.
1128 (elf64_x86_64_relocate_section): Likewise.
1129 * elfxx-sparc.c (_bfd_sparc_elf_mkobject): Call bfd_elf_allocate_object.
1130 (is_sparc_elf): New macro. Checks a BFD to make sure that is a Sparc
1131 ELF bfd.
1132 (_bfd_sparc_elf_check_relocs): Use is_sparc_elf macro to check the
1133 bfd being processed.
1134 (_bfd_sparc_elf_gc_sweep_hook): Likewise.
1135 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
1136 (_bfd_sparc_elf_check_relocs): Use elf_symtab_hdr.
1137 (_bfd_sparc_elf_gc_sweep_hook): Likewise.
1138 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
1139 (_bfd_sparc_elf_relocate_section): Likewise.
1140
1141 2008-02-12 Alan Modra <amodra@bigpond.net.au>
1142
1143 PR 5303, 5755
1144 * arange-set.c: Delete.
1145 * arange-set.h: Delete.
1146 * dwarf2.c: Revert 2007-09-21 changes.
1147 * Makefile.am: Likewise.
1148 * Makefile.in: Regenerate.
1149 * po/SRC-POTFILES.in: Regenerate.
1150
1151 2008-02-11 Bernd Schmidt <bernd.schmidt@analog.com>
1152
1153 * elf32-bfin.c (bfin_relocate_section): Set up dynobj before using it
1154 if necessary.
1155 (elf32_bfin_merge_private_bfd_data): Simplify, and ensure object type
1156 mismatches are detected.
1157
1158 * elf32-bfin.c (bfinfdpic_relocate_section): Take more care not to
1159 emit invalid relocs or rofixup entries for deleted .eh_frame entries.
1160
1161 2008-02-11 Daniel Jacobowitz <dan@codesourcery.com>
1162
1163 * cache.c (cache_bread): Set bfd_error_file_truncated if EOF
1164 was reached.
1165 * srec.c (srec_scan): Calculate the checksum. Complain on mismatch.
1166
1167 2008-02-07 Alan Modra <amodra@bigpond.net.au>
1168
1169 * elf32-spu.c (spu_elf_size_stubs): Revert 2008-01-28 doubling
1170 of _ovly_buf_table size.
1171 (spu_elf_build_stubs): Use low bit of .size as "present" bit.
1172 Adjust initialisations relating to _ovly_buf_table.
1173
1174 2008-02-04 Bob Wilson <bob.wilson@acm.org>
1175
1176 * elf32-xtensa (elf_xtensa_relocate_section): After finding an invalid
1177 relocation, do not continue processing it. Ignore R_XTENSA_ASM_EXPAND
1178 relocations against dynamic symbols.
1179 (elf_xtensa_finish_dynamic_sections): Do not fail if there is no
1180 .xt.lit section.
1181
1182 2008-02-04 Kai Tietz <kai.tietz@onevision.com>
1183 H.J. Lu <hongjiu.lu@intel.com>
1184
1185 PR 5715
1186 * warning.m4: Enable -Wno-format by default when using gcc on
1187 mingw.
1188 * configure: Regenerated.
1189
1190 2008-02-04 Adam Nemet <anemet@caviumnetworks.com>
1191
1192 * archures.c: Update copyright.
1193 (bfd_mach_mips_octeon): New macro.
1194 * bfd-in2.h: Regenerate.
1195 * elfxx-mips.c (_bfd_elf_mips_mach): Handle Octeon.
1196 (mips_set_isa_flags): Likewise.
1197 (mips_mach_extensions): Add Octeon.
1198 * cpu-mips.c: Update copyright.
1199 (I_mipsocteon): New enum constant.
1200 (arch_info_struct): Add Octeon.
1201
1202 2008-02-04 Alan Modra <amodra@bigpond.net.au>
1203
1204 * elf32-spu.c (spu_elf_relocate_section): Correct return type.
1205 Return error status on unexpected relocation errors.
1206
1207 2008-02-04 Alan Modra <amodra@bigpond.net.au>
1208
1209 PR ld/5692
1210 * elf.c (bfd_elf_get_elf_syms): Revert 2008-01-31. Instead abort
1211 on non-ELF input.
1212 * elf32-arm.c (elf32_arm_size_dynamic_sections): Skip glue
1213 processing on non-ELF input.
1214
1215 2008-01-31 Marc Gauthier <marc@tensilica.com>
1216
1217 * config.bfd (xtensa*-*-*): Recognize processor variants.
1218
1219 2008-01-31 Nick Clifton <nickc@redhat.com>
1220
1221 PR ld/5692
1222 * elf.c (bfd_elf_get_elf_syms): Check the return value of
1223 get_elf_backend_data.
1224
1225 2008-01-28 Fabian Groffen <grobian@gentoo.org>
1226
1227 * config.bfd (x86_64-*-solaris2): Add support for this target.
1228
1229 2008-01-28 Alan Modra <amodra@bigpond.net.au>
1230
1231 Rewrite SPU overlay handling code. Put overlay calls stubs in the
1232 overlays where possible. Use a faster call stub, or optionally at
1233 compile time, a more compact stub. Double size of _ovly_buf_table
1234 so that low bit of _ovly_table.buf can be used as a "present" bit.
1235 Reserve an extra _ovly_table entry for index zero.
1236 * elf32-spu.c: (struct spu_link_hash_table): Delete a number of fields,
1237 add new ones.
1238 (struct got_entry): New.
1239 (struct spu_stub_hash_entry): Delete.
1240 (stub_hash_newfunc, spu_elf_link_hash_table_free): Delete.
1241 (spu_elf_link_hash_table_create): Adjust for struct changes.
1242 (spu_stub_name): Delete.
1243 (spu_elf_find_overlays): Don't track sections from overlay regions.
1244 Instead set ovl_buf number in spu elf section data. Error if
1245 overlays in one region don't start at the same address. Adjust
1246 for struct _spu_elf_section_data changes.
1247 (SIZEOF_STUB1, SIZEOF_STUB2, ILA_79, ILA_78): Delete.
1248 (OVL_STUB_SIZE, BRSL, LNOP, ILA): Define.
1249 (needs_ovl_stub): Adjust for struct _spu_elf_section_data changes.
1250 (enum _insn_type): New.
1251 (count_stub, build_stub): New functions.
1252 (allocate_spuear_stubs): Use count_stub.
1253 (build_spuear_stubs): Use build_stub.
1254 (populate_stubs, sort_stubs): Delete.
1255 (process_stubs): New function.
1256 (write_one_stub): Delete.
1257 (spu_elf_size_stubs, spu_elf_build_stubs): Rewrite.
1258 (alloc_stack_info): Adjust for struct _spu_elf_section_data changes.
1259 (maybe_insert_function, check_function_ranges): Likewise.
1260 (find_function, pasted_function, build_call_tree): Likewise.
1261 (spu_elf_stack_analysis, spu_elf_modify_segment_map): Likewise.
1262 (spu_elf_modify_program_headers): Likewise.
1263 (interesting_section): Detect stub sections differently. Delete
1264 htab param, adjust all callers.
1265 (spu_elf_relocate_section): Rewrite stub handling.
1266 (spu_elf_output_symbol_hook): Likewise.
1267 (bfd_elf32_bfd_link_hash_table_free): Delete.
1268 * elf32-spu.h (struct _spu_elf_section_data): Move input-only and
1269 output-only fields into a union. Add ovl_buf.
1270 (spu_elf_size_stubs, spu_elf_build_stubs): Update prototypes.
1271
1272 2008-01-25 DJ Delorie <dj@redhat.com>
1273
1274 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): New.
1275
1276 2008-01-25 Kai Tietz <kai.tietz@onevision.com>
1277
1278 * bfd-in.h: Add mingw I64 support.
1279 * bfd-in2.h: Regenerated.
1280 * bfd.c: (bfd_get_sign_extend_vma): Add pe-x86-64 and pei-x86-64.
1281
1282 2008-01-21 Alan Modra <amodra@bigpond.net.au>
1283
1284 PR 4453
1285 * format.c (bfd_check_format_matches): Don't accept archives as
1286 fully matching unless they have a map.
1287
1288 2008-01-21 Alan Modra <amodra@bigpond.net.au>
1289
1290 * elflink.c (_bfd_elf_link_output_relocs): Correct error return.
1291
1292 2008-01-21 Alan Modra <amodra@bigpond.net.au>
1293
1294 * ecoff.c (_bfd_ecoff_archive_p): Delete.
1295 * libecoff.h (_bfd_ecoff_archive_p): Delete.
1296 * coff-alpha.c (ecoffalpha_little_vec): Use bfd_generic_archive_p.
1297 * coff-mips.c (ecoff_little_vec, ecoff_big_vec): Likewise.
1298 (ecoff_biglittle_vec): Likewise.
1299
1300 2008-01-19 Alan Modra <amodra@bigpond.net.au>
1301
1302 PR 5646
1303 * elf64-ppc.c (ppc64_elf_tls_optimize): Ensure htab->tls_get_addr
1304 non-NULL before dereferencing.
1305
1306 2008-01-15 Alan Modra <amodra@bigpond.net.au>
1307
1308 PR 5604
1309 * elf-bfd.h (struct elf_backend_data): Add gc_keep. Remove param
1310 names from others.
1311 (_bfd_elf_gc_keep): Declare.
1312 * elfxx-target.h (elf_backend_gc_keep): Define.
1313 (elfNN_bed): Init new field.
1314 * elflink.c (_bfd_elf_gc_keep): New function.
1315 (bfd_elf_gc_sections): Call gc_keep.
1316 * elf64-ppc.c (elf_backend_gc_keep): Define.
1317 (struct _ppc64_elf_section_data): Move .opd related fields to
1318 a struct so they don't occupy the same storage. Adjust accesses
1319 throughout file.
1320 (ppc64_elf_gc_keep): New function, split out from..
1321 (ppc64_elf_gc_mark_hook): ..here. Don't call _bfd_elf_gc_mark
1322 to mark .opd section, just set gc_mark.
1323 (ppc64_elf_edit_opd): Remove no_opd_opt parm. Don't set opd->adjust
1324 unless we are changing .opd. Test non-NULL opd->adjust at all
1325 accesses throughout file.
1326 * elf64-ppc.h (ppc64_elf_edit_opd): Update prototype.
1327
1328 2008-01-15 Alan Modra <amodra@bigpond.net.au>
1329
1330 * bfd-in.h (BFD_HOST_LONG_LONG): Delete.
1331 * bfd-in2.h: Regenerate.
1332
1333 2008-01-11 Tristan Gingold <gingold@adacore.com>
1334 Eric Botcazou <ebotcazou@adacore.com>
1335
1336 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Exit early if generating a
1337 relocatable.
1338 * elf32-arm.c (elf32_arm_gc_sweep_hook): Likewise.
1339 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
1340 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
1341 * elf32-i386.c (elf_i386_gc_sweep_hook): Likewise.
1342 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
1343 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
1344 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
1345 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
1346 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
1347 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
1348 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
1349 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
1350 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Likewise.
1351 * elfxx-mips.c (_bfd_mips_elf_gc_sweep_hook): Likewise.
1352 * elfxx-sparc.c (_bfd_sparc_elf_gc_sweep_hook): Likewise.
1353 * elflink.c (bfd_elf_gc_sections): Do not punt on relocatable output
1354 or executable output with relocations.
1355
1356 2008-01-09 Nick Clifton <nickc@redhat.com>
1357
1358 PR gas/5552
1359 * elf32-fr30.c (fr30_elf_howto_table): Set partial_inplace field
1360 to FALSE for all relocs.
1361
1362 2008-01-09 Richard Sandiford <rsandifo@nildram.co.uk>
1363
1364 PR ld/5526
1365 * elf-bfd.h (eh_cie_fde): Add u.cie.u.full_cie and u.cie.merged
1366 fields. Rename u.cie.u.merged to u.cie.u.merged_with.
1367 (eh_frame_sec_info): Add a cies field.
1368 (eh_frame_hdr_info): Add a merge_cies field.
1369 * elf-eh-frame.c (cie): Add a reloc_index member to the personality
1370 union.
1371 (_bfd_elf_begin_eh_frame_parsing): Set hdr_info->merge_cies instead
1372 of hdr_info->cies.
1373 (_bfd_elf_parse_eh_frame): Remove tmp_cie. Ccreate an array of
1374 cie structures in all cases and use it instead of extended_cies.
1375 If merging, store the cie array in sec_info->cies and point each
1376 CIE's eh_fde_cie at the associated element. Do not try to
1377 calculate the value of the personality routine here; record the
1378 offset of the relocation instead. Do not merge CIEs here.
1379 (_bfd_elf_end_eh_frame_parsing): Do not free hdr_info->cies here...
1380 (_bfd_elf_discard_section_eh_frame_hdr): ...do it here instead.
1381 (_bfd_elf_gc_mark_fdes): Mark the original (unmerged) CIE.
1382 (find_merged_cie): New function.
1383 (_bfd_elf_gc_mark_fdes): Use it. Free sec_info->cies.
1384
1385 2008-01-07 Nick Clifton <nickc@redhat.com>
1386
1387 PR binutils/5535
1388 * vms.c (vms_close_and_cleanup): Check for the presence of a
1389 vms_private_data_struct before examining any of its fields.
1390
1391 2008-01-07 H.J. Lu <hongjiu.lu@intel.com>
1392
1393 PR ld/5522
1394 * elflink.c (elf_link_input_bfd): Don't write out a section if
1395 its output section is marked with SEC_NEVER_LOAD.
1396
1397 For older changes see ChangeLog-2007
1398 \f
1399 Local Variables:
1400 mode: change-log
1401 left-margin: 8
1402 fill-column: 74
1403 version-control: never
1404 End:
This page took 0.100029 seconds and 4 git commands to generate.