Question

jmp *0x804a260(,%eax,4)

Say, for example, eax holds 2. This will take 2 * 4 and add it to 0x804a260 giving you 0x804a268, and will jump to that location, correct?

Pas de solution correcte

Autres conseils

jmp *0x804a260(,%eax,4)

The ATT syntax above is the same as the following in intel syntax:

jmp dword ptr [eax*4 + 0x804a260]

It computes the memory location eax*4 + 0x804a260, reads a dword from that location treating it like an address and jumps to that address.

Using your example, let's say eax is 2. The computed address is 0x804a268. Furthermore, let's say at 0x804a268 it contains 0xbadf00d. That means after doing the jmp the program counter eip will try to execute the next instruction at memory location 0xbadf00d.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top