* elf-bfd.h (enum elf_object_id): New enum, used to identify
target specific extensions to the elf_obj_tdata structure.
(struct elf_obj_tdata): New field 'object_id'.
(elf_object_id, elf_program_header_size, elf_symtab_hdr): New
macros for accessing fields in the elf_obj_tdata structure.
(bfd_elf_mkobject): Rename to bfd_elf_make_generic_object.
(bfd_elf_allocate_object): New function.
* elf.c (bfd_elf_mkobject): Rename to bfd_elf_make_generic_object
and implement by calling bfd_elf_allocate_object.
(bfd_elf_allocate_object): New function: Allocates an
elf_obj_tdata structure, possibly with a target specific
extension.
* elfxx-target.h (bfd_elfNN_mkobject): Use
bfd_elf_make_generic_object as the default value.
* elf32-arm.c (elf32_arm_obj_tdata): Rename to elf_arm_obj_tdata
for consistency with other, similar structures.
(is_arm_elf): New macro. Checks a BFD to make sure that is an ARM
ELF bfd.
(elf32_arm_mkobject): Call bfd_elf_allocate_object.
(bfd_elf32_arm_vfp11_erratum_scan): Use is_arm_elf macro to check
the bfd being processed.
(bfd_elf32_arm_vfp11_fix_veneer_locations): Likewise.
(bfd_elf32_arm_set_target_relocs): Likewise.
(bfd_elf32_arm_final_link_relocate): Likewise.
(bfd_elf32_arm_copy_private_bfd_data): Likewise.
(bfd_elf32_arm_merge_eabi_attributes): Likewise.
(bfd_elf32_arm_merge_private_bfd_data): Likewise.
(bfd_elf32_arm_check_relocs): Likewise.
(bfd_elf32_arm_gc_mark_extra_sections): Likewise.
(bfd_elf32_arm_size_dynamic_sections): Likewise.
(bfd_elf32_arm_process_before_allocation): Use elf_symtab_hdr.
(bfd_elf32_arm_init_maps): Likewise.
(bfd_elf32_arm_final_link_relocate): Likewise.
(bfd_elf32_arm_relocate_section): Likewise.
(bfd_elf32_arm_gc_sweep_hook): Likewise.
(bfd_elf32_arm_check_relocs): Likewise.
(bfd_elf32_arm_size_dynamic_sections): Likewise.
* elf32-i386.c (elf_i386_mkobject): Call bfd_elf_allocate_object.
(is_i386_elf): New macro. Checks a BFD to make sure that is an x86
ELF bfd.
(elf_i386_check_relocs): Use is_i386_elf macro to check the bfd
being processed.
(elf_i386_size_dynamic_sections): Likewise.
(elf_i386_relocate_section): Likewise.
(elf_i386_check_relocs): Use elf_symtab_hdr.
(elf_i386_gc_sweep_hook): Likewise.
(elf_i386_size_dynamic_sections): Likewise.
(elf_i386_relocate_section): Likewise.
* elf32-ppc.c (ppc_elf_mkobject): Call bfd_elf_allocate_object.
(elf_create_pointer_linker_section): Use is_ppc_elf_target to
verify that the bfd before accessing target specific fields.
(ppc_elf_check_relocs): Likewise.
(elf_finish_pointer_linker_section): Likewise.
(elf_create_pointer_linker_section): Use elf_symtab_hdr.
(ppc_elf_check_relocs): Likewise.
(ppc_elf_gc_sweep_hook): Likewise.
(ppc_elf_tls_optimize): Likewise.
(ppc_elf_size_dynamic_sections): Likewise.
(ppc_elf_relax_section): Likewise.
(ppc_elf_relocate_section): Likewise.
* elf32-s390.c (struct elf_s390_obj_tdata): Add a comment
reminding programmers to keep this structure in sync with the one
defined in elf64-s390.c.
(elf_s390_mkobject): Call bfd_elf_allocate_object.
(is_s390_elf): New macro. Checks a BFD to make sure that is an s390
ELF bfd.
(elf_s390_check_relocs): Use is_s390_elf macro to check the bfd
being processed.
(elf_s390_size_dynamic_sections): Likewise.
(elf_s390_relocate_section): Likewise.
(elf_s390_check_relocs): Use elf_symtab_hdr.
(elf_s390_gc_sweep_hook): Likewise.
(elf_s390_size_dynamic_sections): Likewise.
(elf_s390_relocate_section): Likewise.
* elf32-sh.c (sh_elf_mkobject): Call bfd_elf_allocate_object.
(is_sh_elf): New macro. Checks a BFD to make sure that is an SH
ELF bfd.
(sh_elf_size_dynamic_sections): Use is_sh_elf macro to check the
bfd being processed.
(sh_elf_relocate_section): Likewise.
(sh_elf_check_relocs): Likewise.
(sh_elf_copy_private_data): Likewise.
(sh_elf_relax_section): Use elf_symtab_hdr.
(sh_elf_size_dynamic_sections): Likewise.
(sh_elf_relocate_section): Likewise.
(sh_elf_get_relocated_section_contents): Likewise.
(sh_elf_gc_sweep_hook): Likewise.
(sh_elf_check_relocs): Likewise.
* elf64-alpha.c (elf64_alpha_mkobject): Call bfd_elf_allocate_object.
(is_alpha_elf): New macro. Checks a BFD to make sure that is an
Alpha ELF bfd.
(elf64_alpha_create_got_section): Use is_alpha_elf macro to check
the bfd being processed.
(elf64_alpha_create_dynamic_section): Likewise.
(elf64_alpha_check_relocs): Likewise.
(elf64_alpha_size_got_sections): Likewise.
(elf64_alpha_relax_section): Likewise.
(elf64_alpha_relocate_section): Likewise.
(elf64_alpha_final_link): Likewise.
(elf64_alpha_check_relocs): Use elf_symtab_hdr.
(elf64_alpha_relax_section): Likewise.
(elf64_alpha_relocate_section_r): Likewise.
(elf64_alpha_relocate_section): Likewise.
* elf64-ppc.c (ppc64_elf_mkobject): Call bfd_elf_allocate_object.
(ppc64_elf_check_relocs): Use is_ppc64_elf_target to check the bfd
being processed.
(opd_entry_value): Likewise.
(allocate_dynrelocs): Likewise.
(ppc64_elf_relocate_section): Likewise.
(ppc64_elf_check_relocs): Use elf_symtab_hdr.
(opd_entry_value): Likewise.
(ppc64_elf_gc_sweep_hook): Likewise.
(get_sym_h): Likewise.
(ppc64_elf_edit_opd): Likewise.
(ppc64_elf_tls_optimize): Likewise.
(ppc64_elf_edit_toc): Likewise.
(ppc64_elf_size_dynamic_sections): Likewise.
(toc_adjusting_stub_needed): Likewise.
(ppc64_elf_size_stubs): Likewise.
(ppc64_elf_relocate_section): Likewise.
* elf64-s390.c (struct elf_s390_obj_tdata): Add a comment
reminding programmers to keep this structure in sync with the one
defined in elf32-s390.c.
(elf_s390_mkobject): Call bfd_elf_allocate_object.
(is_s390_elf): New macro. Checks a BFD to make sure that is an s390
ELF bfd.
(elf_s390_check_relocs): Use is_s390_elf macro to check the bfd
being processed.
(elf_s390_size_dynamic_sections): Likewise.
(elf_s390_relocate_section): Likewise.
(elf_s390_check_relocs): Use elf_symtab_hdr.
(elf_s390_gc_sweep_hook): Likewise.
(elf_s390_size_dynamic_sections): Likewise.
(elf_s390_relocate_section): Likewise.
* elf64-x86_64.c (elf64_x86_64_mkobject): Call bfd_elf_allocate_object.
(is_x86_64_elf): New macro. Checks a BFD to make sure that is an
x86_64 ELF bfd.
(elf64_x86_64_check_relocs): Use is_x86_64_elf macro to check the bfd
being processed.
(elf64_x86_64_size_dynamic_sections): Likewise.
(elf64_x86_64_relocate_section): Likewise.
(elf64_x86_64_check_relocs): Use elf_symtab_hdr.
(elf64_x86_64_gc_sweep_hook): Likewise.
(elf64_x86_64_size_dynamic_sections): Likewise.
(elf64_x86_64_relocate_section): Likewise.
* elfxx-sparc.c (_bfd_sparc_elf_mkobject): Call bfd_elf_allocate_object.
(is_sparc_elf): New macro. Checks a BFD to make sure that is a Sparc
ELF bfd.
(_bfd_sparc_elf_check_relocs): Use is_sparc_elf macro to check the
bfd being processed.
(_bfd_sparc_elf_gc_sweep_hook): Likewise.
(_bfd_sparc_elf_size_dynamic_sections): Likewise.
(_bfd_sparc_elf_check_relocs): Use elf_symtab_hdr.
(_bfd_sparc_elf_gc_sweep_hook): Likewise.
(_bfd_sparc_elf_size_dynamic_sections): Likewise.
(_bfd_sparc_elf_relocate_section): Likewise.
Scan the segment map looking for the segment containing a
specified function.
* elf-bfd.h: Prototype the new function.
* elf-hppa.h (elf_hppa_osec_to_segment): Delete.
(elf_hppa_record_segment_addrs): Use new function.
* elf32-bfin.c (_bfdfdpic_osec_to_segment): Use new function.
* elf32-frv.c (_frvfdpic_osec_to_segment): Use new function.
* elf32-hppa.c (hppa_record_segment_addr): Use new function.
* elfxx-ia64.c (elfNN_ia64_relocate_section): Use new function.
PR binutils/5449
* elf.c (rewrite_elf_program_header): Don't adjust p_paddr if
p_paddr is set to 0.
(copy_private_bfd_data): Call rewrite_elf_program_header if
p_paddr is set to 0.
* elfcode.h (elf_swap_phdr_out): Set p_paddr to 0 if needed.
* elfxx-ia64.c (ELF_MAXPAGESIZE): Don't redefine it for HPUX.
the symbol's section is the undefined section.
* gas/testsuite/gas/elf/symtab.s: New test.
gas/testsuite/gas/elf/symtab.d: New expected output.
gas/testsuite/gas/elf/elf.exp: Run the new symbtab test.
* elf.c (rewrite_elf_program_header): Formatting. Add
first_matching_lma and first_suggested_lma booleans and use
instead of testing matching_lma and suggested_lma for zero.
* elf.c (get_program_header_size): Always add a PT_GNU_RELRO
segment for -z relro.
(_bfd_elf_map_sections_to_segments): Make a PT_GNU_RELRO
segment only when needed.
* elf.c (special_sections): Comment typo.
(elf_fake_sections): Force SHT_PROGBITS for sections that are
SHT_NOBITS if BFD section flags say they have contents.
* elf-bfd.h (struct elf_obj_tdata): New BUILD_ID_SIZE, BUILD_ID.
* elf.c (elfcore_read_notes): Split to ...
(elf_read_notes) ... here ...
(elf_parse_notes): ... and here. Check `bfd_get_format (abfd)' with
the former subfunctions called only for BFD_CORE.
Call ELFOBJ_GROK_GNU_NOTE for BFD_OBJECT files with the owner "GNU".
(_bfd_elf_make_section_from_shdr): Call ELF_PARSE_NOTES for SHT_NOTEs.
(bfd_section_from_phdr): Update the call for renamed ELFCORE_READ_NOTES.
(elfobj_grok_gnu_build_id, elfobj_grok_gnu_note): New functions.
Code advisory: Roland McGrath
2007-08-16 H.J. Lu <hongjiu.lu@intel.com>
* elf.c: Revert last change.
binutils/
2007-08-16 H.J. Lu <hongjiu.lu@intel.com>
* readelf.c: Revert last change.
include/elf/
2007-08-16 H.J. Lu <hongjiu.lu@intel.com>
* common.h: Revert last change.
2007-08-16 H.J. Lu <hongjiu.lu@intel.com>
* elf.c (get_segment_type): Change PT_GNU_STACK to PT_GNU_ATTR.
(bfd_section_from_phdr): Likewise.
(get_program_header_size): Likewise. Add a PT_GNU_ATTR segment
if there is an attribute section.
(_bfd_elf_map_sections_to_segments): Likewise.
(IS_SECTION_IN_INPUT_SEGMENT): Likewise.
binutils/
2007-08-16 H.J. Lu <hongjiu.lu@intel.com>
* readelf.c (get_segment_type): Change PT_GNU_STACK to
PT_GNU_ATTR.
include/elf/
2007-08-16 H.J. Lu <hongjiu.lu@intel.com>
* common.h (PT_GNU_STACK): Renamed to ...
(PT_GNU_ATTR): This.
(PT_GNU_STACK): New. Make an alias of PT_GNU_ATTR.
Don't remove empty PT_LOAD header if false.
(_bfd_elf_map_sections_to_segments): If user phdrs, pass false
to elf_modify_segment_map.
(assign_file_positions_for_load_sections): Pass false to
elf_modify_segment_map.
PR ld/4909
* elf.c (print_segment_map): New function.
(assign_file_positions_for_load_sections): Call print_segment_map
when a section can't be allocated in segment.
* elf-bfd.h (struct elf_obj_tdata): Add members
emit_note_gnu_build_id and note_gnu_build_id_sec.
* elf.c (_bfd_id_note_section_size): New global function.
(read_hex, _bfd_elf_write_build_id_section): New static functions.
(_bfd_elf_write_object_contents): Call _bfd_elf_write_build_id_section
if emit_note_gnu_build_id is set.
* Makefile.am (elf.lo): Update dependencies.
* elf.c (elf_fake_sections): Adjust test for SHT_NOBITS sections
created by objcopy --only-keep-debug.
(_bfd_elf_init_private_section_data): Only change elf_section_type
if it is SHT_NULL.
binutils/
* objcopy.c (copy_object): Revert 2007-05-11 change. Don't
avoid calling bfd_copy_private_bfd_data for ELF STRIP_NONDEBUG.
(setup_section): Don't modify flags, and don't avoid calling
bfd_copy_private_section_data for ELF STRIP_NONDEBUG.
* readelf.c (process_program_headers): Ignore .dynamic of type
SHT_NOBITS.
to SHT_NOBITS earlier. Base actions in rest of function on sh_type
and sh_flags instead of bfd section flags. Delete voff and code
keeping nobits segments aligned.
* elf.c (elf_fake_sections): Don't allow backend to change
SHT_NOBITS if called for strip/objcopy --only-keep-debug.
* elfxx-mips.c (_bfd_mips_elf_fake_sections): Remove similar
fix from here.
* elf.c (assign_file_positions_for_load_sections): Use p_memsz
rather than p_filesz to calculate the LMA of the end of a segment.
ld/testsuite/
* ld-elf/multibss1.d, ld-elf/multibss1.s: New test.
* internal.h (ELF_IS_SECTION_IN_SEGMENT): Check both file offset
and vma for appropriate sections.
bfd/
* elf.c (assign_file_positions_for_load_sections): Set sh_offset
here. Set sh_type to SHT_NOBITS if we won't be allocating
file space. Don't bump p_memsz for non-alloc sections. Adjust
section-in-segment check.
(assign_file_positions_for_non_load_sections): Don't set sh_offset
here for sections that have already been handled above.
* elf.c (IS_VALID_GROUP_SECTION_HEADER): New macro.
(setup_group): Use it. Report corrupt group section headers.
(bfd_section_from_shdr): Use new macro. Replace constant 4 with
GRP_ENTRY_SIZE. Cope with NULLs in the group section table.
(elf_fake_section): Replace constant 4 with GRP_ENTRY_SIZE.
PR binutils/3826
* elf-bfd.h (elf_backend_data): Add elf_osabi.
(_bfd_elf_set_osabi): New.
* elf.c (_bfd_elf_set_osabi): New.
* elf32-hppa.c (elf32_hppa_post_process_headers): Removed.
(elf_backend_post_process_headers): Defined with
_bfd_elf_set_osabi.
(ELF_OSABI): Properly defined for each target.
* elf32-i370.c (i370_elf_post_process_headers): Removed.
(ELF_OSABI): Defined.
(elf_backend_post_process_headers): Defined with
_bfd_elf_set_osabi.
* elf32-i386.c (ELF_OSABI): Defined to ELFOSABI_FREEBSD for
freebsd.
(elf_i386_post_process_headers): Set EI_OSABI with elf_osabi.
* elf32-msp430.c (elf32_msp430_post_process_headers): Removed.
(ELF_OSABI): Defined.
(elf_backend_post_process_headers): Defined with
_bfd_elf_set_osabi.
* elf64-alpha.c (ELF_OSABI): Defined to ELFOSABI_FREEBSD for
freebsd.
(elf64_alpha_fbsd_post_process_headers): Set EI_OSABI with
elf_osabi.
* elf64-hppa.c (elf64_hppa_post_process_headers): Set EI_OSABI
with elf_osabi.
(ELF_OSABI): Properly defined for each target.
(elf_backend_post_process_headers): Defined with
_bfd_elf_set_osabi for Linux.
* elf64-sparc.c (elf64_sparc_fbsd_post_process_headers): Removed.
(ELF_OSABI): Defined to ELFOSABI_FREEBSD for freebsd.
(elf_backend_post_process_headers): Defined with
_bfd_elf_set_osabi.
* elf64-x86-64.c (elf64_x86_64_fbsd_post_process_headers): Removed.
(ELF_OSABI): Defined to ELFOSABI_FREEBSD for freebsd.
(elf_backend_post_process_headers): Defined with
_bfd_elf_set_osabi.
* elfcode.h (elf_object_p): Match the ELFOSABI_NONE ELF target
with any ELF target of the compatible machine for which we do not
have a specific backend.
* elfxx-ia64.c (elfNN_hpux_post_process_headers): Set EI_OSABI
with elf_osabi.
* elfxx-target.h (ELF_OSABI): Default to ELFOSABI_NONE.
(elfNN_bed): Initialize elf_osabi with ELF_OSABI.
* elf.c (assign_file_positions_for_load_sections): Don't
adjust p_memsz for !SEC_LOAD section vma modulo page size.
Instead, use the same lma based adjustment for SEC_LOAD
sections.
* elf.c (struct elf_symbuf_symbol, struct elf_symbuf_head): New types.
(struct elf_symbol): Change first member into union.
(elf_sort_elf_symbol): Compare pointers to internal syms rather than
internal syms. Only compare st_shndx fields.
(elf_create_symbuf): New function.
(bfd_elf_match_symbols_in_sections): Use it. If symbufs are available
for bfds, use a binary search, otherwise don't qsort symbols
unnecessarily only to select which symbols are for the particular
shndx.
* elfxx-target.h (elf_backend_write_core_note): Define and use.
* elf.c (elfcore_write_prpsinfo): Call the above. Add support for
32-bit core note on 64-bit target.
(elfcore_write_prstatus): Likewise.
(elfcore_write_lwpstatus): Make note_name const.
(elfcore_write_prfpreg): Likewise.
(elfcore_write_pstatus): Add support for 32-bit core note on 64-bit
target.
* elf32-ppc.c (ppc_elf_write_core_note): New function.
(elf_backend_write_core_note): Define.
* elf64-ppc.c (ppc64_elf_write_core_note): New function.
(elf_backend_write_core_note): Define.
* elf.c (assign_file_positions_for_load_sections): We can
require fewer phdrs than expected.
ld/
* emultempl/elf-generic.em (gdl_map_segments): Only allow header
shrinkage for the first few iterations.
ld/testsuite/
* ld-elf/header.d: New.
* ld-elf/header.t: New.
* ld-elf/header.s: New.
* elf.c (assign_file_positions_for_load_sections): Adjust p_vaddr
by p_vaddr_offset. Copy alignment & use if it is valid.
(rewrite_elf_program_headers): Cope with leading padding in a
segment that does not contain file or program headers.
(copy_elf_program_header): Likewise.
include/elf/
* internal.h (struct elf_segment_map): Add p_vaddr_offset field.
PR binutils/3609
* elf.c (rewrite_elf_program_header): Preserve segment physical
address in the output segment if the first section in the
corresponding input segment is null.
* elf.c (IS_SECTION_IN_INPUT_SEGMENT): New.
(INCLUDE_SECTION_IN_SEGMENT): Use IS_SECTION_IN_INPUT_SEGMENT.
(rewrite_elf_program_header): Don't preserve segment physical
address in the output segment if the first section in the
corresponding input segment is removed.
* elf.c (_bfd_elf_init_private_section_data): Assert output
section ELF type instead of check if it is SHT_NULL. Copy
OS/PROC specific flags from input section to output section.
argument and emits the string followed by a comma and then the length of
the string.
(CONST_STRNEQ): New macro. Checks to see if a variable string has a constant
string as its initial characters.
(CONST_STRNCPY): New macro. Copies a constant string to the start of a
variable string.
* bfd-in2.h: Regenerate.
* <remainign files>: Make use of the new macros.
* elf.c (_bfd_elf_copy_private_header_data): Fix group members
that have had their SHT_GROUP section removed.
* objcopy.c (group_signature): New function, split out from..
(setup_section): ..here.
(is_strip_section): Return true for SHT_GROUP sections that are
going to lose their group signature symbol.
2006-08-16 H.J. Lu <hongjiu.lu@intel.com>
PR ld/3015
* elf.c (get_program_header_size): Add a PT_GNU_RELRO segment
only if there is a PT_DYNAMIC segment.
(_bfd_elf_map_sections_to_segments): Likewise.
(assign_file_positions_for_load_sections): Set PT_GNU_RELRO
segment alignment to 1.
ld/testsuite/
2006-08-16 H.J. Lu <hongjiu.lu@intel.com>
PR ld/3015
* ld-elf/binutils.exp: Add tests for "-z relro".
* elf.c (assign_file_positions_for_load_sections): Retrieve
maxpagesize from m->p_align if it is valid. Set p_vaddr,
p_paddr and p_align earlier. Revert 2006-05-19 change to p_align.
(copy_elf_program_header): Copy p_align. Set p_align_valid.
include/elf/
* internal.h (elf_segment_map): Add p_align and p_align_valid.
(ignore_section_sym): New function.
(elf_map_symbols): Use ignore_section_sym to discard some syms.
(_bfd_elf_symbol_from_bfd_symbol): Ensure section belongs to
bfd before using elf_section_syms.
(assign_file_positions_for_load_sections): Only add SEC_ALLOC
sections to p_memsz. Remove hack for PT_NOTE sections. Allow
section alignment to increase p_align for PT_LOAD.
(assign_file_positions_for_non_load_sections): Remove ARM BPABI
hack for PT_DYNAMIC. Instead, set p_filesz for all segments
other than PT_LOAD, and PT_NOTE in core.
PR binutils/2593
* elf.c (_bfd_elf_new_section_hook): Don't set section ELF type
and flags if its BFD flags have been set.
(_bfd_elf_init_private_section_data): Don't copy the output ELF
section type from input if it has been set to something
different.
PR ld/2322
* elf.c (get_segment_type): New function.
(_bfd_elf_print_private_bfd_data): Use it.
(print_segment_map): New function.
(assign_file_positions_for_segments): Call print_segment_map
when there are not enough room for program headers.
PR ld/2008
* elf.c (_bfd_elf_setup_sections): Return FALSE if
elf_linked_to_section will be set to NULL.
* format.c (bfd_check_format_matches): Don't check the default
target twice.
Andreas Schwab <schwab@suse.de>
PR binutils/1991
* elf.c (assign_section_numbers): Always use the output section
when setting up sh_link for SHF_LINK_ORDER.
symbol, relocation, group or versym sections.
* coffcode.h (coff_slurp_reloc_table): Don't crash if native_relocs
is NULL.
* peXXigen.c (pe_print_idata): Don't crash if dll_name or start_address
doesn't point into the section.
2005-05-23 Fred Fish <fnf@specifixinc.com>
* dwarf2.c (struct dwarf2_debug): Add inliner_chain member.
(struct funcinfo): Add caller_func, caller_file, caller_line.
tag, and nesting_level members.
(lookup_address_in_function_table): Change first passed parameter
from "struct funcinfo *" to "struct comp_unit *".
(lookup_address_in_function_table): Dereference unit to find function
table.
(lookup_address_in_function_table): Traverse the function list to
create a chain of inlined functions back to the first non inlined
function.
(scan_unit_for_functions): Remember tag and nesting level. Handle
DW_AT_call_file and DW_AT_call_line.
(comp_unit_find_nearest_line): Adjust lookup_address_in_function_table
call to pass unit pointer instead of function table pointer. For
inlined functions, save pointer to the inliner chain.
(_bfd_dwarf2_find_nearest_line): Initialize inliner_chain to NULL.
(_bfd_dwarf2_find_inliner_info): New function that returns information
from the inliner chain after a call to bfd_find_nearest_line.
* bfd.c (bfd_find_inliner_info): Define using BFD_SEND.
* targets.c (BFD_JUMP_TABLE_SYMBOLS): Add entry for
NAME##_find_inliner_info.
(bfd_target): Add _bfd_find_inliner_info.
* bfd-in2.h: Regenerate.
* libbfd-in.h (_bfd_nosymbols_find_inliner_info): Define as
macro that always returns bfd_false.
(_bfd_dwarf2_find_inliner_info): Declare.
* libbfd.h: Regenerate.
* elf32-arm.c (elf32_arm_find_inliner_info): New function
that calls _bfd_dwarf2_find_inliner_info.
(bfd_elf32_find_inliner_info): Define to elf32_arm_find_inliner_info.
* elfxx-mips.c (_bfd_mips_elf_find_inliner_info): New function
that calls _bfd_dwarf2_find_inliner_info.
* elfxx-mips.h (_bfd_mips_elf_find_inliner_info): Declare.
* elfn32-mips.c (bfd_elf32_find_inliner_info): Define to
_bfd_mips_elf_find_inliner_info.
* elf64-mips.c (bfd_elf64_find_inliner_info): Ditto.
* elf32-mips.c (bfd_elf32_find_inliner_info): Ditto.
* elf.c (_bfd_elf_find_inliner_info): New function that calls
_bfd_dwarf2_find_inliner_info.
* elf-bfd.h (_bfd_elf_find_inliner_info): Declare.
* elfxx-target.h (bfd_elfNN_find_inliner_info): Define to
_bfd_elf_find_inliner_info.
* coffgen.c (coff_find_inliner_info): New function that
calls _bfd_dwarf2_find_inliner_info.
* libcoff-in.h (coff_find_inliner_info): Declare.
* libcoff.h: Regenerate.
* coff-rs6000.c (rs6000coff_vec): Add coff_find_inliner_info.
(pmac_xcoff_vec) Ditto.
* coff64-rs6000.c (rs6000coff64_vec): Ditto.
(aix5coff64_vec): Ditto.
* aout-target.h (MY_find_inliner_info): Define as
_bfd_nosymbols_find_inliner_info.
* aout-tic30.c (MY_find_inliner_info): Ditto.
* binary.c (binary_find_inliner_info): Ditto.
* i386msdos.c (msdos_find_inliner_info): Ditto.
* ihex.c (ihex_find_inliner_info): Ditto.
* libaout.h (aout_32_find_inliner_info): Ditto.
* libecoff.h (_bfd_ecoff_find_inliner_info): Ditto.
* mach-o.c (bfd_mach_o_find_inliner_info): Ditto.
* mmo.c (mmo_find_inliner_info): Ditto.
* nlm-target.h (nlm_find_inliner_info): Ditto.
* pef.c (bfd_pef_find_inliner_info): Ditto.
* ppcboot.c (ppcboot_find_inliner_info): Ditto.
* srec.c (srec_find_inliner_info): Ditto.
* tekhex.c (tekhex_find_inliner_info): Ditto.
* versados.c (versados_find_inliner_info): Ditto.
* xsym.c (bfd_sym_find_inliner_info): Ditto.
* ieee.c (ieee_find_inliner_info): New function that always
returns FALSE.
* oasys.c (oasys_find_inliner_info): Ditto.
* vms.c (vms_find_inliner_info): Ditto.
elf_shstrtab.
* format.c (bfd_check_format_matches): Set output_has_begun
for both_direction.
* section.c (bfd_set_section_contents): Use bfd_write_p. Remove
special case for both_direction.
before returning.
(decode_line_info): Likewise.
(_bfd_dwarf2_cleanup_debug_info): New function: Frees memory allocated by
functions in this file.
* elf-bfd.h (_bfd_dwarf2_cleanup_debug_info): Prototype.
* elf.c (bfd_elf_close_and_cleanup): Call _bfd_dwarf2_cleanup_debug_info.