]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix abiversion handling for MIPS.
authorJoseph Myers <joseph@codesourcery.com>
Tue, 6 Apr 2010 20:26:22 +0000 (20:26 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Tue, 6 Apr 2010 20:26:22 +0000 (20:26 +0000)
ChangeLog
ChangeLog.mips
libc-abis [new file with mode: 0644]
sysdeps/mips/dl-machine.h
sysdeps/unix/sysv/linux/mips/ldsodefs.h

index fcd20111fc95cd84b4732cf5f2ea454f334530f6..135c1f806efa25f9bd578ab7cb1c98042c5dd55d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-04-06  Joseph Myers  <joseph@codesourcery.com>
+
+       * libc-abis: New.
+
 2006-03-06  Roland McGrath  <roland@redhat.com>
 
        * Makefile (%.bz2, %.gz): New pattern rules.
index 58f0a34c681963c6337cdf5187729259318b9f37..4ac587173f1a52bb9dbed6ef76248412e7311935 100644 (file)
@@ -1,3 +1,10 @@
+2010-04-06  Joseph Myers  <joseph@codesourcery.com>
+
+       * sysdeps/mips/dl-machine.h (VALID_ELF_ABIVERSION,
+       VALID_ELF_OSABI, VALID_ELF_HEADER): Remove.
+       * sysdeps/unix/sysv/linux/mips/ldsodefs.h (VALID_ELF_ABIVERSION):
+       Define.
+
 2010-03-30  Joseph Myers  <joseph@codesourcery.com>
 
        * sysdeps/unix/sysv/linux/mips/bits/socket.h: Define
diff --git a/libc-abis b/libc-abis
new file mode 100644 (file)
index 0000000..a66a9ec
--- /dev/null
+++ b/libc-abis
@@ -0,0 +1,16 @@
+# See the copy of this file in libc for detailed explanations.  The
+# ports copy needs to include all libc definitions applicable to any
+# ports target; only one copy will be used.
+#
+# Feature Name Configuration
+# ------------ -------------
+#
+# MIPS PLTs.
+MIPS_PLT       mips*-*-linux*
+#
+# Unique symbol definitions for C++.
+# Architecture independent, all ELF targets (== all targets)
+UNIQUE
+#
+# Indirect PLT relocations.  Architecture dependent.
+IFUNC          powerpc-*-linux*
index ef088bff3bc1b949f88641a13f77d89f3af6dad6..123b4d6b78e7749e26b747cfec446ea2ef06659c 100644 (file)
@@ -75,15 +75,6 @@ do { if ((l)->l_info[DT_MIPS (RLD_MAP)]) \
        (ElfW(Addr)) (r); \
    } while (0)
 
-/* Allow ABIVERSION == 1, meaning PLTs and copy relocations are
-   required.  */
-#define VALID_ELF_ABIVERSION(ver)      (ver == 0 || ver == 2)
-#define VALID_ELF_OSABI(osabi)         (osabi == ELFOSABI_SYSV)
-#define VALID_ELF_HEADER(hdr,exp,size) \
-  memcmp (hdr,exp,size-2) == 0 \
-  && VALID_ELF_OSABI (hdr[EI_OSABI]) \
-  && VALID_ELF_ABIVERSION (hdr[EI_ABIVERSION])
-
 /* Return nonzero iff ELF header is compatible with the running host.  */
 static inline int __attribute_used__
 elf_machine_matches_host (const ElfW(Ehdr) *ehdr)
index 8d5efec8fb6076e5babc2acae30a6dabf993aead..2cb7db687a4a62a1e5888666a464843666776043 100644 (file)
@@ -30,4 +30,12 @@ extern void _dl_static_init (struct link_map *map);
 #undef DL_STATIC_INIT
 #define DL_STATIC_INIT(map) _dl_static_init (map)
 
+/* Allow ABIVERSION == 1, meaning PLTs and copy relocations are
+   required, with ELFOSABI_SYSV.  */
+#undef VALID_ELF_ABIVERSION
+#define VALID_ELF_ABIVERSION(osabi,ver)                        \
+  (ver == 0                                            \
+   || (osabi == ELFOSABI_SYSV && ver < 2)              \
+   || (osabi == ELFOSABI_LINUX && ver < LIBC_ABI_MAX))
+
 #endif /* ldsodefs.h */