当从ARM64反编译代码时,如何知道无条件分支指令b
是否是到同一函数中的标签的分支,而不是到某个其他函数的分支?
How do state of the art decompilers recognize if a branch target is still in the function or is it a new function? Do they rely on the branch target's value and see if it lands on a different section in the TEXT
segment?
What about branch targets that are in the same sections but are still considered new functions? Is there a rule of thumb for ARM64 saying that if a branch target is too far by some threshold from the current address it's considered a new boundary thus a new function? Like in x86 where you have different encodings for far jump and short jump, where short jump may be considered a label in a function and far jump probably not.
我可能会补充说,我现在正在判断的目标二进制文件是用Objective-C编写的Machos,我试图使用Ghidra来验证我的发现,所以它可能会使用一些更多的启发式方法,比如查看跳转目标是在__stubs
节还是__objc_stubs
节中,或者甚至分析块 struct 来识别更多的过程(尽管从Ghidra反编译的最后一点似乎没有识别这些 struct )?