linux-2.6.31添加系统调用时需要修改的文件在哪里
当我搜索添加系统调用时,我收到了很多文章,但它们似乎是针对旧版本的,这似乎也是一个微不足道的过程。
但问题是,文章建议的目录不适用于 2.6.31 版本。有谁知道 unistd.h
、syscall_table.S
和 syscalls.h
或其相应文件在哪里?
提前致谢。
when i search for adding a system call, i get many articles but they seem to be for old versions, it also seems like a trivial process.
But the problem is, the directories that articles suggest does not hold for the version 2.6.31. does anyone know where unistd.h
, syscall_table.S
and syscalls.h
or their corresponding files are?
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
对于
unistd.h:$SOURCE_PATH/arch/x86/include/asm/unistd_32.h
对于
syscalls.h:$SOURCE_PATH/arch/x86/include/asm/syscalls.h
code>for
syscall_table_32.h : $SOURCE_PATH/arch/x86/kernel/syscall_table_32.h
显然我在 x86 机器上。
for
unistd.h : $SOURCE_PATH/arch/x86/include/asm/unistd_32.h
for
syscalls.h : $SOURCE_PATH/arch/x86/include/asm/syscalls.h
for
syscall_table_32.h : $SOURCE_PATH/arch/x86/kernel/syscall_table_32.h
obviously i'm on x86 machine.
在大多数 Linux 系统上,可以在以下位置找到此类头文件:
你需要安装内核源代码才能进行任何内核开发,如果这是你想要做的,因为
unistd.h
也是标准 gcc 库的一部分。On most Linux systems such header files can be found under:
You need to have your kernel sources installed to be able to do any kernel development though, if that's what're trying to do, since
unistd.h
is part of the standard gcc library as well.