This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH 0/4] generic/wordsize-32: don't duplicate stat syscalls if not needed
- From: Yury Norov <ynorov at caviumnetworks dot com>
- To: <libc-alpha at sourceware dot org>
- Cc: Yury Norov <ynorov at caviumnetworks dot com>, Arnd Bergmann <arnd at arndb dot de>
- Date: Wed, 14 Sep 2016 15:02:35 +0300
- Subject: [PATCH 0/4] generic/wordsize-32: don't duplicate stat syscalls if not needed
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Yuri dot Norov at caviumnetworks dot com;
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
Modern 32-bit architectures introduce stat and statfs structures layouts
identical to 64-bit versions. It means there's no difference between
corresponding syscalls and their 64-bit versions. But for generic/wordsize-32
glibc generates both 32- and 64-bit functions. Under sysdeps/unix/sysv/linux
it's controlled by XSTAT_IS_XSTAT64, namely if it's enabled 32-bit syscalls are
aliased to 64-bit ones.
This series does the same for generic/wordsize-32. Patches 1-3 are generic and
may be applied in common tree. Patch 4 is for referrence. It's part of aarch64/ilp32
series, and here to demonstrate how modern ports will work with this series.
The whole aarc64/ilp32 series with this patches is here:
https://github.com/norov/glibc/tree/glibc-stat2
https://github.com/norov/linux/tree/linux-stat
Yury Norov (4):
generic/wordsize-32: don't duplicate lxstat, xstat if XSTAT_IS_XSTAT64
is enabled
generic/wordsize-32: don't duplicate statfs syscalls if not needed
generic/wordsize-32: don't duplicate fxstat syscall family if not
needed
[AARCH64] ILP32: stat syscalls
sysdeps/unix/sysv/linux/aarch64/bits/stat.h | 166 +++++++++++++++++++++
.../unix/sysv/linux/aarch64/ilp32/kernel_stat.h | 2 +
sysdeps/unix/sysv/linux/fstatfs64.c | 9 ++
sysdeps/unix/sysv/linux/generic/bits/statfs.h | 16 +-
.../unix/sysv/linux/generic/wordsize-32/fstatfs.c | 2 +
.../unix/sysv/linux/generic/wordsize-32/fxstat.c | 2 +
.../unix/sysv/linux/generic/wordsize-32/fxstat64.c | 31 ++++
.../unix/sysv/linux/generic/wordsize-32/fxstatat.c | 2 +
.../sysv/linux/generic/wordsize-32/fxstatat64.c | 30 ++++
.../unix/sysv/linux/generic/wordsize-32/lxstat.c | 2 +
.../unix/sysv/linux/generic/wordsize-32/lxstat64.c | 7 +
.../unix/sysv/linux/generic/wordsize-32/statfs.c | 2 +
.../unix/sysv/linux/generic/wordsize-32/xstat.c | 2 +
.../unix/sysv/linux/generic/wordsize-32/xstat64.c | 7 +
sysdeps/unix/sysv/linux/statfs64.c | 11 +-
15 files changed, 289 insertions(+), 2 deletions(-)
create mode 100644 sysdeps/unix/sysv/linux/aarch64/bits/stat.h
create mode 100644 sysdeps/unix/sysv/linux/aarch64/ilp32/kernel_stat.h
create mode 100644 sysdeps/unix/sysv/linux/generic/wordsize-32/fxstat64.c
create mode 100644 sysdeps/unix/sysv/linux/generic/wordsize-32/fxstatat64.c
--
2.7.4