linux - Ubuntu 64位下添加系统调用,系统注册表需要修改的是syscall_64.tbl吗
PHP中文网
PHP中文网 2017-04-17 12:59:22
0
1
843

因为修改了syscall_32.tbl没有用

我的添加系统调用步骤:

1、在unistd.h中添加系统调用号
2、在系统调用表中添加相应表项(原来在syscall_32.tbl中添加)
3、在kernel/sys.c末尾添加系统调用函数的定义
4、重新编译内核,过程中出现一句waring(不知道有没有关系):意思大概是 sys_mysyscall没有被实现,然后重启编译后的新内核
5、写用户态程序测试,发现没有报错,但是也没有实现系统调用

所以想问一下,64位 Ubuntu kylin 14.10 (内核 3.18.2)系统调用是怎样的,我可能哪里有问题?

谢谢!

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(1)
刘奇

Why do you want to change unistd.h? Just write a package yourself and call syscall(2).

Then, since there is a problem with the program, who can guess where the problem is without taking out the program and seeing it? What does "system call not implemented" mean? ****Bold textBold text

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!