linux-2.6.31添加系统调用时需要修改的文件在哪里

发布于 2024-08-29 03:41:11 字数 198 浏览 1 评论 0原文

当我搜索添加系统调用时,我收到了很多文章,但它们似乎是针对旧版本的,这似乎也是一个微不足道的过程。

但问题是,文章建议的目录不适用于 2.6.31 版本。有谁知道 unistd.hsyscall_table.Ssyscalls.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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

猫性小仙女 2024-09-05 03:41:11

对于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.

淡紫姑娘! 2024-09-05 03:41:11

在大多数 Linux 系统上,可以在以下位置找到此类头文件:

/usr/src/kernels/$KERNEL-VERSION/include/linux/

你需要安装内核源代码才能进行任何内核开发,如果这是你想要做的,因为 unistd.h 也是标准 gcc 库的一部分。

On most Linux systems such header files can be found under:

/usr/src/kernels/$KERNEL-VERSION/include/linux/

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文