Linux: Use system call tables during build

System Internals / glibc - Florian Weimer [redhat.com] - 2 January 2020 09:18 UTC

Use instead of to obtain the system call numbers. A few direct includes of need to be removed (if the system call numbers are already provided indirectly by ) or replaced with .

Current Linux headers for alpha define the required system call names, so most of the _NR_* hacks are no longer needed. For the 32-bit arm architecture, eliminate the INTERNAL_SYSCALL_ARM macro, now that we have regular system call names for cacheflush and set_tls. There are more such cleanup opportunities for other architectures, but these cleanups are required to avoid macro redefinition errors during the build.

For ia64, it is desirable to use directly to obtain the break number for system calls (which is not a system call number itself). This requires replacing __BREAK_SYSCALL with __IA64_BREAK_SYSCALL because the former is defined as an alias in , but not in .

a1bd5f8673 Linux: Use system call tables during build
NEWS | 3 ++-
sysdeps/ia64/start.S | 1 -
sysdeps/microblaze/backtrace_linux.c | 2 +-
sysdeps/unix/sysv/linux/alpha/kernel-features.h | 5 -----
sysdeps/unix/sysv/linux/alpha/sysdep.h | 25 ---------------------
sysdeps/unix/sysv/linux/arm/dl-machine.h | 2 +-
sysdeps/unix/sysv/linux/arm/sysdep.h | 4 ----
sysdeps/unix/sysv/linux/arm/tls.h | 2 +-
sysdeps/unix/sysv/linux/hppa/clone.S | 1 -
sysdeps/unix/sysv/linux/ia64/brk.S | 1 -
sysdeps/unix/sysv/linux/ia64/clone2.S | 4 ++--
sysdeps/unix/sysv/linux/ia64/syscall.S | 2 +-
sysdeps/unix/sysv/linux/ia64/sysdep.S | 2 +-
sysdeps/unix/sysv/linux/ia64/sysdep.h | 5 +++--
sysdeps/unix/sysv/linux/include/sys/syscall.h | 29 +++++++++++++++++++++++++
sysdeps/unix/sysv/linux/mips/vfork.S | 1 -
sysdeps/unix/sysv/linux/nios2/sysdep.h | 1 -
sysdeps/unix/sysv/linux/riscv/flush-icache.c | 1 +
sysdeps/unix/sysv/linux/sparc/sparc32/clone.S | 1 -
sysdeps/unix/sysv/linux/sparc/sparc64/clone.S | 1 -
sysdeps/unix/sysv/linux/sys/syscall.h | 11 ++++------
21 files changed, 46 insertions(+), 58 deletions(-)

Upstream: sourceware.org


  • Share