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