—————————————————————————————————
.section .tex
.global _start
_start :
nop
movl $1,%eax
jmp overhere
movl $10,%ebx
int $ox80
overhere:
movl $20,%ebx
int $0x80
——————————————————————————————————-
编译 : as -o jumptest.o jumptest.s
ld -o jumptest jumptest.o
对 jumptest 进行反汇编 。 objdump -D jumptest
可以看到 代码的地址
使用 gdb -q jumptest 进行调试程序
break *_start 设置断点地址
run 运行程序
print/X $rip 打印寄存器值
info registers 查看所有的寄存器值