]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
linux: Move {f}xstat{at} to compat symbols
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Sat, 18 Jul 2020 13:21:25 +0000 (10:21 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Fri, 9 Oct 2020 20:02:07 +0000 (17:02 -0300)
They are no interna uses anymore.  The riscv32 ABI was added on 2.33,
so it is safe to remove the old __{f,l}stat{at} symbols and just
provide the newer {f,l}stat{at} ones.

Checked with a build for all affected ABIs. I also checked on x86_64,
i686, powerpc, powerpc64le, sparcv9, sparc64, s390, and s390x.

Reviewed-by: Lukasz Majewski <lukma@denx.de>
21 files changed:
sysdeps/unix/sysv/linux/alpha/fxstat64.c
sysdeps/unix/sysv/linux/alpha/fxstatat64.c
sysdeps/unix/sysv/linux/alpha/lxstat64.c
sysdeps/unix/sysv/linux/alpha/xstat64.c
sysdeps/unix/sysv/linux/fxstat.c
sysdeps/unix/sysv/linux/fxstat64.c
sysdeps/unix/sysv/linux/fxstatat.c
sysdeps/unix/sysv/linux/fxstatat64.c
sysdeps/unix/sysv/linux/lxstat.c
sysdeps/unix/sysv/linux/lxstat64.c
sysdeps/unix/sysv/linux/mips/fxstat.c
sysdeps/unix/sysv/linux/mips/lxstat.c
sysdeps/unix/sysv/linux/mips/mips64/fxstat64.c
sysdeps/unix/sysv/linux/mips/mips64/fxstatat.c
sysdeps/unix/sysv/linux/mips/mips64/fxstatat64.c
sysdeps/unix/sysv/linux/mips/mips64/lxstat64.c
sysdeps/unix/sysv/linux/mips/mips64/xstat64.c
sysdeps/unix/sysv/linux/mips/xstat.c
sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist
sysdeps/unix/sysv/linux/xstat.c
sysdeps/unix/sysv/linux/xstat64.c

index 9d6b8eca32a404612070f32de0bbc0fa24e494b8..bcfb55050c2d22221a8225864f5b45b539808855 100644 (file)
 #include <kernel_stat.h>
 #include <sysdep.h>
 #include <xstatconv.h>
+#include <shlib-compat.h>
 
 /* Get information about the file NAME in BUF.  */
 int
+attribute_compat_text_section
 __fxstat64 (int vers, int fd, struct stat64 *buf)
 {
   switch (vers)
@@ -42,4 +44,12 @@ __fxstat64 (int vers, int fd, struct stat64 *buf)
       }
     }
 }
-strong_alias (__fxstat64, __fxstat);
+
+#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_33)
+strong_alias (__fxstat64, __fxstat_compat)
+compat_symbol (libc, __fxstat_compat, __fxstat, GLIBC_2_0);
+#endif
+
+#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_33)
+compat_symbol (libc, __fxstat64, __fxstat64, GLIBC_2_1);
+#endif
index 997fb87ac66019a57a8fca50cff93f3830fcb0ab..fa3074eecae8f230e2a09851cda31538a572d01c 100644 (file)
 #include <kernel_stat.h>
 #include <sysdep.h>
 #include <xstatconv.h>
+#include <shlib-compat.h>
 
+#if SHLIB_COMPAT(libc, GLIBC_2_4, GLIBC_2_33)
 /* Get information about the file NAME in BUF.  */
 int
+attribute_compat_text_section
 __fxstatat64 (int vers, int fd, const char *file, struct stat64 *st, int flag)
 {
   return INLINE_SYSCALL_CALL (fstatat64, fd, file, st, flag);
 }
-strong_alias (__fxstatat64, __fxstatat);
+strong_alias (__fxstatat64, __fxstatat_compat)
+compat_symbol (libc, __fxstatat_compat, __fxstatat, GLIBC_2_4);
+
+compat_symbol (libc, __fxstatat64, __fxstatat64, GLIBC_2_4);
+#endif
index 38f132f15ecab852bc59ed08bb267245164aa51f..7424b2f621a286bfd6d42176252b34b5eb4010b0 100644 (file)
 #include <kernel_stat.h>
 #include <sysdep.h>
 #include <xstatconv.h>
