如何在构建Linux内核时读取/解析文件syscall_32.tbl以及由谁执行此操作?

问题描述 投票:0回答:1

系统调用被添加到syscall_32.tbl或syscall_64.tbl但是如何解析它。在使用C语言编程时,我从未遇到过.tbl扩展名。

linux linux-kernel embedded-linux system-calls
1个回答
0
投票

假设您询问位于arch/x86/entry/syscalls的x86相关文件,它们只是传递给同一目录下的shell脚本syscallhdr.shsyscalltbl.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上查找这些东西。

© www.soinside.com 2019 - 2024. All rights reserved.