diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2005-10-15 14:57:55 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2005-10-15 14:57:55 +0000 |
commit | ecca98713a19ac7aac31886b4b15b806e63d9a99 (patch) | |
tree | 8606d4daeccd04e698371f934ba62278dd283d25 /bfd/elf.c | |
parent | ff0929e51c0e9c26e0cf1e6b7229803ccd7cc769 (diff) | |
download | gdb-ecca98713a19ac7aac31886b4b15b806e63d9a99.zip gdb-ecca98713a19ac7aac31886b4b15b806e63d9a99.tar.gz gdb-ecca98713a19ac7aac31886b4b15b806e63d9a99.tar.bz2 |
bfd/
2005-10-15 H.J. Lu <hongjiu.lu@intel.com>
PR ld/1467
* elf-bfd.h (_bfd_elf_match_sections_by_type): New.
(_bfd_generic_match_sections_by_type): New. Defined.
* elf.c (_bfd_elf_match_sections_by_type): New.
* libbfd-in.h (_bfd_generic_match_sections_by_type): New.
* bfd-in2.h: Regenerated.
* libbfd.h: Likewise.
* libbfd.c (_bfd_generic_match_sections_by_type): New.
* targets.c (BFD_JUMP_TABLE_LINK): Initialize
_bfd_match_sections_by_type with
_bfd_generic_match_sections_by_type.
(bfd_target): Add _bfd_match_sections_by_type.
ld/
2005-10-15 H.J. Lu <hongjiu.lu@intel.com>
PR ld/1467
* emultempl/elf32.em: Include "elf-bfd.h".
(gld${EMULATION_NAME}_place_orphan): Check section type and
don't use section name for ELF input sections.
* ld.texinfo: Document orphan section processing.
* ldlang.c (lang_output_section_find_by_flags): Match section
types by calling bfd_match_sections_by_type.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r-- | bfd/elf.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -8502,3 +8502,18 @@ asection _bfd_elf_large_com_section = BFD_FAKE_SECTION (_bfd_elf_large_com_section, SEC_IS_COMMON, NULL, NULL, "LARGE_COMMON", 0); + +/* Return TRUE if 2 section types are compatible. */ + +bfd_boolean +_bfd_elf_match_sections_by_type (bfd *abfd, const asection *asec, + bfd *bbfd, const asection *bsec) +{ + if (asec == NULL + || bsec == NULL + || abfd->xvec->flavour != bfd_target_elf_flavour + || bbfd->xvec->flavour != bfd_target_elf_flavour) + return TRUE; + + return elf_section_type (asec) == elf_section_type (bsec); +} |