跳转到一条指令的中间
Jump to the middle of an instruction
我尝试测试一些反反汇编技术。其中之一跳转到一条指令的中间,如下图所示:
使用代码时
mov ax, 05EBh
xor eax, eax
jz -7
db 0xE8
在带有 NASM 的小程序中,我收到以下错误:
"error: Win32 COFF does not correctly support relative references to absolute addresses"
知道如何解决这个问题或使用哪个工具代替 NASM 吗?
如果你想跳转到 jz
指令开始的地址,负 7 个字节,那么你可以这样做:
jz $-7
来自NASM manual:
$
evaluates to the assembly position at the beginning of the line containing the expression
请注意,mov
和 xor
指令的总大小为 6 个字节,因此您将跳转到 mov
开始之前的 1 个字节。要根据你的数字跳,你会使用 jz $-4
我尝试测试一些反反汇编技术。其中之一跳转到一条指令的中间,如下图所示:
使用代码时
mov ax, 05EBh
xor eax, eax
jz -7
db 0xE8
在带有 NASM 的小程序中,我收到以下错误:
"error: Win32 COFF does not correctly support relative references to absolute addresses"
知道如何解决这个问题或使用哪个工具代替 NASM 吗?
如果你想跳转到 jz
指令开始的地址,负 7 个字节,那么你可以这样做:
jz $-7
来自NASM manual:
$
evaluates to the assembly position at the beginning of the line containing the expression
请注意,mov
和 xor
指令的总大小为 6 个字节,因此您将跳转到 mov
开始之前的 1 个字节。要根据你的数字跳,你会使用 jz $-4