From 8ed005daf0ab03e142500324a34087ce179ae78e Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Thu, 16 Jul 2020 14:06:51 +0000 Subject: Remove stat wrapper functions, move them to exported symbols This patch removes the stat, stat64, lstat, lstat64, fstat, fstat64, fstatat, and fstatat64 static wrapper and add the symbol on the libc with the expected names. Both the prototypes of the internal symbol linked by the static wrappers and the inline redirectors are also removed from the installed sys/stat.h header file. The wrapper implementation license LGPL exception is also removed since it is no longer statically linked to binaries. Internally the _STAT_VER* definitions are moved to a arch-specific xstatver.h file. The internal defines that redirects internals {f}stat{at} to their {f}xstat{at} counterparts are removed for Linux (!NO_RTLD_HIDDEN). Hurd still requires them since {f}stat{at} pulls extra objects that makes the loader build fail otherwise (I haven't dig into why exactly). 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 --- sysdeps/unix/sysv/linux/s390/bits/stat.h | 12 ------------ sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist | 8 ++++++++ sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist | 8 ++++++++ sysdeps/unix/sysv/linux/s390/xstatver.h | 16 ++++++++++++++++ 4 files changed, 32 insertions(+), 12 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/s390/xstatver.h (limited to 'sysdeps/unix/sysv/linux/s390') diff --git a/sysdeps/unix/sysv/linux/s390/bits/stat.h b/sysdeps/unix/sysv/linux/s390/bits/stat.h index b383a98692..d12055529a 100644 --- a/sysdeps/unix/sysv/linux/s390/bits/stat.h +++ b/sysdeps/unix/sysv/linux/s390/bits/stat.h @@ -25,21 +25,9 @@ #include #if __WORDSIZE == 64 -/* Versions of the `struct stat' data structure. */ -# define _STAT_VER_KERNEL 0 -# define _STAT_VER_LINUX 1 -# define _STAT_VER _STAT_VER_LINUX - /* Versions of the `xmknod' interface. */ #define _MKNOD_VER_LINUX 0 #else -/* Versions of the `struct stat' data structure. */ -# define _STAT_VER_LINUX_OLD 1 -# define _STAT_VER_KERNEL 1 -# define _STAT_VER_SVR4 2 -# define _STAT_VER_LINUX 3 -# define _STAT_VER _STAT_VER_LINUX - /* Versions of the `xmknod' interface. */ # define _MKNOD_VER_LINUX 1 # define _MKNOD_VER_SVR4 2 diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist index 2940f787ae..a87fb8676a 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist +++ b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist @@ -2200,7 +2200,15 @@ GLIBC_2.32 sigabbrev_np F GLIBC_2.32 sigdescr_np F GLIBC_2.32 strerrordesc_np F GLIBC_2.32 strerrorname_np F +GLIBC_2.33 fstat F +GLIBC_2.33 fstat64 F +GLIBC_2.33 fstatat F +GLIBC_2.33 fstatat64 F +GLIBC_2.33 lstat F +GLIBC_2.33 lstat64 F GLIBC_2.33 mallinfo2 F +GLIBC_2.33 stat F +GLIBC_2.33 stat64 F GLIBC_2.4 _IO_fprintf F GLIBC_2.4 _IO_printf F GLIBC_2.4 _IO_sprintf F diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist index e9d2023b8c..25dfdcb21f 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist +++ b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist @@ -2101,7 +2101,15 @@ GLIBC_2.32 sigabbrev_np F GLIBC_2.32 sigdescr_np F GLIBC_2.32 strerrordesc_np F GLIBC_2.32 strerrorname_np F +GLIBC_2.33 fstat F +GLIBC_2.33 fstat64 F +GLIBC_2.33 fstatat F +GLIBC_2.33 fstatat64 F +GLIBC_2.33 lstat F +GLIBC_2.33 lstat64 F GLIBC_2.33 mallinfo2 F +GLIBC_2.33 stat F +GLIBC_2.33 stat64 F GLIBC_2.4 _IO_fprintf F GLIBC_2.4 _IO_printf F GLIBC_2.4 _IO_sprintf F diff --git a/sysdeps/unix/sysv/linux/s390/xstatver.h b/sysdeps/unix/sysv/linux/s390/xstatver.h new file mode 100644 index 0000000000..5ad0db2797 --- /dev/null +++ b/sysdeps/unix/sysv/linux/s390/xstatver.h @@ -0,0 +1,16 @@ +/* Versions of the 'struct stat' data structure used in compatibility xstat + functions. */ + +#include + +#if __WORDSIZE == 64 +# define _STAT_VER_KERNEL 0 +# define _STAT_VER_LINUX 1 +# define _STAT_VER _STAT_VER_LINUX +#else +# define _STAT_VER_LINUX_OLD 1 +# define _STAT_VER_KERNEL 1 +# define _STAT_VER_SVR4 2 +# define _STAT_VER_LINUX 3 +# define _STAT_VER _STAT_VER_LINUX +#endif -- cgit 1.4.1