aboutsummaryrefslogtreecommitdiff
path: root/bfd
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
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')
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elf32-hppa.c16
-rw-r--r--bfd/elf64-hppa.c16
3 files changed, 36 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index e9a53c9..9e52c50 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,11 @@
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.
+
+2001-06-02 H.J. Lu <hjl@gnu.org>
+
* aout-cris.c (MACHTYPE_OK): New. Defined.
2001-06-02 Hans-Peter Nilsson <hp@axis.com>
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:
diff --git a/bfd/elf64-hppa.c b/bfd/elf64-hppa.c
index 1b3a548..4a87358 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: