在调试其中一个汇编代码示例时,我发现了以下信息:
(gdb) x /10i 0x4005c4
0x4005c4: push %rbp
0x4005c5: mov %rsp,%rbp
0x4005c8: sub $0xa0,%rsp
0x4005cf: mov %fs:0x28,%rax
0x4005d8: mov %rax,-0x8(%rbp)
0x4005dc: xor %eax,%eax
0x4005de: movabs $0x6673646c6a6b3432,%rax
0x4005e8: mov %rax,-0x40(%rbp)
0x4005ec: movl $0x323339,-0x38(%rbp)
0x4005f3: movl $0x553059,-0x90(%rbp)
根据我的理解,不应使用movabs,似乎是故意引入的。我的理解正确吗?
用什么等效的MOV命令替换它?
最佳答案
作为该问题的直接副本:https://reverseengineering.stackexchange.com/questions/2627/what-is-the-meaning-of-movabs-in-gas-x86-att-syntax
http://www.ucw.cz/~hubicka/papers/amd64/node1.html
它完全符合您的期望-将立即数放入寄存器。