about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2010-03-16 23:34:59 -0700
committerUlrich Drepper <drepper@redhat.com>2010-03-16 23:34:59 -0700
commitd8c47894ca28d5c5cf396aa271c579d41f21c1d4 (patch)
treeff4bcc8ec078db8a07f812e8cd41ad74aa37db6a /sysdeps/unix/sysv/linux
parent8ed9a2b18bc6d9bb2be89562fe1e14f9c3cf3346 (diff)
downloadglibc-d8c47894ca28d5c5cf396aa271c579d41f21c1d4.tar.gz
glibc-d8c47894ca28d5c5cf396aa271c579d41f21c1d4.tar.xz
glibc-d8c47894ca28d5c5cf396aa271c579d41f21c1d4.zip
Extended ELF ABI version handling only for Linux.
If the OSABI is generic we should not allow the ABI version to be nonzero.
Move all the new functionality into Linux-specific files.
Diffstat (limited to 'sysdeps/unix/sysv/linux')
-rw-r--r--sysdeps/unix/sysv/linux/ldsodefs.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/sysdeps/unix/sysv/linux/ldsodefs.h b/sysdeps/unix/sysv/linux/ldsodefs.h
index 438c9e0c8d..5d5b1b4c06 100644
--- a/sysdeps/unix/sysv/linux/ldsodefs.h
+++ b/sysdeps/unix/sysv/linux/ldsodefs.h
@@ -1,5 +1,5 @@
 /* Run-time dynamic linker data structures for loaded ELF shared objects.
-   Copyright (C) 2001, 2002, 2003, 2006, 2009 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2002, 2003, 2006, 2009, 2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -19,6 +19,7 @@
 
 #ifndef	_LDSODEFS_H
 
+#include <libc-abis.h>
 #include <kernel-features.h>
 
 /* Get the real definitions.  */
@@ -58,7 +59,8 @@ extern void _dl_non_dynamic_init (void) internal_function;
 					 || memcmp (hdr, expected2, size) == 0)
 #define VALID_ELF_OSABI(osabi)		(osabi == ELFOSABI_SYSV \
 					 || osabi == ELFOSABI_LINUX)
-#define VALID_ELF_ABIVERSION(ver)	(ver < LIBC_ABI_MAX)
+#define VALID_ELF_ABIVERSION(osabi,ver) \
+  (ver == 0 || (osabi == ELFOSABI_LINUX && ver < LIBC_ABI_MAX))
 #define MORE_ELF_HEADER_DATA \
   static const unsigned char expected2[EI_PAD] =	\
   {							\
@@ -69,8 +71,7 @@ extern void _dl_non_dynamic_init (void) internal_function;
     [EI_CLASS] = ELFW(CLASS),				\
     [EI_DATA] = byteorder,				\
     [EI_VERSION] = EV_CURRENT,				\
-    [EI_OSABI] = ELFOSABI_LINUX,			\
-    [EI_ABIVERSION] = 0					\
+    [EI_OSABI] = ELFOSABI_LINUX				\
   }
 
 #endif /* ldsodefs.h */