+#include <shlib-compat.h>
 
 /* Get information about the file NAME in BUF.  */
 int
+attribute_compat_text_section
 __lxstat64 (int vers, const char *name, struct stat64 *buf)
 {
   switch (vers)
@@ -43,4 +45,12 @@ __lxstat64 (int vers, const char *name, struct stat64 *buf)
       }
     }
 }
-weak_alias (__lxstat64, __lxstat);
+
+#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_33)
+strong_alias (__lxstat64, __lxstat_compat)
+compat_symbol (libc, __lxstat_compat, __lxstat, GLIBC_2_0);
+#endif
+
+#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_33)
+compat_symbol (libc, __lxstat64, __lxstat64, GLIBC_2_1);
+#endif
index c856c95dc5bdbf85377f1f7d9699e78d1a2fccaa..59f7ddae7f1a50d6bb76c4451b75831441d18fba 100644 (file)
 #include <kernel_stat.h>
 #include <sysdep.h>
 #include <xstatconv.h>
+#include <shlib-compat.h>
 
 /* Get information about the file NAME in BUF.  */
 int
+attribute_compat_text_section
 __xstat64 (int vers, const char *name, struct stat64 *buf)
 {
   switch (vers)
@@ -43,4 +45,12 @@ __xstat64 (int vers, const char *name, struct stat64 *buf)
       }
     }
 }
-weak_alias (__xstat64, __xstat);
+
+#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_33)
+strong_alias (__xstat64, __xstat_compat)
+compat_symbol (libc, __xstat_compat, __xstat, GLIBC_2_0);
+#endif
+
+#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_33)
+compat_symbol (libc, __xstat64, __xstat64, GLIBC_2_1);
+#endif
index f78497ea929bffccd23f24db7d961f3273a67ab2..649bb952520a9d2e0af36661112fa8687d7a5098 100644 (file)
 #if !XSTAT_IS_XSTAT64
 # include <xstatconv.h>
 # include <xstatover.h>
+# include <shlib-compat.h>
+
+# if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_33)
 
 /* Get information about the file FD in BUF.  */
 int
+attribute_compat_text_section
 __fxstat (int vers, int fd, struct stat *buf)
 {
   switch (vers)
@@ -57,4 +61,8 @@ __fxstat (int vers, int fd, struct stat *buf)
       }
     }
 }
+
+compat_symbol (libc, __fxstat, __fxstat, GLIBC_2_0);
+# endif /* SHLIB_COMPAT  */
+
 #endif /* XSTAT_IS_XSTAT64  */
index dd7b7528737ddb26a7b4f3153f9ec9c1cbf7b8f5..4bd926bf01bd1e9b96204e5556c3d2b685bbb6a9 100644 (file)
 #include <sysdep.h>
 #include <xstatconv.h>
 #include <statx_cp.h>
+#include <shlib-compat.h>
+
+#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_33)
 
 /* Get information about the file FD in BUF.  */
 
 int
+attribute_compat_text_section
 ___fxstat64 (int vers, int fd, struct stat64 *buf)
 {
 #if XSTAT_IS_XSTAT64
@@ -63,16 +67,18 @@ ___fxstat64 (int vers, int fd, struct stat64 *buf)
 #endif /* XSTAT_IS_XSTAT64  */
 }
 
-#include <shlib-compat.h>
-
 #if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_2)
-versioned_symbol (libc, ___fxstat64, __fxstat64, GLIBC_2_2);
+compat_symbol (libc, ___fxstat64, __fxstat64, GLIBC_2_2);
 strong_alias (___fxstat64, __old__fxstat64)
 compat_symbol (libc, __old__fxstat64, __fxstat64, GLIBC_2_1);
 #else
 strong_alias (___fxstat64, __fxstat64)
+compat_symbol (libc, ___fxstat64, __fxstat64, GLIBC_2_2);
 #endif
 
 #if XSTAT_IS_XSTAT64
