401067: 85 c0 testl %eax,%eax
401069: 74 57 je 0x4010c2
40106b: b9 02 00 00 00 movl $0x2,%ecx
401070: e8 db 66 04 00 callq 0x447750
401075: 48 c7 c1 ff ff ff ff movq $0xffffffffffffffff,%rcx
40107c: e8 af 4e 04 00 callq 0x445f30
401081: 48 8b 15 58 20 12 00 movq 0x122058(%rip),%rdx # 0x5230e0
401088: 48 89 02 movq %rax,(%rdx)
40108b: 48 8b 15 3e 20 12 00 movq 0x12203e(%rip),%rdx # 0x5230d0
401092: 48 89 02 movq %rax,(%rdx)
401095: 48 8b 05 a4 20 12 00 movq 0x1220a4(%rip),%rax # 0x523140
40109c: 8b 10 movl (%rax),%edx
40109e: 48 8b 05 db 1f 12 00 movq 0x121fdb(%rip),%rax # 0x523080
4010a5: 48 8b 00 movq (%rax),%rax
4010a8: 89 10 movl %edx,(%rax)
4010aa: e8 71 4a 04 00 callq 0x445b20
4010af: 48 8b 05 3a 1f 12 00 movq 0x121f3a(%rip),%rax # 0x522ff0
4010b6: 83 38 01 cmpl $0x1,(%rax)
4010b9: 74 65 je 0x401120
4010bb: 31 c0 xorl %eax,%eax
4010bd: 48 83 c4 28 addq $0x28,%rsp
4010c1: c3 retq
...
447748: ff 25 be 4d 0f 00 jmpq *0xf4dbe(%rip) # 0x53c50c
44774e: 90 nop
44774f: 90 nop
447750: ff 25 ae 4d 0f 00 jmpq *0xf4dae(%rip) # 0x53c504
447756: 90 nop
447757: 90 nop
447758: ff 25 96 4d 0f 00 jmpq *0xf4d96(%rip) # 0x53c4f4
44775e: 90 nop
44775f: 90 nop
这个偏移的计算方法是,目标地址 - 当前指令的下一条指令的地址
401070: e8 db 66 04 00 callq 0x447750
447750: ff 25 ae 4d 0f 00 jmpq *0xf4dae(%rip) # 0x53c504
也就是 447750 - 401075 = 000466db
db 66 04 00 就是 000466db
对于向前转移也一样 445f0c: 90 nop
445f0d: 90 nop
445f0e: 90 nop
445f0f: 90 nop
445f10: db e3 fninit
445f12: c3 retq
445f13: 90 nop
445f14: 90 nop
445f15: 90 nop
445f16: 90 nop
445f17: 90 nop
...
446840: ba 01 00 00 00 movl $0x1,%edx
446845: b9 0b 00 00 00 movl $0xb,%ecx
44684a: e8 41 0d 00 00 callq 0x447590
44684f: b8 ff ff ff ff movl $0xffffffff,%eax
446854: e9 c4 fe ff ff jmpq 0x44671d
446859: ba 01 00 00 00 movl $0x1,%edx
44685e: b9 08 00 00 00 movl $0x8,%ecx
446863: e8 28 0d 00 00 callq 0x447590
446868: e8 a3 f6 ff ff callq 0x445f10
44686d: e9 38 ff ff ff jmpq 0x4467aa
446872: 90 nop
446873: 90 nop
446874: 90 nop
446875: 90 nop
445f10 - 44686d = fffff6a3
e8 a3 f6 ff ff |