如何在堆栈上放置64位长地址? 我有这个目前:在堆栈上放置64位地址
//setup the stack
push rbp;
mov rbp, rsp;
sub rsp, 80; //80 bytes for stack, 9 args of 64 bits + 64 bits for the function address
mov qword [rbp - 72], 0xfefefefe12345678; // <--- won't work
call [rbp - 72];
//Restore stack
mov rsp, rbp;
pop rbp;
ret 80; // <---- Is this correct?
而且,是ret
正确的吗?
谢谢先生,第二个选项就是我正在寻找:) – alexandernst
顺便说一句,那么我的电话会如何工作?将'''调用[rbp - 72]'''读取4或8个字节? – alexandernst
“调用”指令将始终读取64位模式下的8字节地址。 'call immed'只使用32位立即数,因此只能调用当前位置+/- 2GB内的目标。 –