-strong_alias (__fxstat64, __fxstat);
+strong_alias (___fxstat64, __fxstat_compat)
+compat_symbol (libc, __fxstat_compat, __fxstat, GLIBC_2_2);
 #endif
+
+#endif /* SHLIB_COMPAT  */
index 1a60fc10e37668870f1d36b965ce00eeb4be40b1..2083e18eac0a9d1971fcdb7ffd358519ba856566 100644 (file)
 #if !XSTAT_IS_XSTAT64
 # include <xstatconv.h>
 # include <xstatover.h>
+# include <shlib-compat.h>
+
+# if SHLIB_COMPAT(libc, GLIBC_2_4, GLIBC_2_33)
 
 /* Get information about the file FD in BUF.  */
 int
+attribute_compat_text_section
 __fxstatat (int vers, int fd, const char *file, struct stat *st, int flag)
 {
 #if STAT_IS_KERNEL_STAT
@@ -46,4 +50,8 @@ __fxstatat (int vers, int fd, const char *file, struct stat *st, int flag)
   return r ?: __xstat32_conv (vers, &st64, st);
 #endif
 }
+
+compat_symbol (libc, __fxstatat, __fxstatat, GLIBC_2_4);
+# endif /* SHLIB_COMPAT  */
+
 #endif /* XSTAT_IS_XSTAT64  */
index 7fe034809c84cc87340d961900ff944a54895e0a..8a505451d9870f26e89c8de4f6bc404525a827f5 100644 (file)
 #include <sysdep.h>
 #include <xstatconv.h>
 #include <statx_cp.h>
+#include <shlib-compat.h>
+
+#if SHLIB_COMPAT(libc, GLIBC_2_4, GLIBC_2_33)
 
 /* Get information about the file FD in BUF.  */
 
 int
+attribute_compat_text_section
 __fxstatat64 (int vers, int fd, const char *file, struct stat64 *st, int flag)
 {
 #if XSTAT_IS_XSTAT64
@@ -61,6 +65,12 @@ __fxstatat64 (int vers, int fd, const char *file, struct stat64 *st, int flag)
 #endif
   return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);
 }
+
+compat_symbol (libc, __fxstatat64, __fxstatat64, GLIBC_2_4);
+
 #if XSTAT_IS_XSTAT64
-strong_alias (__fxstatat64, __fxstatat);
+strong_alias (__fxstatat64, __fxstatat_compat)
+compat_symbol (libc, __fxstatat_compat, __fxstatat, GLIBC_2_4);
 #endif
+
+#endif /* SHLIB_COMPAT(libc, GLIBC_2_4, GLIBC_2_33)  */
index 9e7e02d298db48abead68c42f5993dfbe19e0371..913618eab95d96048d8b8a838fd2085cffcbf2c2 100644 (file)
 #include <fcntl.h>
 #include <kernel_stat.h>
 #include <sysdep.h>
+#include <shlib-compat.h>
 
 #if !XSTAT_IS_XSTAT64
 # include <xstatconv.h>
 # include <xstatover.h>
 
+# if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_33)
+
 /* Get information about the file NAME in BUF.  */
 int
+attribute_compat_text_section
 __lxstat (int vers, const char *name, struct stat *buf)
 {
   switch (vers)
@@ -58,4 +62,8 @@ __lxstat (int vers, const char *name, struct stat *buf)
       }
     }
 }
+
+compat_symbol (libc, __lxstat, __lxstat, GLIBC_2_0);
+# endif /* SHLIB_COMPAT  */
+
 #endif /* XSTAT_IS_XSTAT64  */
index 2b06133bf33658396e66b3758927e214c2e98c6c..277b54b305b0babd985fb73876b0f41f9691588b 100644 (file)
 #include <sysdep.h>
 #include <xstatconv.h>
 #include <statx_cp.h>
+#include <shlib-compat.h>
+
+#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_33)
 
 /* Get information about the file NAME in BUF.  */
 
 int
