也就是说,你是怎么知道的
特定系统调用需要多少个参数,
每个参数应该在哪个寄存器中,
最后是每个参数的含义?
是否有一个类似man
的命令可以告诉您这一点?
最佳答案
另请参阅:What are the calling conventions for UNIX & Linux system calls on x86-64
你要找的是kernel ABI,我找不到官网,但是有a blog有这样的信息。
在带有 int 80h 调用的 x64 中,它是:
value storage
syscall nr rax
arg 1 rdi
arg 2 rsi
arg 3 rdx
arg 4 r10
arg 5 r9
arg 6 r8
关于linux - 您在哪里检查 x86-64 机器上的系统调用原型(prototype)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8598975/