-->

assembly jmp to a line that doesn't exist

2019-08-20 03:16发布

问题:

For the line that says "jmpq *0x400850", there is actually no such line has 0x400850. In this case, since I cannot jump to the place that it is mentioned, do I just skip this command and go to the command that is in the line below?

So the answers told me to type "objdump" in terminal, so I typed

    objdump -d ./bin-lab-ref > output.txt

and I got no output in the terminal. What should I do in this situation?

回答1:

The instruction jmpq *0x400850(,%rax,8) jumps to the value stored at address 0x400850(,%rax,8), not to the address 0x400850(,%rax,8) itself. Likely, there is a jump table at this address and rax selects an entry from the jump table to jump to.

Inspect the memory around 0x400850 to find out what entries the jump table has and thus where the jump goes. You can get a dump of the executable's image using objdump -s.