组装jmp到不存在的行 [英] assembly jmp to a line that doesn't exist
问题描述
对于显示"jmpq * 0x400850"的行,实际上没有这样的行具有0x400850.在这种情况下,由于我无法跳到提到的地方,我是否只跳过此命令并转到下一行中的命令?
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?
所以答案告诉我在终端中键入"objdump",所以我键入了
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?
推荐答案
指令jmpq *0x400850(,%rax,8)
跳转到存储在地址0x400850(,%rax,8)
上的值,而不是跳转到地址0x400850(,%rax,8)
本身.可能在此地址处有一个跳转表,并且rax
从跳转表中选择一个条目以跳转到.
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.
检查0x400850
周围的内存,以查找跳转表具有的条目以及跳转的位置.您可以使用objdump -s
转储可执行文件的映像.
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
.
这篇关于组装jmp到不存在的行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!