glibc/sysdeps/unix/sysv/linux/alpha
Adhemerval Zanella 4f40e6adc4 linux: Consolidate lxstat{64}
The LFS support is implemented on lxstat64.c, instead of lxstat.c for
64-bit architectures.  The xstat.c implements the non-LFS and it is
a no-op for !XSTAT_IS_XSTAT64.

The generic non-LFS implementation handles two cases:

  1. New kABIs which uses generic pre 64-bit time Linux ABI (csky and
     nios): it issues __NR_fstat64 with AT_SYMLINK_NOFOLLOW plus handles
     the possible overflow off st_ino, st_size, or st_blocks.  It only
     handles _STAT_VER_KERNEL.

  2. Old KABIs with old non-LFS support (arm, i386, hppa, m68k,
     microblaze, s390, sh, powerpc, and sparc32).  For _STAT_VER_KERNEL
     it issues __NR_lstat, otherwise it isseus __NR_lstat64 and convert
     to non-LFS stat struct and handle possible overflows on st_ino,
     st_size, or st_blocks.

Also non-LFS mips is an outlier and it has its own implementation since
_STAT_VER_LINUX requires a different conversion function (it uses the
kernel_stat as the syscall argument since its exported ABI is different
than the kernel one for both non-LFS and LFS implementation).

The generic LFS implementation handles multiple cases:

  1. XSTAT_IS_XSTAT64 being 1:

    1.1. Old 64-bit kABI (ia64, powerpc64*, s390x, sparc64, x86_64): it
         issues __NR_lstat for _STAT_VER_KERNEL or _STAT_VER_LINUX.

    1.2. Old 64-bit kABI with defines __NR_lstat64 instead of __NR_lstat
         (sparc64): it issues __NR_lstat for _STAT_VER_KERNEL or
         __NR_lstat64 and convert to struct stat64.

    1.3. New kABIs which uses generic 64-bit Linux ABI (aarch64 and
         riscv64): it issues __NR_newfstatat with AT_SYMLINK_NOFOLLOW
	 and only for _STAT_VER_KERNEL.

    1.4. New 32-bit kABIs with only 64-bit time_t support (arc and
         riscv32): it issues __NR_statx and covert to struct stat64.

  2. Old ABIs with XSTAT_IS_XSTAT64 being 0:

    2.1. New kABIs which uses generic pre 64-bit time Linux ABI (csky
	 and nios2): it issues __NR_fstatat64 for _STAT_VER_KERNEL.

    2.2. Old kABIs with old non-LFS support (arm, i386, hppa, m68k,
	 microblaze, s390, sh, mips32, powerpc32, and sparc32): it
	 issues __NR_lstat64.

