Where is located syscall_table in kernel x86_64?

烈酒焚心 提交于 2021-01-27 15:16:47

问题


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.

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/.

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?


回答1:


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 being the directory where your kernel sources resides. A good idea would be reading this answer in SO and compare it with your resource.



来源:https://stackoverflow.com/questions/26681507/where-is-located-syscall-table-in-kernel-x86-64

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!