+attribute_compat_text_section
 ___lxstat64 (int vers, const char *name, struct stat64 *buf)
 {
 #if XSTAT_IS_XSTAT64
@@ -80,17 +84,18 @@ ___lxstat64 (int vers, const char *name, struct stat64 *buf)
   return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);
 }
 
-#if XSTAT_IS_XSTAT64
-weak_alias (___lxstat64, __lxstat);
-weak_alias (___lxstat64, __GI___lxstat);
-#endif
-
-#include <shlib-compat.h>
-
 #if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_2)
-versioned_symbol (libc, ___lxstat64, __lxstat64, GLIBC_2_2);
+compat_symbol (libc, ___lxstat64, __lxstat64, GLIBC_2_2);
 strong_alias (___lxstat64, __old__lxstat64)
 compat_symbol (libc, __old__lxstat64, __lxstat64, GLIBC_2_1);
 #else
 strong_alias (___lxstat64, __lxstat64);
+compat_symbol (libc, ___lxstat64, __lxstat64, GLIBC_2_2);
 #endif
+
+#if XSTAT_IS_XSTAT64
+strong_alias (___lxstat64,__lxstat_compat)
+compat_symbol (libc, __lxstat_compat, __lxstat, GLIBC_2_2);
+#endif
+
+#endif /* SHLIB_COMPAT  */
index 4585c2362bb382a92ee5874cfed634139ea13598..cb9f656628927800f3070a675fbd4f7a6945f900 100644 (file)
 #include <kernel_stat.h>
 #include <sysdep.h>
 #include <xstatconv.h>
+#include <shlib-compat.h>
+
+#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_33)
 
 /* Get information about the file NAME in BUF.  */
 int
+attribute_compat_text_section
 __fxstat (int vers, int fd, struct stat *buf)
 {
   switch (vers)
@@ -39,3 +43,7 @@ __fxstat (int vers, int fd, struct stat *buf)
       }
     }
 }
+
+compat_symbol (libc, __fxstat, __fxstat, GLIBC_2_0);
+
+#endif
index 62a3b15b32ee9f25c6ababf813fea7b57225d937..ebd05cca509ac789d19069b698e482198cf95de3 100644 (file)
 #include <kernel_stat.h>
 #include <sysdep.h>
 #include <xstatconv.h>
+#include <shlib-compat.h>
+
+#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_33)
 
 /* Get information about the file NAME in BUF.  */
 int
+attribute_compat_text_section
 __lxstat (int vers, const char *name, struct stat *buf)
 {
   switch (vers)
@@ -39,3 +43,7 @@ __lxstat (int vers, const char *name, struct stat *buf)
       }
     }
 }
+
+compat_symbol (libc, __lxstat, __lxstat, GLIBC_2_0);
+
+#endif
index e6c1cacd4b7c7769ee3ef43c8c34802d8ca68701..855c650814cc59893ac54eebaa13f36af85d2b1a 100644 (file)
 #include <kernel_stat.h>
 #include <sysdep.h>
 #include <xstatconv.h>
+#include <shlib-compat.h>
+
+#if SHLIB_COMPAT(libc, GLIBC_2_2, GLIBC_2_33)
 
 /* Get information about the file FD in BUF.  */
 
 int
+attribute_compat_text_section
 __fxstat64 (int vers, int fd, struct stat64 *buf)
 {
   struct kernel_stat kbuf;
@@ -31,3 +35,7 @@ __fxstat64 (int vers, int fd, struct stat64 *buf)
   return r ?: __xstat64_conv (vers, &kbuf, buf);
 
 }
+
+compat_symbol (libc, __fxstat64, __fxstat64, GLIBC_2_2);
+
+#endif
index e384dbab8b6eed636292acfa985eec9f5d8a0ef0..1c1fbb02c29433679e3fcf9b8bc3dd836de2964e 100644 (file)
 #include <kernel_stat.h>
 #include <sysdep.h>
 #include <xstatconv.h>
+#include <shlib-compat.h>
+
+#if SHLIB_COMPAT(libc, GLIBC_2_4, GLIBC_2_33)
 
 /* Get information about the file FD in BUF.  */
 int
