1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-08 17:42:12 +03:00

linux: Move {f}xstat{at} to compat symbols

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>
This commit is contained in:
Adhemerval Zanella
2020-07-18 10:21:25 -03:00
parent 6073bae64c
commit 20b39d5946
21 changed files with 181 additions and 31 deletions

View File

@@ -22,9 +22,11 @@
#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

View File

@@ -22,11 +22,18 @@
#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

View File

@@ -23,9 +23,11 @@
#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

View File

@@ -23,9 +23,11 @@
#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