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 --- io/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'io/Makefile') diff --git a/io/Makefile b/io/Makefile index 36ac06070a..69b2468d64 100644 --- a/io/Makefile +++ b/io/Makefile @@ -60,8 +60,7 @@ routines := \ # These routines will be omitted from the libc shared object. # Instead the static object files will be included in a special archive # linked against when the shared library will be used. -static-only-routines = stat fstat lstat stat64 fstat64 lstat64 \ - fstatat fstatat64 mknod mknodat +static-only-routines = mknod mknodat others := pwd test-srcs := ftwtest @@ -78,6 +77,7 @@ tests := test-utime test-stat test-stat2 test-lfs tst-getcwd \ # Likewise for statx, but we do not need static linking here. tests-internal += tst-statx +tests-static += tst-statx ifeq ($(run-built-tests),yes) tests-special += $(objpfx)ftwtest.out -- cgit 1.4.1