gpt4 book ai didi

linux - 您在哪里检查 x86-64 机器上的系统调用原型(prototype)?

转载 作者:IT王子 更新时间:2023-10-29 00:52:00 25 4
gpt4 key购买 nike

也就是说,你是怎么知道的

特定系统调用需要多少个参数,

每个参数应该在哪个寄存器中,

最后是每个参数的含义?

是否有一个类似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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com