summaryrefslogtreecommitdiff
path: root/bfd/elf64-hppa.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl@lucon.org>2001-06-03 02:41:58 +0000
committerH.J. Lu <hjl@lucon.org>2001-06-03 02:41:58 +0000
commit702e3d431f5cbfcf35bdb1fc02dc2ced3421a750 (patch)
tree22353d0bb34659d541a632e082ce9bbc744a8654 /bfd/elf64-hppa.c
parent79d86f851f14d04e1bef2ceaa0ab33f256617a01 (diff)
downloadgdb-702e3d431f5cbfcf35bdb1fc02dc2ced3421a750.tar.gz
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/elf64-hppa.c')
-rw-r--r--bfd/elf64-hppa.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/bfd/elf64-hppa.c b/bfd/elf64-hppa.c
index 1b3a548b72c..4a87358c9df 100644
--- a/bfd/elf64-hppa.c
+++ b/bfd/elf64-hppa.c
@@ -358,8 +358,22 @@ static boolean
elf64_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), "elf64-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: