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