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