This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

elflint should accept ELFOSABI_LINUX


Hi,

On Fedora rawhide binaries containing ifunc symbols are now marked as
ELFOSABI_LINUX. This makes elflint accept such binaries:

2009-07-13  Mark Wielaard  <mjw@redhat.com>

    * elflint.c (check_elf_header): Accept ELFOSABI_LINUX.

Fixes the run-elflint-self.sh check when run on fedora rawhide.

Cheers,

Mark
>From 59b01bdee949c7b4c8f6ad8d093072a26c6efccc Mon Sep 17 00:00:00 2001
From: Mark Wielaard <mjw@redhat.com>
Date: Mon, 13 Jul 2009 14:40:15 +0200
Subject: [PATCH] elflint.c (check_elf_header): Accept ELFOSABI_LINUX.

---
 src/ChangeLog |    4 ++++
 src/elflint.c |    5 +++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/ChangeLog b/src/ChangeLog
index 51b3dd8..e9c8fca 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
+2009-07-13  Mark Wielaard  <mjw@redhat.com>
+
+	* elflint.c (check_elf_header): Accept ELFOSABI_LINUX.
+
 2009-07-08  Mark Wielaard  <mjw@redhat.com>
 
 	* readelf.c (attr_callback): Handle DW_Form constants for
diff --git a/src/elflint.c b/src/elflint.c
index c04ae57..891a2d1 100644
--- a/src/elflint.c
+++ b/src/elflint.c
@@ -377,8 +377,9 @@ check_elf_header (Ebl *ebl, GElf_Ehdr *ehdr, size_t size)
     ERROR (gettext ("unknown ELF header version number e_ident[%d] == %d\n"),
 	   EI_VERSION, ehdr->e_ident[EI_VERSION]);
 
-  /* We currently don't handle any OS ABIs.  */
-  if (ehdr->e_ident[EI_OSABI] != ELFOSABI_NONE)
+  /* We currently don't handle any OS ABIs except ELFOSABI_LINUX (ifunc).  */
+  if (ehdr->e_ident[EI_OSABI] != ELFOSABI_NONE
+      && ehdr->e_ident[EI_OSABI] != ELFOSABI_LINUX)
     ERROR (gettext ("unsupported OS ABI e_ident[%d] == '%s'\n"),
 	   EI_OSABI,
 	   ebl_osabi_name (ebl, ehdr->e_ident[EI_OSABI], buf, sizeof (buf)));
-- 
1.6.3.3


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]