Also, two special cases requires specific LFS implementations:

  1. alpha: it requires to handle _STAT_VER_KERNEL64 to issue
     __NR_lstat64 and use the kernel_stat with __NR_lstat otherwise.

  2. mips64: as for non-LFS implementation its ABIs differ from
     glibc exported one, which requires a specific conversion
     function to handle the kernel_stat.

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>
2020-09-11 14:35:15 -03:00
..
alpha Relocate alpha from ports to libc 2014-02-12 07:00:06 -08:00
alphaev6/fpu Relocate alpha from ports to libc 2014-02-12 07:00:06 -08:00
alphaev67/fpu Relocate alpha from ports to libc 2014-02-12 07:00:06 -08:00
bits signal: Add signum-{generic,arch}.h 2020-07-07 14:10:58 -03:00
fpu Relocate alpha from ports to libc 2014-02-12 07:00:06 -08:00
sys Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
____longjmp_chk.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
a.out.h Break lines before not after operators, batch 4. 2019-03-07 20:20:25 +00:00
adjtime.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
adjtimex.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
aio_cancel.c alpha: Move remaining files out of sysdeps/unix/sysv/linux/alpha/nptl/ 2014-05-23 11:20:48 -07:00
arch-syscall.h Update syscall lists for Linux 5.8. 2020-08-07 14:38:43 +00:00
brk.S linux: Consolidate INLINE_SYSCALL 2020-02-14 21:09:12 -03:00
c++-types.data alpha: Move remaining files out of sysdeps/unix/sysv/linux/alpha/nptl/ 2014-05-23 11:20:48 -07:00
clone.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
configure Relocate alpha from ports to libc 2014-02-12 07:00:06 -08:00
configure.ac Relocate alpha from ports to libc 2014-02-12 07:00:06 -08:00
dl-auxv.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
dl-brk.S Relocate alpha from ports to libc 2014-02-12 07:00:06 -08:00
dl-fxstatat64.c Remove __ASSUME_ATFCTS conditionals in sysdeps/unix/sysv/linux/. 2014-06-20 15:41:35 +00:00
dl-support.c Relocate alpha from ports to libc 2014-02-12 07:00:06 -08:00
dl-sysdep.c Relocate alpha from ports to libc 2014-02-12 07:00:06 -08:00
errlist-compat.c signal: Move sys_errlist to a compat symbol 2020-07-07 14:10:58 -03:00
fraiseexcpt.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
fstatfs64.c Relocate alpha from ports to libc 2014-02-12 07:00:06 -08:00
fstatvfs64.c Relocate alpha from ports to libc 2014-02-12 07:00:06 -08:00
fstatvfs.c Relocate alpha from ports to libc 2014-02-12 07:00:06 -08:00
fxstat.c linux: Remove INTERNAL_SYSCALL_DECL 2020-02-14 21:12:45 -03:00
fxstatat.c linux: Remove INTERNAL_SYSCALL_DECL 2020-02-14 21:12:45 -03:00
getclktck.c Relocate alpha from ports to libc 2014-02-12 07:00:06 -08:00
getcontext.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
getdents64.c Consolidate Linux getdents{64} implementation 2018-04-19 08:49:52 -03:00
getdents.c Consolidate Linux getdents{64} implementation 2018-04-19 08:49:52 -03:00
getegid.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
geteuid.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
gethostname.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
getppid.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
getrlimit64.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
getsysstats.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
gettimeofday.c alpha: Fix static gettimeofday symbol 2020-02-13 08:27:27 -03:00
glob-lstat-compat.c posix: Add compat glob symbol to not follow dangling symbols 2017-09-25 18:04:16 -07:00
globfree.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
ieee_get_fp_control.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
ieee_set_fp_control.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
Implies NPTL is no longer an add-on! 2014-07-07 09:29:06 -07:00
internal_statvfs64.c Relocate alpha from ports to libc 2014-02-12 07:00:06 -08:00
ioperm.c Linux: pciconfig_iobase syscall number is always available on alpha 2020-03-03 12:20:59 +01:00
ipc_priv.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
jmp_buf-macros.h Add jmp_buf-macros.h 2017-11-09 05:10:03 -08:00
kernel_sigaction.h alpha: Use Linux generic sigaction implementation 2018-12-18 19:52:21 -02:00
kernel_stat.h linux: Define STAT64_IS_KERNEL_STAT64 2020-09-11 14:35:11 -03:00
kernel_sysinfo.h Relocate alpha from ports to libc 2014-02-12 07:00:06 -08:00
kernel_termios.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
kernel-features.h Linux: Use system call tables during build 2020-01-02 10:18:23 +01:00
ld.abilist ld.so: Do not export free/calloc/malloc/realloc functions [BZ #25486] 2020-02-15 11:01:23 +01:00
libanl.abilist Ignore absolute symbols in ABI tests. 2018-05-04 15:46:32 +00:00
libBrokenLocale.abilist Ignore absolute symbols in ABI tests. 2018-05-04 15:46:32 +00:00
libc.abilist Linux: Remove rseq support 2020-07-16 17:55:35 +02:00
libcrypt.abilist Ignore absolute symbols in ABI tests. 2018-05-04 15:46:32 +00:00
libdl.abilist Ignore absolute symbols in ABI tests. 2018-05-04 15:46:32 +00:00
libm.abilist New exp10f version without SVID compat wrapper 2020-06-19 12:08:47 -03:00
libnsl.abilist Ignore absolute symbols in ABI tests. 2018-05-04 15:46:32 +00:00
libpthread.abilist nptl: Move pthread_gettattr_np into libc 2020-05-20 20:27:49 +02:00
libresolv.abilist Ignore absolute symbols in ABI tests. 2018-05-04 15:46:32 +00:00
librt.abilist Finish move of clock_* functions to libc. [BZ #24959] 2019-09-04 14:39:38 +02:00
libthread_db.abilist Ignore absolute symbols in ABI tests. 2018-05-04 15:46:32 +00:00
libutil.abilist Ignore absolute symbols in ABI tests. 2018-05-04 15:46:32 +00:00
localplt.data ld.so: Do not export free/calloc/malloc/realloc functions [BZ #25486] 2020-02-15 11:01:23 +01:00
lxstat64.c linux: Consolidate lxstat{64} 2020-09-11 14:35:15 -03:00
makecontext.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
Makefile nptl: Move pthread_sigmask implementation to libc 2020-04-21 14:01:58 -03:00
nldbl-abi.h Relocate alpha from ports to libc 2014-02-12 07:00:06 -08:00
oldglob.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
osf_adjtime.c sysv/alpha: Use generic __timeval32 and helpers 2020-04-02 09:21:06 -07:00
osf_getitimer.c sysv/alpha: Use generic __timeval32 and helpers 2020-04-02 09:21:06 -07:00
osf_getrusage.c sysv/alpha: Use generic __timeval32 and helpers 2020-04-02 09:21:06 -07:00
osf_gettimeofday.c y2038: Replace __clock_gettime with __clock_gettime64 2020-05-20 16:45:16 +02:00
osf_setitimer.c sysv/alpha: Use generic __timeval32 and helpers 2020-04-02 09:21:06 -07:00
osf_settimeofday.c sysv/alpha: Use generic __timeval32 and helpers 2020-04-02 09:21:06 -07:00
osf_utimes.c sysv/alpha: Use generic __timeval32 and helpers 2020-04-02 09:21:06 -07:00
osf_wait4.c sysv/alpha: Use generic __timeval32 and helpers 2020-04-02 09:21:06 -07:00
pipe.S Relocate alpha from ports to libc 2014-02-12 07:00:06 -08:00
register-dump.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
rt_sigaction.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
select.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
setcontext.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
setfpucw.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
setrlimit64.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
settimeofday.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
shlib-versions Remove configuration name patterns from shlib-versions. 2014-09-12 12:28:47 +00:00
sigcontextinfo.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
sizes.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
statfs64.c Relocate alpha from ports to libc 2014-02-12 07:00:06 -08:00
statvfs64.c Relocate alpha from ports to libc 2014-02-12 07:00:06 -08:00
statvfs.c Relocate alpha from ports to libc 2014-02-12 07:00:06 -08:00
swapcontext.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
syscall.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
syscalls.list alpha: Use generic gettimeofday implementation 2020-02-12 16:55:30 -03:00
sysconf.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
sysdep.h linux: Remove INTERNAL_SYSCALL_DECL 2020-02-14 21:12:45 -03:00
timer_create.c alpha: Move remaining files out of sysdeps/unix/sysv/linux/alpha/nptl/ 2014-05-23 11:20:48 -07:00
timer_delete.c alpha: Move remaining files out of sysdeps/unix/sysv/linux/alpha/nptl/ 2014-05-23 11:20:48 -07:00
timer_getoverr.c alpha: Move remaining files out of sysdeps/unix/sysv/linux/alpha/nptl/ 2014-05-23 11:20:48 -07:00
timer_gettime.c alpha: Move remaining files out of sysdeps/unix/sysv/linux/alpha/nptl/ 2014-05-23 11:20:48 -07:00
timer_settime.c alpha: Move remaining files out of sysdeps/unix/sysv/linux/alpha/nptl/ 2014-05-23 11:20:48 -07:00
ucontext-offsets.sym Fix mcontext_t sigcontext namespace (bug 21457). 2017-08-30 22:02:04 +00:00
Versions signal: Move sys_errlist to a compat symbol 2020-07-07 14:10:58 -03:00
vfork.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
wait4.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
wordexp.c Relocate alpha from ports to libc 2014-02-12 07:00:06 -08:00
xstat64.c linux: Consolidate xstat{64} 2020-09-11 14:35:13 -03:00
xstatconv.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
xstatconv.h Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00