assembly jmp to a line that doesn't exist

怎甘沉沦 提交于 2020-01-25 08:01:05

问题


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.



来源:https://stackoverflow.com/questions/53302503/assembly-jmp-to-a-line-that-doesnt-exist

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!