From 2c288d158e75d5bcf5e42ad0007a465c7da984c3 Mon Sep 17 00:00:00 2001 From: nickc Date: Thu, 21 Aug 2003 14:00:05 +0000 Subject: [PATCH] For elf32-hppa-linux, objects can have OSABI=Linux or OSABI=SysV; check for both. --- bfd/ChangeLog | 6 ++++++ bfd/elf32-hppa.c | 5 ++++- bfd/elf64-hppa.c | 5 ++++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index f3c9ffb436..58b1aeec56 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2003-08-21 Randolph Chung + + * elf32-hppa.c (elf32_hppa_object_p): For elf32-hppa-linux, objects + can have OSABI=Linux or OSABI=SysV. Check for both. + * elf64-hppa.c (elf64_hppa_object_p): Likewise. + 2003-08-21 Nick Clifton * po/sv.po: Updated Swedish translation. diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c index 3c03a06352..924f7af49f 100644 --- a/bfd/elf32-hppa.c +++ b/bfd/elf32-hppa.c @@ -924,7 +924,10 @@ elf32_hppa_object_p (bfd *abfd) i_ehdrp = elf_elfheader (abfd); if (strcmp (bfd_get_target (abfd), "elf32-hppa-linux") == 0) { - if (i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_LINUX) + /* GCC on hppa-linux produces binaries with OSABI=Linux, + but the kernel produces corefiles with OSABI=SysV. */ + if (i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_LINUX && + i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_NONE) /* aka SYSV */ return FALSE; } else diff --git a/bfd/elf64-hppa.c b/bfd/elf64-hppa.c index 9523862e35..88403f5221 100644 --- a/bfd/elf64-hppa.c +++ b/bfd/elf64-hppa.c @@ -380,7 +380,10 @@ elf64_hppa_object_p (abfd) i_ehdrp = elf_elfheader (abfd); if (strcmp (bfd_get_target (abfd), "elf64-hppa-linux") == 0) { - if (i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_LINUX) + /* GCC on hppa-linux produces binaries with OSABI=Linux, + but the kernel produces corefiles with OSABI=SysV. */ + if (i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_LINUX && + i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_NONE) /* aka SYSV */ return FALSE; } else -- 2.11.0