Linux: Add tables with system call numbers
commit4cf0d223052dabb9caed29e1e91e1d61933e14fb
authorFlorian Weimer <fweimer@redhat.com>
Thu, 2 Jan 2020 09:18:10 +0000 (2 10:18 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Thu, 2 Jan 2020 09:18:10 +0000 (2 10:18 +0100)
tree67679008431b6bc21bb6f7a5efd5f2071f9a76f1
parent5f72f9800b250410cad3abfeeb09469ef12b2438
Linux: Add tables with system call numbers

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 <fixup-asm-unistd.h> header is introduced to work around that,
and the system calls are listed under regular names in the
<arch-syscall.h> file.

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

Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
30 files changed:
sysdeps/unix/sysv/linux/Makefile
sysdeps/unix/sysv/linux/aarch64/arch-syscall.h [new file with mode: 0644]
sysdeps/unix/sysv/linux/alpha/arch-syscall.h [new file with mode: 0644]
sysdeps/unix/sysv/linux/arm/arch-syscall.h [new file with mode: 0644]
sysdeps/unix/sysv/linux/arm/fixup-asm-unistd.h [new file with mode: 0644]
sysdeps/unix/sysv/linux/csky/arch-syscall.h [new file with mode: 0644]
sysdeps/unix/sysv/linux/fixup-asm-unistd.h [new file with mode: 0644]
sysdeps/unix/sysv/linux/glibcsyscalls.py [new file with mode: 0644]
sysdeps/unix/sysv/linux/hppa/arch-syscall.h [new file with mode: 0644]
sysdeps/unix/sysv/linux/i386/arch-syscall.h [new file with mode: 0644]
sysdeps/unix/sysv/linux/ia64/arch-syscall.h [new file with mode: 0644]
sysdeps/unix/sysv/linux/m68k/arch-syscall.h [new file with mode: 0644]
sysdeps/unix/sysv/linux/microblaze/arch-syscall.h [new file with mode: 0644]
sysdeps/unix/sysv/linux/mips/mips32/arch-syscall.h [new file with mode: 0644]
sysdeps/unix/sysv/linux/mips/mips64/n32/arch-syscall.h [new file with mode: 0644]
sysdeps/unix/sysv/linux/mips/mips64/n64/arch-syscall.h [new file with mode: 0644]
sysdeps/unix/sysv/linux/nios2/arch-syscall.h [new file with mode: 0644]
sysdeps/unix/sysv/linux/powerpc/powerpc32/arch-syscall.h [new file with mode: 0644]
sysdeps/unix/sysv/linux/powerpc/powerpc64/arch-syscall.h [new file with mode: 0644]
sysdeps/unix/sysv/linux/riscv/rv64/arch-syscall.h [new file with mode: 0644]
sysdeps/unix/sysv/linux/s390/s390-32/arch-syscall.h [new file with mode: 0644]
sysdeps/unix/sysv/linux/s390/s390-64/arch-syscall.h [new file with mode: 0644]
sysdeps/unix/sysv/linux/sh/arch-syscall.h [new file with mode: 0644]
sysdeps/unix/sysv/linux/sparc/sparc32/arch-syscall.h [new file with mode: 0644]
sysdeps/unix/sysv/linux/sparc/sparc64/arch-syscall.h [new file with mode: 0644]
sysdeps/unix/sysv/linux/tst-glibcsyscalls.py [new file with mode: 0644]
sysdeps/unix/sysv/linux/tst-mman-consts.py
sysdeps/unix/sysv/linux/update-syscall-lists.py [new file with mode: 0644]
sysdeps/unix/sysv/linux/x86_64/64/arch-syscall.h [new file with mode: 0644]
sysdeps/unix/sysv/linux/x86_64/x32/arch-syscall.h [new file with mode: 0644]