Reputation: 783
I am trying to understand what this line is doing
0x0000000000400f7e <+59>: jmpq *0x401be0(,%rax,8)
Let us assume $rax = 2. So we have *0x401be0+(8*2).
*0x401be0 points to 4198277. So we have 4198277+16 = 4198293 or 0x400F95.
So I am expecting the code to jump to instruction at 0x400F95. But it jumps to 0x400fc9. What is actually happening?
Upvotes: 1
Views: 1350
Reputation: 215221
The code reads a 64-bit value (a code address) from the data at address 0x401be0+8*rax
and jumps to the address read.
Upvotes: 2