[英]How does the jmp instruction work in att assembly in this instance
I am stepping through a function in AT&T assembly right now and can't figure out how this specific jmp command works. 我现在正在逐步完成AT&T汇编中的一个功能,无法弄清楚此特定的jmp命令的工作方式。
jmp *0x804a140(,%eax,4)
How exactly is it using the %eax register and 4 with the jump instruction? 将%eax寄存器和4与跳转指令一起使用会如何? I have never seen jmp used this way before.
我以前从未见过jmp使用这种方式。
If you are confused by at&t syntax, switch your tool to intel mode. 如果您对at&t语法感到困惑,请将工具切换到Intel模式。
The effective address you see is not specific to jumps, you could have encountered it with any instruction that takes a memory operand. 您看到的有效地址不是特定于跳转的,您可能在使用内存操作数的任何指令中都遇到了该地址。
In intel syntax this would look like: jmp [0x804a140 + 4 * eax]
. 在intel语法中,它看起来像:
jmp [0x804a140 + 4 * eax]
。 It's an indirect jump that fetches the jump target from memory address 0x804a140 + 4 * eax
. 这是一个间接跳转,它从内存地址
0x804a140 + 4 * eax
获取跳转目标。 This is probably an item in a so-called jump table. 这可能是所谓的跳转表中的一项。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.