xsplice: check against ELFOSABI_NONE instead of ELFOSABI_SYSV
authorRoger Pau Monné <roger.pau@citrix.com>
Wed, 4 May 2016 07:46:57 +0000 (09:46 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 4 May 2016 07:46:57 +0000 (09:46 +0200)
They are equivalent, but using ELFOSABI_NONE is more correct in this
context.

Suggested-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/common/xsplice_elf.c
xen/include/xen/elfstructs.h

index e403a0ef4529c13a01666f800817c3fedf84776c..1e1f167dba5f995aa1bcb1e331c2559465f4eecc 100644 (file)
@@ -397,7 +397,7 @@ static int xsplice_header_check(const struct xsplice_elf *elf)
     if ( hdr->e_version != EV_CURRENT ||
          hdr->e_ident[EI_VERSION] != EV_CURRENT ||
          hdr->e_ident[EI_ABIVERSION] != 0 ||
-         hdr->e_ident[EI_OSABI] != ELFOSABI_SYSV ||
+         hdr->e_ident[EI_OSABI] != ELFOSABI_NONE ||
          hdr->e_type != ET_REL ||
          hdr->e_phnum != 0 )
     {
index 615eb0696ecc956954f2c6d1694a6ebdeb31cf5a..68954b03ab459b5c81b465ffcabbae20e275ec46 100644 (file)
@@ -81,6 +81,7 @@ typedef uint64_t      Elf64_Xword;
 
 /* e_ident[] Operating System/ABI */
 #define ELFOSABI_SYSV          0       /* UNIX System V ABI */
+#define ELFOSABI_NONE          0       /* Same as ELFOSABI_SYSV */
 #define ELFOSABI_HPUX          1       /* HP-UX operating system */
 #define ELFOSABI_NETBSD                2       /* NetBSD */
 #define ELFOSABI_LINUX         3       /* GNU/Linux */