+attribute_compat_text_section
 __fxstatat (int vers, int fd, const char *file, struct stat *st, int flag)
 {
   struct kernel_stat kst;
   int r = INLINE_SYSCALL_CALL (newfstatat, fd, file, &kst, flag);
   return r ?: __xstat_conv (vers, &kst, st);
 }
+
+compat_symbol (libc, __fxstatat, __fxstatat, GLIBC_2_4);
+
+#endif
index cfd172d3018c37407be02d0fe1d2a42f417010dd..f40a2c5aa8af98b50a6e4cdca202ddc65e27bf51 100644 (file)
 #include <kernel_stat.h>
 #include <sysdep.h>
 #include <xstatconv.h>
+#include <shlib-compat.h>
+
+#if SHLIB_COMPAT(libc, GLIBC_2_4, GLIBC_2_33)
 
 /* Get information about the file NAME in BUF.  */
 
 int
+attribute_compat_text_section
 __fxstatat64 (int vers, int fd, const char *file, struct stat64 *st, int flag)
 {
   if (vers == _STAT_VER_LINUX)
@@ -33,3 +37,7 @@ __fxstatat64 (int vers, int fd, const char *file, struct stat64 *st, int flag)
     }
   return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);
 }
+
+compat_symbol (libc, __fxstatat64, __fxstatat64, GLIBC_2_4);
+
+#endif
index 0f3934f8c8b37aa34a11f5dfb678cd1de736894c..752c5284a713d2c6b41d54a1b7ebf4a8213184d2 100644 (file)
 #include <kernel_stat.h>
 #include <sysdep.h>
 #include <xstatconv.h>
+#include <shlib-compat.h>
+
+#if SHLIB_COMPAT(libc, GLIBC_2_2, GLIBC_2_33)
 
 /* Get information about the file NAME in BUF.  */
 int
+attribute_compat_text_section
 __lxstat64 (int vers, const char *name, struct stat64 *buf)
 {
   struct kernel_stat kbuf;
   int r = INLINE_SYSCALL_CALL (lstat, name, &kbuf);
   return r ?: __xstat64_conv (vers, &kbuf, buf);
 }
+
+compat_symbol (libc, __lxstat64, __lxstat64, GLIBC_2_2);
+
+#endif
index 64d29522763a80f0a7e8267fd52f8c998fb18535..a620ba2f1f2f2ab37310f11de9a4b22d5b900269 100644 (file)
 #include <kernel_stat.h>
 #include <sysdep.h>
 #include <xstatconv.h>
+#include <shlib-compat.h>
 
-/* Get information about the file NAME in BUF.  */
+#if SHLIB_COMPAT(libc, GLIBC_2_2, GLIBC_2_33)
 
+/* Get information about the file NAME in BUF.  */
 int
+attribute_compat_text_section
 __xstat64 (int vers, const char *name, struct stat64 *buf)
 {
   struct kernel_stat kbuf;
   int r = INLINE_SYSCALL_CALL (stat, name, &kbuf);
   return r ?: __xstat64_conv (vers, &kbuf, buf);
 }
+
+compat_symbol (libc, __xstat64, __xstat64, GLIBC_2_2);
+
+#endif
index d6ff5ccbe06412ea55fd915679df2e8340b48846..0748a3422dfa4c4a59a297df1e5a215fee659992 100644 (file)
 #include <kernel_stat.h>
 #include <sysdep.h>
 #include <xstatconv.h>
+#include <shlib-compat.h>
+
+#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_33)
 
 /* Get information about the file NAME in BUF.  */
 int
+attribute_compat_text_section
 __xstat (int vers, const char *name, struct stat *buf)
 {
   switch (vers)
@@ -39,3 +43,7 @@ __xstat (int vers, const char *name, struct stat *buf)
       }
     }
 }
+
+compat_symbol (libc, __xstat, __xstat, GLIBC_2_0);
+
+#endif
index 22169f2c74247eb5db2d5502ccd4508ed8c631e7..91f8afed4b9f52eafc42adf6814d0af90baaef05 100644 (file)
@@ -201,10 +201,6 @@ GLIBC_2.33 __fsetlocking F
 GLIBC_2.33 __fwprintf_chk F
 GLIBC_2.33 __fwritable F
 GLIBC_2.33 __fwriting F
