how to disassemble a system call?
How could I disassemble system call, so that i could get the assembly instructions involved in it
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
How could I disassemble system call, so that i could get the assembly instructions involved in it
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(3)
Well, you could do something like this. Say I wanted to get an assembly dump of "dup":
Write this:
Compile it:
Dump it:
Looking in "main" I see:
So looking at "dup@plt" I see:
So it's making a call into a "global offset table", which I would assume has all the syscall vectors. Like the other post said, see the kernel source (or standard library sources?) for details on that.
I don't think you want to do this. System call handling is complex (see http://www.ibm.com/developerworks/linux/library/l-system-calls/). Since you have tagged this question with "linux", you can just download the source from kernel.org (which will be far more understandable and informative than the assembly code).
For understanding linux system call, browse through the code.
Important files are:
Note: system call table can be addressed only from system.map only.