aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2006-07-24 18:18:19 +0000
committerNick Clifton <nickc@redhat.com>2006-07-24 18:18:19 +0000
commitff15b24025763b5e8c609fc1ec15af3091a52133 (patch)
treeab4e92cca847a85b912e856d936a9e0a6e6d0178 /bfd/elf.c
parent4e22f78d855c28e90d785d10a5449263df88148f (diff)
downloadgdb-ff15b24025763b5e8c609fc1ec15af3091a52133.zip
gdb-ff15b24025763b5e8c609fc1ec15af3091a52133.tar.gz
gdb-ff15b24025763b5e8c609fc1ec15af3091a52133.tar.bz2
* emulparams/elf_x86_64.sh (LIBPATH_SUFFIX, ELF_INTERPRETER_NAME): Set for *-*-solaris2*.
* elf.c (bfd_section_from_shdr): Reject unrecognised OS-specific sections only if the SHF_OS_NONCONFORMING flag is present.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index 85f9e0f..b900613 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -2201,11 +2201,20 @@ bfd_section_from_shdr (bfd *abfd, unsigned int shindex)
"`%s' [0x%8x]"),
abfd, name, hdr->sh_type);
else if (hdr->sh_type >= SHT_LOOS && hdr->sh_type <= SHT_HIOS)
- /* FIXME: We should handle this section. */
- (*_bfd_error_handler)
- (_("%B: don't know how to handle OS specific section "
- "`%s' [0x%8x]"),
- abfd, name, hdr->sh_type);
+ {
+ /* Unrecognised OS-specific sections. */
+ if ((hdr->sh_flags & SHF_OS_NONCONFORMING) != 0)
+ /* SHF_OS_NONCONFORMING indicates that special knowledge is
+ required to correctly process the section and the file should
+ be rejected with an error message. */
+ (*_bfd_error_handler)
+ (_("%B: don't know how to handle OS specific section "
+ "`%s' [0x%8x]"),
+ abfd, name, hdr->sh_type);
+ else
+ /* Otherwise it should be processed. */
+ return _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex);
+ }
else
/* FIXME: We should handle this section. */
(*_bfd_error_handler)