内核x86_64中的syscall_table位于哪里? [英] Where is located syscall_table in kernel x86_64?
问题描述
我正在尝试向Linux内核(x86_64)添加新的系统调用.基于本文,它解释了如何将系统调用添加到内核(x86).文章说,我需要在名为 syscall_table_32.S
的文件中定义我的系统调用名称,该文件位于 src/arch/x86/syscall_table_32.S
中.
I'm trying to add new System Call to Linux Kernel(x86_64). Based on this article which explained how to add System Call to Kernel(x86). The article says I need to define my System Call name in a file called syscall_table_32.S
which is located in src/arch/x86/syscall_table_32.S
.
但是在我的情况下,内核源代码中没有名为 syscall_table_32.S
或 syscall_table_64.S
的文件!在 src/arch/
中甚至没有用于x64系统调用表的目录.
But in my case, there is no file named syscall_table_32.S
or syscall_table_64.S
in the kernel source! There isn't even a directory for x64 System Call table in src/arch/
.
那么,在内核3.13.0-14-generic(x86_64)中定义的 syscall_table_64.S
在哪里?在哪里可以定义新的系统调用?
So, where is syscall_table_64.S
defined in kernel 3.13.0-14-generic (x86_64) ?
Where can I define a new system call?
推荐答案
3.3及更高版本与本指南使用的2.X不同.您应该在 arch/x86/
目录中找到 syscalls
目录.也是如此:
Version 3.3 onward are different from 2.X that the guide use. You should look for the syscalls
directory, in the arch/x86/
directory. So is:
cd /kernel-src/arch/x86/syscalls/syscall_64.tbl
kernel-src
是您的内核源代码所在的目录.一个好主意是在SO中阅读此答案,并将其与您的资源进行比较.
kernel-src
being the directory where your kernel sources resides. A good idea would be reading this answer in SO and compare it with your resource.
这篇关于内核x86_64中的syscall_table位于哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!