aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-hppa.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2001-06-03 02:41:58 +0000
committerH.J. Lu <hjl.tools@gmail.com>2001-06-03 02:41:58 +0000
commit24a5e75166638126ae96b246f1a1cb673e4cddad (patch)
treeb1056e23eee116610f0211b4d1e9fb8e236b533c /bfd/elf32-hppa.c
parent15103188924360c9c8c715c7db6a5725b82a4a01 (diff)
downloadgdb-24a5e75166638126ae96b246f1a1cb673e4cddad.zip
gdb-24a5e75166638126ae96b246f1a1cb673e4cddad.tar.gz
gdb-24a5e75166638126ae96b246f1a1cb673e4cddad.tar.bz2
2001-06-02 H.J. Lu <hjl@gnu.org>
* elf32-hppa.c (elf32_hppa_object_p): Check ELFOSABI_LINUX and ELFOSABI_HPUX. * elf64-hppa.c (elf64_hppa_object_p): Likewise.
Diffstat (limited to 'bfd/elf32-hppa.c')
-rw-r--r--bfd/elf32-hppa.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c
index 9f46a3d..c10df6b 100644
--- a/bfd/elf32-hppa.c
+++ b/bfd/elf32-hppa.c
@@ -1147,8 +1147,22 @@ static boolean
elf32_hppa_object_p (abfd)
bfd *abfd;
{
- unsigned int flags = elf_elfheader (abfd)->e_flags;
+ Elf_Internal_Ehdr * i_ehdrp;
+ unsigned int flags;
+
+ i_ehdrp = elf_elfheader (abfd);
+ if (strcmp (bfd_get_target (abfd), "elf32-hppa-linux") == 0)
+ {
+ if (i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_LINUX)
+ return false;
+ }
+ else
+ {
+ if (i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_HPUX)
+ return false;
+ }
+ flags = i_ehdrp->e_flags;
switch (flags & (EF_PARISC_ARCH | EF_PARISC_WIDE))
{
case EFA_PARISC_1_0: