Linux: Add tables with system call numbers

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

The new tables are currently only used for consistency checks with the installed kernel headers and the architecture-independent system call names table. They are based on Linux 5.4.

The goal is to use these architecture-specific tables to ensure that system call wrappers are available irrespective of the version of the installed kernel headers.

The tables are formatted in the form of C header files so that they can be used directly in an #include directive, without external preprocessing. (External preprocessing of a plain table file would introduce cross-subdirectory dependency issues.) However, the intent is that they can still be treated as tables and can be processed by simple tools.

The irregular system call names on 32-bit arm add a complication. The header is introduced to work around that, and the system calls are listed under regular names in the file.

A make target, update-syscalls-list, is added to patch the glibc sources with data from the current kernel headers.

4cf0d22305 Linux: Add tables with system call numbers
sysdeps/unix/sysv/linux/Makefile | 77 +++-
sysdeps/unix/sysv/linux/aarch64/arch-syscall.h | 291 +++++++++++++
sysdeps/unix/sysv/linux/alpha/arch-syscall.h | 469 +++++++++++++++++++++
sysdeps/unix/sysv/linux/arm/arch-syscall.h | 393 +++++++++++++++++
sysdeps/unix/sysv/linux/arm/fixup-asm-unistd.h | 24 ++
sysdeps/unix/sysv/linux/csky/arch-syscall.h | 310 ++++++++++++++
sysdeps/unix/sysv/linux/fixup-asm-unistd.h | 28 ++
sysdeps/unix/sysv/linux/glibcsyscalls.py | 170 ++++++++
sysdeps/unix/sysv/linux/hppa/arch-syscall.h | 372 ++++++++++++++++
sysdeps/unix/sysv/linux/i386/arch-syscall.h | 426 +++++++++++++++++++
sysdeps/unix/sysv/linux/ia64/arch-syscall.h | 341 +++++++++++++++
sysdeps/unix/sysv/linux/m68k/arch-syscall.h | 408 ++++++++++++++++++
sysdeps/unix/sysv/linux/microblaze/arch-syscall.h | 430 +++++++++++++++++++
sysdeps/unix/sysv/linux/mips/mips32/arch-syscall.h | 403 ++++++++++++++++++
.../unix/sysv/linux/mips/mips64/n32/arch-syscall.h | 363 ++++++++++++++++
.../unix/sysv/linux/mips/mips64/n64/arch-syscall.h | 339 +++++++++++++++
sysdeps/unix/sysv/linux/nios2/arch-syscall.h | 312 ++++++++++++++
.../sysv/linux/powerpc/powerpc32/arch-syscall.h | 418 ++++++++++++++++++
.../sysv/linux/powerpc/powerpc64/arch-syscall.h | 390 +++++++++++++++++
sysdeps/unix/sysv/linux/riscv/rv64/arch-syscall.h | 292 +++++++++++++
.../unix/sysv/linux/s390/s390-32/arch-syscall.h | 407 ++++++++++++++++++
.../unix/sysv/linux/s390/s390-64/arch-syscall.h | 355 ++++++++++++++++
sysdeps/unix/sysv/linux/sh/arch-syscall.h | 401 ++++++++++++++++++
.../unix/sysv/linux/sparc/sparc32/arch-syscall.h | 406 ++++++++++++++++++
.../unix/sysv/linux/sparc/sparc64/arch-syscall.h | 369 ++++++++++++++++
sysdeps/unix/sysv/linux/tst-glibcsyscalls.py | 88 ++++
sysdeps/unix/sysv/linux/tst-mman-consts.py | 12 +-
sysdeps/unix/sysv/linux/update-syscall-lists.py | 93 ++++
sysdeps/unix/sysv/linux/x86_64/64/arch-syscall.h | 348 +++++++++++++++
sysdeps/unix/sysv/linux/x86_64/x32/arch-syscall.h | 337 +++++++++++++++
30 files changed, 9050 insertions(+), 22 deletions(-)

Upstream: sourceware.org


  • Share