1 2008-03-25 Nathan Sidwell <nathan@codesourcery.com>
3 * elf32-arm.c (elf32_arm_final_link_relocate): Skip dynamic relocs
4 in vxworks tls_vars sections.
5 (allocate_dynrelocs, elf32_arm_size_dynamic_sections): Likewise.
6 * elf32-i386.c (allocate_dynrelocs,
7 elf_i386_size_dynamic_sections, elf_i386_relocate_section): Likewise.
8 * elf32-ppc.c (allocate_dynrelocs, ppc_elf_size_dynamic_sections,
9 ppc_elf_relocate_section): Likewise.
10 * elf32-sh.c (allocate_dynrelocs, sh_elf_size_dynamic_sections,
11 sh_elf_relocate_section): Likewise.
12 * elfxx-sparc.c (allocate_dynrelocs,
13 _bfd_sparc_elf_size_dynamic_sections,
14 _bfd_sparc_elf_relocate_section): Likewise.
16 2008-03-21 Adam Nemet <anemet@caviumnetworks.com>
18 * elf.c (_bfd_elf_print_private_bfd_data): Use bfd_fprintf_vma to
19 print the values from the dynamic section.
21 2008-03-20 Richard Sandiford <rsandifo@nildram.co.uk>
23 * elfxx-mips.c (MIPS_ELF_GNU_GOT1_MASK): New macro.
24 (_bfd_mips_elf_finish_dynamic_sections): Use it instead of 0x80000000.
26 2008-03-20 Alan Modra <amodra@bigpond.net.au>
28 * elf32-spu.c (spu_elf_create_sections): Remove output_bfd parameter.
29 (spu_elf_find_overlays, spu_elf_size_stubs): Likewise
30 (process_stubs, discover_functions, build_call_tree): Likewise.
31 (spu_elf_stack_analysis): Likewise.
32 (spu_elf_check_vma): Likewise. Move.
33 (struct call_info): Make "is_tail" a bitfield.
34 (insert_callee): Clear fun->start and set fun->is_func if we find
36 * elf32-spu.h (spu_elf_create_sections): Update prototype.
37 (spu_elf_find_overlays, spu_elf_size_stubs, spu_elf_check_vma): Ditto.
39 2008-03-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
41 * aclocal.m4: Regenerate.
42 * configure: Likewise.
43 * Makefile.in: Likewise.
45 2008-03-16 H.J. Lu <hongjiu.lu@intel.com>
49 * elf32-i386.c (elf_i386_relocate_section): Issue an error
50 for R_386_GOTOFF relocaton against undefined hidden/internal
51 symbols when building a shared object.
53 * elf64-x86-64.c (elf64_x86_64_relocate_section): Issue an
54 error for R_X86_64_PC8/R_X86_64_PC16/R_X86_64_PC32
55 relocaton against undefined hidden/internal symbols when
56 building a shared object.
57 (elf64_x86_64_finish_dynamic_symbol): Return FALSE when symbol
58 is referenced locally, but isn't defined in a regular file.
60 2008-03-15 H.J. Lu <hongjiu.lu@intel.com>
62 * bfd-in.h (BFD_NO_FLAGS, HAS_RELOC, EXEC_P, HAS_LINENO,
63 HAS_DEBUG, HAS_SYMS, HAS_LOCALS, DYNAMIC, WP_TEXT, D_PAGED,
64 BFD_IS_RELAXABLE, BFD_TRADITIONAL_FORMAT, BFD_IN_MEMORY,
65 HAS_LOAD_PAGE, BFD_LINKER_CREATED): Moved to ...
68 * bfd.c (bfd): Change cacheable, target_defaulted, opened_once,
69 mtime_set, no_export, output_has_begun and has_armap to bit
72 * bfd-in2.h: Regenerated.
74 2008-03-14 Daniel Jacobowitz <dan@codesourcery.com>
76 * cache.c (close_one): Remove mtime hack.
78 2008-03-14 H.J. Lu <hongjiu.lu@intel.com>
81 * elfxx-ia64.c (elfNN_ia64_tprel_base): Remove BFD_ASSERT.
82 (elfNN_ia64_dtprel_base): Likewise.
83 (elfNN_ia64_relocate_section): Go to missing_tls_sec if
84 tls_sec is NULL before calling elfNN_ia64_tprel_base or
85 elfNN_ia64_dtprel_base. Report unsupported TLS relocations.
87 2008-03-14 Alan Modra <amodra@bigpond.net.au>
89 * elf32-spu.c (process_stubs, spu_elf_relocate_section): Move
91 (maybe_needs_stub): ..here, a new function that also omits stubs
93 (needs_ovl_stub): ..here. Create stubs for labels in code section
94 referenced by switch jump table.
95 (spu_elf_find_overlays): Set htab->ovly_load and htab->ovly_return.
96 (enum _insn_type): Delete.
97 (enum _stub_type): New.
98 (count_stub, build_stub): Adjust.
99 (allocate_spuear_stubs, build_spuear_stubs): Adjust.
101 2008-03-13 Alan Modra <amodra@bigpond.net.au>
103 * elf.c (_bfd_elf_make_section_from_shdr): Remove unnecessary cast.
104 (_bfd_elf_assign_file_position_for_section): Simplify align.
105 (_bfd_elf_init_reloc_shdr): Ensure shift expression wide enough
107 (elf_fake_sections, swap_out_syms): Likewise.
108 * elflink.c (bfd_elf_final_link): Likewise.
110 2008-03-13 Alan Modra <amodra@bigpond.net.au>
112 * Makefile.am: Run "make dep-am".
113 * Makefile.in: Regenerate.
114 * po/SRC-POTFILES.in: Regenerate.
116 2008-03-12 Bernd Schmidt <bernd.schmidt@analog.com>
118 From Jie Zhang <jie.zhang@analog.com>
119 * elf32-bfin.c (struct bfinfdpic_relocs_info): Make got17m4,
120 gothilo, fd, fdgot17m4, fdgothilo, fdgoff17m4, fdgoffhilo,
121 gotoff, call and sym not bitfields.
122 (bfinfdpic_gc_sweep_hook): New function; update the relocation
123 information for the relocations of the section being removed.
124 (bfinfdpic_check_relocs): Accumulate the number of relocations
125 which set got17m4, gothilo, fd, fdgot17m4, fdgothilo, fdgoff17m4,
126 fdgoffhilo, gotoff, call and sym fields.
127 (elf_backend_gc_sweep_hook): Redefine for FD-PIC.
129 2008-03-12 Alan Modra <amodra@bigpond.net.au>
132 * elf-bfd.h: Include elf/internal.h after elf/external.h.
133 * elfcode.h (elf_swap_symbol_in): Map reserved shndx range.
134 (elf_swap_symbol_out): Adjust SHN_XINDEX test.
135 (elf_swap_ehdr_out): Mask SHN_LORESERVE and SHN_XINDEX to values
136 seen in external structs.
137 (valid_section_index_p): Delete.
138 (elf_object_p): Don't increment section numbers over reserved range.
139 Simplify test for valid sh_link, sh_info and e_shstrndx fields.
140 (elf_write_shdrs_and_ehdr): Mask SHN_LORESERVE and SHN_XINDEX to values
141 seen in external structs. Don't increment section numbers over
143 * elf.c (bfd_elf_sym_name): Remove redundant tests on st_shndx.
144 (bfd_section_from_shdr): Likewise.
145 (group_signature): Range check before accessing elf_elfsections.
146 (_bfd_elf_setup_sections): Likewise.
147 (bfd_section_from_shdr): Likewise.
148 (bfd_section_from_shdr): Don't increment section number over
150 (assign_file_positions_for_non_load_sections): Likewise.
151 (assign_file_positions_except_relocs): Likewise.
152 (_bfd_elf_write_object_contents): Likewise.
153 (assign_section_numbers): Likewise. Adjust for changed SHN_*.
154 (prep_headers): Delete unused variable.
155 * elflink.c (bfd_elf_link_record_local_dynamic_symbol): Adjust
156 for changed SHN_* values.
157 (check_dynsym, elf_link_input_bfd): Likewise.
158 (bfd_elf_final_link): Likewise. Don't skip over reserved section
160 (elf_fixup_link_order): Check that sh_link field is valid.
161 * elf-hppa.h (elf_hppa_add_symbol_hook): Make "index" unsigned.
162 * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Range check before
163 accesssing elf_elfsections.
164 * elf32-avr.c (elf32_avr_size_stubs): Likewise.
165 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
166 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Likewise.
167 * elf64-hppa.c (elf64_hppa_check_relocs): Adjust for changed
168 SHN_* defines. Test for SHN_BAD return from
169 _bfd_elf_section_from_bfd_section
171 2008-03-12 Alan Modra <amodra@bigpond.net.au>
173 * elf-bfd.h (_bfd_elf_section_from_bfd_section): Update prototype.
174 * elf.c (_bfd_elf_section_from_bfd_section): Return unsigned int,
176 (_bfd_elf_print_private_bfd_data): Test for SHN_BAD result from
177 _bfd_elf_section_from_bfd_section, not -1.
178 (swap_out_syms): Likewise.
179 * elflink.c (elf_link_add_object_symbols): Likewise.
180 (bfd_elf_get_bfd_needed_list): Likewise.
181 (bfd_elf_match_symbols_in_sections): Likewise.
182 (elf_link_add_object_symbols): Don't bother testing for symbols
183 using normal sections before calling bfd_section_from_elf_index.
184 (elf_link_input_bfd, bfd_elf_final_link): Likewise.
185 (bfd_elf_reloc_symbol_deleted_p): Likewise.
186 * elfcode.h (elf_slurp_symbol_table): Likewise.
187 * elf32-spu.c (get_sym_h): Likewise.
188 * elf32-xtensa.c (get_elf_r_symndx_section): Likewise.
189 * elf64-ppc.c (opd_entry_value, get_sym_h, ppc64_elf_edit_toc): Ditto.
190 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
192 2008-03-11 Alan Modra <amodra@bigpond.net.au>
194 * elf32-spu.c (spu_elf_relocate_section): Test identical conditions
195 to those in process_stubs for overlay symbols.
197 2008-03-09 Paul Brook <paul@codesourcery.com>
199 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Handle new
202 2008-03-08 Paul Brook <paul@codesourcery.com>
204 * elf32-arm.c (insert_thumb_branch): Rewrite.
205 (elf32_thumb_to_arm_stub): Use new insert_thumb_branch.
207 2008-03-07 Paul Brook <paul@codesourcery.com>
209 * elf32-arm.c (elf32_arm_howto_table_1): Fix bitmasks for MOVW and
211 (elf32_arm_final_link_relocate): Fix off by one MOVW/MOVT sign
213 (elf32_arm_relocate_section): Handle MOVW and MOVT
214 relocations. Improve safety check for other weird relocations.
215 (elf32_arm_check_relocs): Only set h->needs_plt for branch/call
218 2008-03-03 Bob Wilson <bob.wilson@acm.org>
220 * xtensa-isa.c (xtensa_isa_num_pipe_stages): Make max_stage static and
221 only compute its value once.
223 2008-03-03 Alan Modra <amodra@bigpond.net.au>
225 * elf32-spu.c (struct got_entry): Add "addend" field.
226 (count_stub, build_stub): Use a new stub if relocation addend
227 differs from existing stubs for this symbol.
228 (process_stubs): Deal with addends.
229 (spu_elf_relocate_section, spu_elf_output_symbol_hook): Likewise.
231 2008-03-02 H.J. Lu <hongjiu.lu@intel.com>
234 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return true
235 for hidden and local symbols.
237 2008-03-03 Alan Modra <amodra@bigpond.net.au>
239 * elf32-ppc.c (allocate_dynrelocs): Discard relocs on
240 undefined symbols with internal or hidden visibility.
241 (ppc_elf_relocate_section): Likewise. Use SYMBOL_CALLS_LOCAL
242 rather than SYMBOL_REFERENCES_LOCAL on branches. Don't
243 return immediately on dynamic reloc error.
245 2008-03-01 Alan Modra <amodra@bigpond.net.au>
247 * elf64-ppc.c (build_plt_stub): Add relocs on plt call stubs
249 (get_relocs): New function, split out from..
250 (ppc_build_one_stub): ..here. Add relocs on plt_branch stubs if
251 emitrelocations. Remove indx temp.
252 (ppc_size_one_stub): Count new stub relocs.
253 (ppc64_elf_size_stubs): Count new glink reloc.
254 (ppc64_elf_build_stubs): Emit glink reloc if emitrelocations.
255 (ppc64_elf_finish_dynamic_sections): Output glink relocs.
256 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Describe non-pic
259 2008-02-28 Alan Modra <amodra@bigpond.net.au>
261 * elf32-spu.c (mark_functions_via_relocs): Don't assume that
262 the "->start" pointer reaches to function origin, so that we
263 can handle functions split over more than two sections.
264 (build_call_tree): Likewise.
265 (pasted_function): Don't attempt to set fun->start back to the
266 function origin, just go back one section.
268 2008-02-27 Catherine Moore <clm@codesourcery.com>
270 * elf.c ( _bfd_elf_print_private_bfd_data): Call
271 elf_backend_get_target_dtag if defined.
272 * elf32-mips.c (elf_backend_get_target_dtag): Define.
273 * elf64-mips.c: Likewise.
274 * elfn32-mips.c: Likewise.
275 * elfxx-mips.c (_bfd_mips_elf_get_target_dtag): New.
276 * elfxx-mips.h (_bfd_mips_elf_get_target_dtag): Declare.
277 * elf-bfd.h (elf_backend_get_target_dtag): Add prototype.
278 * elfxx-target.h (elf_backend_get_target_dtag): Add default.
279 (elf_backend_data): Add elf_backend_get_target_dtag.
281 2008-02-26 Alan Modra <amodra@bigpond.net.au>
283 * elf32-ppc.c (ppc_elf_check_relocs): Set pointer_equality_needed
284 for R_PPC_REL32 syms. Don't set non_got_ref on branch reloc syms,
285 and assume branch relocs are not dynamic when non-shared.
286 (readonly_dynrelocs): New function, split out from..
287 (maybe_set_textrel): ..here, renamed from old readonly_dynrelocs.
288 (ppc_elf_adjust_dynamic_symbol): For symbols generating plt entries,
290 (allocate_dynrelocs): ..and don't set u.def for undefined weak.
291 Do allow dynamic relocs on undefined symbols.
292 (ppc_elf_adjust_dynamic_symbol): Use readonly_dynrelocs.
293 (ppc_elf_relocate_section): Mirror dynamic reloc changes in
295 (ppc_elf_finish_dynamic_symbol): Don't give a warning on weak
296 plt symbols needing pointer_equality_needed.
298 2008-02-23 Alan Modra <amodra@bigpond.net.au>
300 * elf32-ppc.c (ppc_elf_check_relocs): Revert non_got_ref change.
302 2008-02-23 Alan Modra <amodra@bigpond.net.au>
304 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Copy
305 pointer_equality_needed.
306 (ppc_elf_check_relocs): Split out non-branch relocs from others
307 that might emit dynamic relocs. Set pointer_equality_needed
308 for their symbols. Don't set non_got_ref on branch reloc symbols.
309 (ppc_elf_hash_symbol): New function.
310 (elf_backend_hash_symbol): Define.
311 (ppc_elf_finish_dynamic_symbol): Handle pointer_equality_needed.
312 Error if pointer_equality_needed on weak plt symbol.
314 2008-02-22 H.J. Lu <hongjiu.lu@intel.com>
317 * elflink.c (elf_create_symbuf): Correct buffer size and
320 2008-02-22 Nick Clifton <nickc@redhat.com>
323 * dwarf2.c: Revert previous patch. All of the allocate memory is
324 on an obstack which will be freed at some other time.
326 2008-02-20 Nick Clifton <nickc@redhat.com>
329 * libbfd.c (bfd_realloc_or_free): New function. Performs like
330 bfd_realloc, but if the (re)allocation fails, the pointer is
332 * libbfd-in.h: Prototype.
333 * libbfd.h: Regenerate.
334 * bfdio.c (bfd_bwrite): Use the new function.
335 (bfd_seek): Likewise.
336 * bfdwin.c:(bfd_get_file_window): Likewise.
337 * elf-strtab.c (_bfd_elf_strtab_add): Likewise.
338 * elf32-ppc.c (ppc_elf_relax_section): Likewise.
339 * elf32-xtensa.c (vsprintf_msg): Likewise.
340 * mach-o.c (bfd_mach_o_core_fetch_environment): Likewise.
341 * stabs.c (_bfd_link_seciton_stabs): Likewise.
342 * vms-misc.c (_bfd_vms_get_record): Likewise.
343 * vms-tir.c (check_section): Likewise.
344 * vms.c (vms_new_section_hook): Likewise.
345 * elf32-arm.c (elf32_arm_section_map_add): Check that the
346 allocation of sec_data->map succeeded before using it.
347 * elflink.c (elf_link_output_sym): Do not overwrite finfo->
348 symshndxbuf until it is known that the reallocation succeeded.
350 2008-02-20 Diogo de Carvalho Kraemer <diogo@kraemer.eng.br>
351 Nick Clifton <nickc@redhat.com>
354 * dwarf2.c (read_abbrevs): Free the abbreviation table if we run
356 (decode_line_info): Free the line_info_table before returning a
358 (_bfd_dwarf2_cleanup_debug_info): Free the abbreviation table.
359 Free the line table. Free the function table. Free the variable
362 2008-02-17 Mark Kettenis <kettenis@gnu.org>
364 * elf.c (swap_out_syms): Avoid preprocessing directive within
367 2008-02-17 Jan Kratochvil <jan.kratochvil@redhat.com>
369 * elf.c (assign_file_positions_for_load_sections): Set the type of
370 PT_NOTE sections to SHT_NOTE.
372 2008-02-17 Ulrich Weigand <uweigand@de.ibm.com>
374 * simple.c (bfd_simple_get_relocated_section_contents): Set
375 link_info.output_bfd.
377 2008-02-16 Nathan Sidwell <nathan@codesourcery.com>
379 * dwarf2.c (find_line): Don't trust debug information after an
380 unparseable compilation unit.
382 2008-02-15 Alan Modra <amodra@bigpond.net.au>
385 * section.c (SEC_LINK_DUPLICATES): Correct. Renumber following flags.
386 * bfd-in2.h: Regenerate.
388 2008-02-15 Alan Modra <amodra@bigpond.net.au>
390 * elf-bfd.h (enum elf_object_id): Add HPPA_ELF_TDATA.
391 * elf.c (bfd_elf_allocate_object): Don't check for already allocated
393 * elf32-hppa.c (elf32_hppa_mkobject): New function.
394 (bfd_elf32_mkobject): Define.
395 * elf32-ppc.c (is_ppc_elf_target): Delete. Replace all uses with..
396 (is_ppc_elf): ..this new macro.
397 * elf64-ppc.c (is_ppc64_elf_target): Delete. Replace all uses with..
398 (is_ppc64_elf): ..this new macro.
400 2008-02-15 Alan Modra <amodra@bigpond.net.au>
402 * elflink.c: Replace all accesses to hash->creator field with
404 * cofflink.c: Likewise.
405 * coff-h8300.c: Likewise.
407 * elf32-m68hc1x.c: Likewise.
408 * elf32-ppc.c: Likewise.
409 * elf64-alpha.c: Likewise.
410 * elf64-ppc.c: Likewise.
411 * elf64-sparc.c: Likewise.
412 * elfxx-mips.c: Likewise.
413 * i386linux.c: Likewise.
414 * m68klinux.c: Likewise.
415 * sparclinux.c: Likewise.
417 * xcofflink.c: Likewise.
418 * linker.c: Likewise.
419 (_bfd_link_hash_table_init): Don't store creator.
421 2008-02-14 Peter Jones <pjones@redhat.com>
423 * efi-rtdrv-ia32.c: New file.
424 * efi-bsdrv-ia32.c: New file.
425 * efi-rtdrv-ia64.c: New file.
426 * efi-bsdrv-ia64.c: New file.
427 * efi-rtdrv-x86_64.c: New file.
428 * efi-bsdrv-x86_64.c: New file.
429 * peicode.h (pe_bfd_object_p): Add support for boot service and
430 runtime service drivers.
431 * libpei.h: Add macros for EFI formats, and rename the efi application
432 format macros to disambiguate.
433 * targets.c: Add bfd_target _vec externs.
434 (_bfd_tar): Add EFI _vec entries.
435 * config.bfd: Add EFI vectors into the selection routines.
436 * configure.in: add EFI _vec entries.
437 * configure: Regenerate.
438 * Makefile.am: Add EFI files.
439 * Makefile.in: Regenerate.
441 2008-02-14 Nathan Sidwell <nathan@codesourcery.com>
443 * dwarf1.c (struct dwarf1_debug): Add syms member.
444 (alloc_dwarf1_unit, alloc_dwarf1_func): Check for out of memory.
445 (parse_line_table, _bfd_dwarf1_find_nearest_line): Relocate
446 section contents, check for out of memory.
448 * dwarf1.c (struct dwarf1_debug): Change data pointers to bfd_byte.
449 (parse_die): Change data pointers to bfd_byte.
450 (parse_line_table, parse_functions_in_unit): Likewise.
452 2008-02-14 Alan Modra <amodra@bigpond.net.au>
454 * elflink.c (compute_bucket_count): Warning fixes.
456 2008-02-12 DJ Delorie <dj@redhat.com>
458 * elf32-iq2000.c (iq2000_elf_relocate_section): Adjust addend of
459 relocation pointing to local symbol in merged section.
461 * elf32-iq2000.c (iq2000_elf_relocate_offset16): New.
462 (iq2000_elf_relocate_section): Call it.
464 2008-02-12 Nick Clifton <nickc@redhat.com>
467 * elf-bfd.h (enum elf_object_id): New enum, used to identify
468 target specific extensions to the elf_obj_tdata structure.
469 (struct elf_obj_tdata): New field 'object_id'.
470 (elf_object_id, elf_program_header_size, elf_symtab_hdr): New
471 macros for accessing fields in the elf_obj_tdata structure.
472 (bfd_elf_mkobject): Rename to bfd_elf_make_generic_object.
473 (bfd_elf_allocate_object): New function.
474 * elf.c (bfd_elf_mkobject): Rename to bfd_elf_make_generic_object
475 and implement by calling bfd_elf_allocate_object.
476 (bfd_elf_allocate_object): New function: Allocates an
477 elf_obj_tdata structure, possibly with a target specific
479 * elfxx-target.h (bfd_elfNN_mkobject): Use
480 bfd_elf_make_generic_object as the default value.
481 * elf32-arm.c (elf32_arm_obj_tdata): Rename to elf_arm_obj_tdata
482 for consistency with other, similar structures.
483 (is_arm_elf): New macro. Checks a BFD to make sure that is an ARM
485 (elf32_arm_mkobject): Call bfd_elf_allocate_object.
486 (bfd_elf32_arm_vfp11_erratum_scan): Use is_arm_elf macro to check
487 the bfd being processed.
488 (bfd_elf32_arm_vfp11_fix_veneer_locations): Likewise.
489 (bfd_elf32_arm_set_target_relocs): Likewise.
490 (bfd_elf32_arm_final_link_relocate): Likewise.
491 (bfd_elf32_arm_copy_private_bfd_data): Likewise.
492 (bfd_elf32_arm_merge_eabi_attributes): Likewise.
493 (bfd_elf32_arm_merge_private_bfd_data): Likewise.
494 (bfd_elf32_arm_check_relocs): Likewise.
495 (bfd_elf32_arm_gc_mark_extra_sections): Likewise.
496 (bfd_elf32_arm_size_dynamic_sections): Likewise.
497 (bfd_elf32_arm_process_before_allocation): Use elf_symtab_hdr.
498 (bfd_elf32_arm_init_maps): Likewise.
499 (bfd_elf32_arm_final_link_relocate): Likewise.
500 (bfd_elf32_arm_relocate_section): Likewise.
501 (bfd_elf32_arm_gc_sweep_hook): Likewise.
502 (bfd_elf32_arm_check_relocs): Likewise.
503 (bfd_elf32_arm_size_dynamic_sections): Likewise.
504 * elf32-i386.c (elf_i386_mkobject): Call bfd_elf_allocate_object.
505 (is_i386_elf): New macro. Checks a BFD to make sure that is an x86
507 (elf_i386_check_relocs): Use is_i386_elf macro to check the bfd
509 (elf_i386_size_dynamic_sections): Likewise.
510 (elf_i386_relocate_section): Likewise.
511 (elf_i386_check_relocs): Use elf_symtab_hdr.
512 (elf_i386_gc_sweep_hook): Likewise.
513 (elf_i386_size_dynamic_sections): Likewise.
514 (elf_i386_relocate_section): Likewise.
515 * elf32-ppc.c (ppc_elf_mkobject): Call bfd_elf_allocate_object.
516 (elf_create_pointer_linker_section): Use is_ppc_elf_target to
517 verify that the bfd before accessing target specific fields.
518 (ppc_elf_check_relocs): Likewise.
519 (elf_finish_pointer_linker_section): Likewise.
520 (elf_create_pointer_linker_section): Use elf_symtab_hdr.
521 (ppc_elf_check_relocs): Likewise.
522 (ppc_elf_gc_sweep_hook): Likewise.
523 (ppc_elf_tls_optimize): Likewise.
524 (ppc_elf_size_dynamic_sections): Likewise.
525 (ppc_elf_relax_section): Likewise.
526 (ppc_elf_relocate_section): Likewise.
527 * elf32-s390.c (struct elf_s390_obj_tdata): Add a comment
528 reminding programmers to keep this structure in sync with the one
529 defined in elf64-s390.c.
530 (elf_s390_mkobject): Call bfd_elf_allocate_object.
531 (is_s390_elf): New macro. Checks a BFD to make sure that is an s390
533 (elf_s390_check_relocs): Use is_s390_elf macro to check the bfd
535 (elf_s390_size_dynamic_sections): Likewise.
536 (elf_s390_relocate_section): Likewise.
537 (elf_s390_check_relocs): Use elf_symtab_hdr.
538 (elf_s390_gc_sweep_hook): Likewise.
539 (elf_s390_size_dynamic_sections): Likewise.
540 (elf_s390_relocate_section): Likewise.
541 * elf32-sh.c (sh_elf_mkobject): Call bfd_elf_allocate_object.
542 (is_sh_elf): New macro. Checks a BFD to make sure that is an SH
544 (sh_elf_size_dynamic_sections): Use is_sh_elf macro to check the
546 (sh_elf_relocate_section): Likewise.
547 (sh_elf_check_relocs): Likewise.
548 (sh_elf_copy_private_data): Likewise.
549 (sh_elf_relax_section): Use elf_symtab_hdr.
550 (sh_elf_size_dynamic_sections): Likewise.
551 (sh_elf_relocate_section): Likewise.
552 (sh_elf_get_relocated_section_contents): Likewise.
553 (sh_elf_gc_sweep_hook): Likewise.
554 (sh_elf_check_relocs): Likewise.
555 * elf64-alpha.c (elf64_alpha_mkobject): Call bfd_elf_allocate_object.
556 (is_alpha_elf): New macro. Checks a BFD to make sure that is an
558 (elf64_alpha_create_got_section): Use is_alpha_elf macro to check
559 the bfd being processed.
560 (elf64_alpha_create_dynamic_section): Likewise.
561 (elf64_alpha_check_relocs): Likewise.
562 (elf64_alpha_size_got_sections): Likewise.
563 (elf64_alpha_relax_section): Likewise.
564 (elf64_alpha_relocate_section): Likewise.
565 (elf64_alpha_final_link): Likewise.
566 (elf64_alpha_check_relocs): Use elf_symtab_hdr.
567 (elf64_alpha_relax_section): Likewise.
568 (elf64_alpha_relocate_section_r): Likewise.
569 (elf64_alpha_relocate_section): Likewise.
570 * elf64-ppc.c (ppc64_elf_mkobject): Call bfd_elf_allocate_object.
571 (ppc64_elf_check_relocs): Use is_ppc64_elf_target to check the bfd
573 (opd_entry_value): Likewise.
574 (allocate_dynrelocs): Likewise.
575 (ppc64_elf_relocate_section): Likewise.
576 (ppc64_elf_check_relocs): Use elf_symtab_hdr.
577 (opd_entry_value): Likewise.
578 (ppc64_elf_gc_sweep_hook): Likewise.
579 (get_sym_h): Likewise.
580 (ppc64_elf_edit_opd): Likewise.
581 (ppc64_elf_tls_optimize): Likewise.
582 (ppc64_elf_edit_toc): Likewise.
583 (ppc64_elf_size_dynamic_sections): Likewise.
584 (toc_adjusting_stub_needed): Likewise.
585 (ppc64_elf_size_stubs): Likewise.
586 (ppc64_elf_relocate_section): Likewise.
587 * elf64-s390.c (struct elf_s390_obj_tdata): Add a comment
588 reminding programmers to keep this structure in sync with the one
589 defined in elf32-s390.c.
590 (elf_s390_mkobject): Call bfd_elf_allocate_object.
591 (is_s390_elf): New macro. Checks a BFD to make sure that is an s390
593 (elf_s390_check_relocs): Use is_s390_elf macro to check the bfd
595 (elf_s390_size_dynamic_sections): Likewise.
596 (elf_s390_relocate_section): Likewise.
597 (elf_s390_check_relocs): Use elf_symtab_hdr.
598 (elf_s390_gc_sweep_hook): Likewise.
599 (elf_s390_size_dynamic_sections): Likewise.
600 (elf_s390_relocate_section): Likewise.
601 * elf64-x86_64.c (elf64_x86_64_mkobject): Call bfd_elf_allocate_object.
602 (is_x86_64_elf): New macro. Checks a BFD to make sure that is an
604 (elf64_x86_64_check_relocs): Use is_x86_64_elf macro to check the bfd
606 (elf64_x86_64_size_dynamic_sections): Likewise.
607 (elf64_x86_64_relocate_section): Likewise.
608 (elf64_x86_64_check_relocs): Use elf_symtab_hdr.
609 (elf64_x86_64_gc_sweep_hook): Likewise.
610 (elf64_x86_64_size_dynamic_sections): Likewise.
611 (elf64_x86_64_relocate_section): Likewise.
612 * elfxx-sparc.c (_bfd_sparc_elf_mkobject): Call bfd_elf_allocate_object.
613 (is_sparc_elf): New macro. Checks a BFD to make sure that is a Sparc
615 (_bfd_sparc_elf_check_relocs): Use is_sparc_elf macro to check the
617 (_bfd_sparc_elf_gc_sweep_hook): Likewise.
618 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
619 (_bfd_sparc_elf_check_relocs): Use elf_symtab_hdr.
620 (_bfd_sparc_elf_gc_sweep_hook): Likewise.
621 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
622 (_bfd_sparc_elf_relocate_section): Likewise.
624 2008-02-12 Alan Modra <amodra@bigpond.net.au>
627 * arange-set.c: Delete.
628 * arange-set.h: Delete.
629 * dwarf2.c: Revert 2007-09-21 changes.
630 * Makefile.am: Likewise.
631 * Makefile.in: Regenerate.
632 * po/SRC-POTFILES.in: Regenerate.
634 2008-02-11 Bernd Schmidt <bernd.schmidt@analog.com>
636 * elf32-bfin.c (bfin_relocate_section): Set up dynobj before using it
638 (elf32_bfin_merge_private_bfd_data): Simplify, and ensure object type
639 mismatches are detected.
641 * elf32-bfin.c (bfinfdpic_relocate_section): Take more care not to
642 emit invalid relocs or rofixup entries for deleted .eh_frame entries.
644 2008-02-11 Daniel Jacobowitz <dan@codesourcery.com>
646 * cache.c (cache_bread): Set bfd_error_file_truncated if EOF
648 * srec.c (srec_scan): Calculate the checksum. Complain on mismatch.
650 2008-02-07 Alan Modra <amodra@bigpond.net.au>
652 * elf32-spu.c (spu_elf_size_stubs): Revert 2008-01-28 doubling
653 of _ovly_buf_table size.
654 (spu_elf_build_stubs): Use low bit of .size as "present" bit.
655 Adjust initialisations relating to _ovly_buf_table.
657 2008-02-04 Bob Wilson <bob.wilson@acm.org>
659 * elf32-xtensa (elf_xtensa_relocate_section): After finding an invalid
660 relocation, do not continue processing it. Ignore R_XTENSA_ASM_EXPAND
661 relocations against dynamic symbols.
662 (elf_xtensa_finish_dynamic_sections): Do not fail if there is no
665 2008-02-04 Kai Tietz <kai.tietz@onevision.com>
666 H.J. Lu <hongjiu.lu@intel.com>
669 * warning.m4: Enable -Wno-format by default when using gcc on
671 * configure: Regenerated.
673 2008-02-04 Adam Nemet <anemet@caviumnetworks.com>
675 * archures.c: Update copyright.
676 (bfd_mach_mips_octeon): New macro.
677 * bfd-in2.h: Regenerate.
678 * elfxx-mips.c (_bfd_elf_mips_mach): Handle Octeon.
679 (mips_set_isa_flags): Likewise.
680 (mips_mach_extensions): Add Octeon.
681 * cpu-mips.c: Update copyright.
682 (I_mipsocteon): New enum constant.
683 (arch_info_struct): Add Octeon.
685 2008-02-04 Alan Modra <amodra@bigpond.net.au>
687 * elf32-spu.c (spu_elf_relocate_section): Correct return type.
688 Return error status on unexpected relocation errors.
690 2008-02-04 Alan Modra <amodra@bigpond.net.au>
693 * elf.c (bfd_elf_get_elf_syms): Revert 2008-01-31. Instead abort
695 * elf32-arm.c (elf32_arm_size_dynamic_sections): Skip glue
696 processing on non-ELF input.
698 2008-01-31 Marc Gauthier <marc@tensilica.com>
700 * config.bfd (xtensa*-*-*): Recognize processor variants.
702 2008-01-31 Nick Clifton <nickc@redhat.com>
705 * elf.c (bfd_elf_get_elf_syms): Check the return value of
706 get_elf_backend_data.
708 2008-01-28 Fabian Groffen <grobian@gentoo.org>
710 * config.bfd (x86_64-*-solaris2): Add support for this target.
712 2008-01-28 Alan Modra <amodra@bigpond.net.au>
714 Rewrite SPU overlay handling code. Put overlay calls stubs in the
715 overlays where possible. Use a faster call stub, or optionally at
716 compile time, a more compact stub. Double size of _ovly_buf_table
717 so that low bit of _ovly_table.buf can be used as a "present" bit.
718 Reserve an extra _ovly_table entry for index zero.
719 * elf32-spu.c: (struct spu_link_hash_table): Delete a number of fields,
721 (struct got_entry): New.
722 (struct spu_stub_hash_entry): Delete.
723 (stub_hash_newfunc, spu_elf_link_hash_table_free): Delete.
724 (spu_elf_link_hash_table_create): Adjust for struct changes.
725 (spu_stub_name): Delete.
726 (spu_elf_find_overlays): Don't track sections from overlay regions.
727 Instead set ovl_buf number in spu elf section data. Error if
728 overlays in one region don't start at the same address. Adjust
729 for struct _spu_elf_section_data changes.
730 (SIZEOF_STUB1, SIZEOF_STUB2, ILA_79, ILA_78): Delete.
731 (OVL_STUB_SIZE, BRSL, LNOP, ILA): Define.
732 (needs_ovl_stub): Adjust for struct _spu_elf_section_data changes.
733 (enum _insn_type): New.
734 (count_stub, build_stub): New functions.
735 (allocate_spuear_stubs): Use count_stub.
736 (build_spuear_stubs): Use build_stub.
737 (populate_stubs, sort_stubs): Delete.
738 (process_stubs): New function.
739 (write_one_stub): Delete.
740 (spu_elf_size_stubs, spu_elf_build_stubs): Rewrite.
741 (alloc_stack_info): Adjust for struct _spu_elf_section_data changes.
742 (maybe_insert_function, check_function_ranges): Likewise.
743 (find_function, pasted_function, build_call_tree): Likewise.
744 (spu_elf_stack_analysis, spu_elf_modify_segment_map): Likewise.
745 (spu_elf_modify_program_headers): Likewise.
746 (interesting_section): Detect stub sections differently. Delete
747 htab param, adjust all callers.
748 (spu_elf_relocate_section): Rewrite stub handling.
749 (spu_elf_output_symbol_hook): Likewise.
750 (bfd_elf32_bfd_link_hash_table_free): Delete.
751 * elf32-spu.h (struct _spu_elf_section_data): Move input-only and
752 output-only fields into a union. Add ovl_buf.
753 (spu_elf_size_stubs, spu_elf_build_stubs): Update prototypes.
755 2008-01-25 DJ Delorie <dj@redhat.com>
757 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): New.
759 2008-01-25 Kai Tietz <kai.tietz@onevision.com>
761 * bfd-in.h: Add mingw I64 support.
762 * bfd-in2.h: Regenerated.
763 * bfd.c: (bfd_get_sign_extend_vma): Add pe-x86-64 and pei-x86-64.
765 2008-01-21 Alan Modra <amodra@bigpond.net.au>
768 * format.c (bfd_check_format_matches): Don't accept archives as
769 fully matching unless they have a map.
771 2008-01-21 Alan Modra <amodra@bigpond.net.au>
773 * elflink.c (_bfd_elf_link_output_relocs): Correct error return.
775 2008-01-21 Alan Modra <amodra@bigpond.net.au>
777 * ecoff.c (_bfd_ecoff_archive_p): Delete.
778 * libecoff.h (_bfd_ecoff_archive_p): Delete.
779 * coff-alpha.c (ecoffalpha_little_vec): Use bfd_generic_archive_p.
780 * coff-mips.c (ecoff_little_vec, ecoff_big_vec): Likewise.
781 (ecoff_biglittle_vec): Likewise.
783 2008-01-19 Alan Modra <amodra@bigpond.net.au>
786 * elf64-ppc.c (ppc64_elf_tls_optimize): Ensure htab->tls_get_addr
787 non-NULL before dereferencing.
789 2008-01-15 Alan Modra <amodra@bigpond.net.au>
792 * elf-bfd.h (struct elf_backend_data): Add gc_keep. Remove param
794 (_bfd_elf_gc_keep): Declare.
795 * elfxx-target.h (elf_backend_gc_keep): Define.
796 (elfNN_bed): Init new field.
797 * elflink.c (_bfd_elf_gc_keep): New function.
798 (bfd_elf_gc_sections): Call gc_keep.
799 * elf64-ppc.c (elf_backend_gc_keep): Define.
800 (struct _ppc64_elf_section_data): Move .opd related fields to
801 a struct so they don't occupy the same storage. Adjust accesses
803 (ppc64_elf_gc_keep): New function, split out from..
804 (ppc64_elf_gc_mark_hook): ..here. Don't call _bfd_elf_gc_mark
805 to mark .opd section, just set gc_mark.
806 (ppc64_elf_edit_opd): Remove no_opd_opt parm. Don't set opd->adjust
807 unless we are changing .opd. Test non-NULL opd->adjust at all
808 accesses throughout file.
809 * elf64-ppc.h (ppc64_elf_edit_opd): Update prototype.
811 2008-01-15 Alan Modra <amodra@bigpond.net.au>
813 * bfd-in.h (BFD_HOST_LONG_LONG): Delete.
814 * bfd-in2.h: Regenerate.
816 2008-01-11 Tristan Gingold <gingold@adacore.com>
817 Eric Botcazou <ebotcazou@adacore.com>
819 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Exit early if generating a
821 * elf32-arm.c (elf32_arm_gc_sweep_hook): Likewise.
822 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
823 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
824 * elf32-i386.c (elf_i386_gc_sweep_hook): Likewise.
825 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
826 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
827 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
828 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
829 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
830 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
831 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
832 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
833 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Likewise.
834 * elfxx-mips.c (_bfd_mips_elf_gc_sweep_hook): Likewise.
835 * elfxx-sparc.c (_bfd_sparc_elf_gc_sweep_hook): Likewise.
836 * elflink.c (bfd_elf_gc_sections): Do not punt on relocatable output
837 or executable output with relocations.
839 2008-01-09 Nick Clifton <nickc@redhat.com>
842 * elf32-fr30.c (fr30_elf_howto_table): Set partial_inplace field
843 to FALSE for all relocs.
845 2008-01-09 Richard Sandiford <rsandifo@nildram.co.uk>
848 * elf-bfd.h (eh_cie_fde): Add u.cie.u.full_cie and u.cie.merged
849 fields. Rename u.cie.u.merged to u.cie.u.merged_with.
850 (eh_frame_sec_info): Add a cies field.
851 (eh_frame_hdr_info): Add a merge_cies field.
852 * elf-eh-frame.c (cie): Add a reloc_index member to the personality
854 (_bfd_elf_begin_eh_frame_parsing): Set hdr_info->merge_cies instead
856 (_bfd_elf_parse_eh_frame): Remove tmp_cie. Ccreate an array of
857 cie structures in all cases and use it instead of extended_cies.
858 If merging, store the cie array in sec_info->cies and point each
859 CIE's eh_fde_cie at the associated element. Do not try to
860 calculate the value of the personality routine here; record the
861 offset of the relocation instead. Do not merge CIEs here.
862 (_bfd_elf_end_eh_frame_parsing): Do not free hdr_info->cies here...
863 (_bfd_elf_discard_section_eh_frame_hdr): ...do it here instead.
864 (_bfd_elf_gc_mark_fdes): Mark the original (unmerged) CIE.
865 (find_merged_cie): New function.
866 (_bfd_elf_gc_mark_fdes): Use it. Free sec_info->cies.
868 2008-01-07 Nick Clifton <nickc@redhat.com>
871 * vms.c (vms_close_and_cleanup): Check for the presence of a
872 vms_private_data_struct before examining any of its fields.
874 2008-01-07 H.J. Lu <hongjiu.lu@intel.com>
877 * elflink.c (elf_link_input_bfd): Don't write out a section if
878 its output section is marked with SEC_NEVER_LOAD.
880 For older changes see ChangeLog-2007
886 version-control: never