For elf32-hppa-linux, objects can have OSABI=Linux or OSABI=SysV; check for
authorNick Clifton <nickc@redhat.com>
Thu, 21 Aug 2003 14:00:06 +0000 (14:00 +0000)
committerNick Clifton <nickc@redhat.com>
Thu, 21 Aug 2003 14:00:06 +0000 (14:00 +0000)
both.

bfd/ChangeLog
bfd/elf32-hppa.c
bfd/elf64-hppa.c

index f3c9ffb436beafda0208e6a844d177dd265d4d43..58b1aeec56b09eaedaf4cd6842a6180ff03d2cba 100644 (file)
@@ -1,3 +1,9 @@
+2003-08-21  Randolph Chung  <tausq@debian.org>
+
+       * 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  <nickc@redhat.com>
 
        * po/sv.po: Updated Swedish translation.
index 3c03a063528b6e63fc7ddf1c84126697f98cb10e..924f7af49f085df897bf6cc3c45d57fe962bf0f4 100644 (file)
@@ -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
index 9523862e35474b132c717d6a64f4dd1885b18d36..88403f5221cf52d0ef88e9b3226582665ede5f4c 100644 (file)
@@ -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