如何在ATT装配JMP指令工作,在这种情况下 [英] How does the jmp instruction work in att assembly in this instance

查看:207
本文介绍了如何在ATT装配JMP指令工作,在这种情况下的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过AT&放功能加强。现在T汇编并不能弄清楚如何这个特定的JMP命令作品

I am stepping through a function in AT&T assembly right now and can't figure out how this specific jmp command works.

    jmp    *0x804a140(,%eax,4)

究竟它是如何使用%EAX寄存器和4跳转指令?我从来没有见过JMP前,用这样的方式。

How exactly is it using the %eax register and 4 with the jump instruction? I have never seen jmp used this way before.

推荐答案

如果您是由AT&amp混淆; T语法,切换您的工具英特尔模式

If you are confused by at&t syntax, switch your tool to intel mode.

您看到的有效地址是不特定的跳跃,你可能会与需要内存操作数的任何指令遇到过。

The effective address you see is not specific to jumps, you could have encountered it with any instruction that takes a memory operand.

在Intel语法,这将是这样的: JMP [0x804a140 + 4 * EAX] 。这是一个间接跳转,从内存地址取跳转目标0x804a140 + 4 * EAX 。这可能是在一个所谓的跳跃表中的项

In intel syntax this would look like: jmp [0x804a140 + 4 * eax]. It's an indirect jump that fetches the jump target from memory address 0x804a140 + 4 * eax. This is probably an item in a so-called jump table.

这篇关于如何在ATT装配JMP指令工作,在这种情况下的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