Skip to contentSkip to conversation

Why do we relax e_ident[EI_OSABI] in gdb?

parisc-linux Carlos O'Donell 3 participants 4 messages Dec 27, 2002 – Dec 28, 2002

lore
Share & tools
lore
#0 lore raw

parisc-linux,

Anyone have some ideas why we have this patch in gdb, and thus relax the EI_OSABI check?

bfd/elf64-hppa.c renamed from bfd/elf64-hppa.c~ +2 -1
@@ -372,7 +372,8 @@
   i_ehdrp = elf_elfheader (abfd);
   if (strcmp (bfd_get_target (abfd), "elf64-hppa-linux") == 0)
     {
-      if (i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_LINUX)
+      if (i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_LINUX &&
+          i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_NONE)
 	return false;
     }
   else
bfd/elf32-hppa.c renamed from bfd/elf32-hppa.c~ +2 -1
@@ -1038,7 +1038,8 @@
   i_ehdrp = elf_elfheader (abfd);
   if (strcmp (bfd_get_target (abfd), "elf32-hppa-linux") == 0)
     {
-      if (i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_LINUX)
+      if (i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_LINUX &&
+          i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_NONE)
 	return false;
     }
   else

===

c.

#3 lore raw
In reply to Carlos O'Donell

bfd/elf64-hppa.c line 376

Quoted 12 lines

Anyone have some ideas why we have this patch in gdb, and thus relax the EI_OSABI check?

bfd/elf64-hppa.c renamed from bfd/elf64-hppa.c~ +2 -1
@@ -372,7 +372,8 @@
   i_ehdrp = elf_elfheader (abfd);
   if (strcmp (bfd_get_target (abfd), "elf64-hppa-linux") == 0)
     {
-      if (i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_LINUX)
+      if (i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_LINUX &&
+          i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_NONE)

well... take a look at
http://bugs.debian.org/cgi-bin/bugreport.cgi?archive=no&bug=137316

but Grant's references explain it in more detail.

randolph