diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2020-07-16 14:06:51 +0000 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2020-10-09 17:02:06 -0300 |
commit | 8ed005daf0ab03e142500324a34087ce179ae78e (patch) | |
tree | 2541dfc11ce5fe84696c84266a1b2eb22fe2f571 /sysdeps/unix/sysv/linux/generic | |
parent | 428985c436f442e91e27173bccaf28f547233586 (diff) | |
download | glibc-8ed005daf0ab03e142500324a34087ce179ae78e.tar.gz glibc-8ed005daf0ab03e142500324a34087ce179ae78e.tar.xz glibc-8ed005daf0ab03e142500324a34087ce179ae78e.zip |
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 <lukma@denx.de>
Diffstat (limited to 'sysdeps/unix/sysv/linux/generic')
-rw-r--r-- | sysdeps/unix/sysv/linux/generic/bits/stat.h | 11 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/generic/xstatver.h | 5 |
2 files changed, 5 insertions, 11 deletions
diff --git a/sysdeps/unix/sysv/linux/generic/bits/stat.h b/sysdeps/unix/sysv/linux/generic/bits/stat.h index 8d0980f0f5..35e14a47c6 100644 --- a/sysdeps/unix/sysv/linux/generic/bits/stat.h +++ b/sysdeps/unix/sysv/linux/generic/bits/stat.h @@ -26,17 +26,6 @@ #include <bits/endian.h> #include <bits/wordsize.h> -/* 64-bit libc uses the kernel's 'struct stat', accessed via the - stat() syscall; 32-bit libc uses the kernel's 'struct stat64' - and accesses it via the stat64() syscall. All the various - APIs offered by libc use the kernel shape for their struct stat - structure; the only difference is that 32-bit programs not - using __USE_FILE_OFFSET64 only see the low 32 bits of some - of the fields (specifically st_ino, st_size, and st_blocks). */ -#define _STAT_VER_KERNEL 0 -#define _STAT_VER_LINUX 0 -#define _STAT_VER _STAT_VER_KERNEL - /* Versions of the `xmknod' interface. */ #define _MKNOD_VER_LINUX 0 diff --git a/sysdeps/unix/sysv/linux/generic/xstatver.h b/sysdeps/unix/sysv/linux/generic/xstatver.h new file mode 100644 index 0000000000..8675db494c --- /dev/null +++ b/sysdeps/unix/sysv/linux/generic/xstatver.h @@ -0,0 +1,5 @@ +/* Versions of the 'struct stat' data structure used in compatibility xstat + functions. */ +#define _STAT_VER_KERNEL 0 +#define _STAT_VER_LINUX 0 +#define _STAT_VER _STAT_VER_KERNEL |