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