What is the jmpq command doing in this example

From the GAS-manual:

An Intel syntax indirect memory reference of the form

 section:[base + index*scale + disp]

is translated into the AT&T syntax

 section:disp(base, index, scale)

where base and index are the optional 32-bit base and index registers, disp is the optional displacement, and scale, taking the values 1, 2, 4, and 8, multiplies index to calculate the address of the operand.

(https://sourceware.org/binutils/docs/as/i386_002dMemory.html#i386_002dMemory)

So you can translate jmpq *0x402390(,%rax,8) into INTEL-syntax: jmp [RAX*8 + 0x402390]. It’s an “indirect” jump. At address [RAX*8 + 0x402390] is an address which will become the target of jmp. The next step is to determine, how many addresses can be found at 0x402390 + x and in which case they are used.

Leave a Comment