-GLIBC_2.33 __fxstat F
-GLIBC_2.33 __fxstat64 F
-GLIBC_2.33 __fxstatat F
-GLIBC_2.33 __fxstatat64 F
 GLIBC_2.33 __getauxval F
 GLIBC_2.33 __getcwd_chk F
 GLIBC_2.33 __getdelim F
@@ -287,8 +283,6 @@ GLIBC_2.33 __libc_start_main F
 GLIBC_2.33 __libc_valloc F
 GLIBC_2.33 __longjmp_chk F
 GLIBC_2.33 __lseek F
-GLIBC_2.33 __lxstat F
-GLIBC_2.33 __lxstat64 F
 GLIBC_2.33 __malloc_hook D 0x4
 GLIBC_2.33 __mbrlen F
 GLIBC_2.33 __mbrtowc F
@@ -489,8 +483,6 @@ GLIBC_2.33 __xmknodat F
 GLIBC_2.33 __xpg_basename F
 GLIBC_2.33 __xpg_sigpause F
 GLIBC_2.33 __xpg_strerror_r F
-GLIBC_2.33 __xstat F
-GLIBC_2.33 __xstat64 F
 GLIBC_2.33 _dl_mcount_wrapper F
 GLIBC_2.33 _dl_mcount_wrapper_check F
 GLIBC_2.33 _environ D 0x4
index a971e8cf6a7da3f14789c7357120443032dc8017..3eb2d8c51b4c91af6dcec4be0c7eaefee10b7583 100644 (file)
 #include <fcntl.h>
 #include <kernel_stat.h>
 #include <sysdep.h>
+#include <shlib-compat.h>
 
 #if !XSTAT_IS_XSTAT64
 # include <xstatconv.h>
 # include <xstatover.h>
 
+# if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_33)
+
 /* Get information about the file NAME in BUF.  */
 int
+attribute_compat_text_section
 __xstat (int vers, const char *name, struct stat *buf)
 {
   switch (vers)
@@ -57,4 +61,8 @@ __xstat (int vers, const char *name, struct stat *buf)
       }
     }
 }
+
+compat_symbol (libc, __xstat, __xstat, GLIBC_2_0);
+# endif /* SHLIB_COMPAT  */
+
 #endif /* XSTAT_IS_XSTAT64  */
index 9d368d5841b181e0db17320db30c4f16ebdd6498..dd4f808c7ab732aa98e266b0bfd4d1a6f165c42c 100644 (file)
 #include <sysdep.h>
 #include <xstatconv.h>
 #include <statx_cp.h>
+#include <shlib-compat.h>
+
+#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_33)
 
 /* Get information about the file NAME in BUF.  */
 
 int
+attribute_compat_text_section
 ___xstat64 (int vers, const char *name, struct stat64 *buf)
 {
 #if XSTAT_IS_XSTAT64
@@ -78,16 +82,17 @@ ___xstat64 (int vers, const char *name, struct stat64 *buf)
 }
 
 #if XSTAT_IS_XSTAT64
-weak_alias (___xstat64, __xstat);
-weak_alias (___xstat64, __GI___xstat);
+strong_alias (___xstat64, __xstat_compat)
+compat_symbol (libc, __xstat_compat, __xstat, GLIBC_2_2);
 #endif
 
-#include <shlib-compat.h>
-
 #if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_2)
-versioned_symbol (libc, ___xstat64, __xstat64, GLIBC_2_2);
+compat_symbol (libc, ___xstat64, __xstat64, GLIBC_2_2);
 strong_alias (___xstat64, __old__xstat64)
 compat_symbol (libc, __old__xstat64, __xstat64, GLIBC_2_1);
 #else
 strong_alias (___xstat64, __xstat64)
+compat_symbol (libc, ___xstat64, __xstat64, GLIBC_2_2);
 #endif
+
+#endif /* SHLIB_COMPAT  */