系统调用被添加到syscall_32.tbl或syscall_64.tbl但是如何解析它。在使用C语言编程时,我从未遇到过.tbl扩展名。
假设您询问位于arch/x86/entry/syscalls
的x86相关文件,它们只是传递给同一目录下的shell脚本syscallhdr.sh
和syscalltbl.sh
,它们在内核构建树上生成C-header
arch/x86/include/generated/uapi/asm/unistd_32.h
arch/x86/include/generated/uapi/asm/unistd_x32.h
arch/x86/include/generated/uapi/asm/unistd_64.h
和
arch/x86/include/generated/asm/syscalls_32.h
arch/x86/include/generated/asm/syscalls_x32.h
arch/x86/include/generated/asm/syscalls_64.h
分别。这些标题稍后由适当的C文件包含/使用。
PS:一般来说,你可以在Makefile上查找这些东西。