我正在尝试使用标志 -fno-pie 和不使用标志在 gcc 中编译虚拟函数。
void dummy_test_entrypoint() { }
当我在没有标志的情况下编译时。
gcc -m32 -ffreestanding -c test.c -o test.o
我得到以下反汇编代码。
00000000 <dummy_test_entrypoint>:
0: 55 push ebp
1: 89 e5 mov ebp,esp
3: e8 fc ff ff ff call 4 <dummy_test_entrypoint+0x4>
8: 05 01 00 00 00 add eax,0x1
d: 90 nop
e: 5d pop ebp
f: c3 ret
当我用标志编译时。
00000000 <dummy_test_entrypoint>:
0: 55 push ebp
1: 89 e5 mov ebp,esp
3: 90 nop
4: 5d pop ebp
5: c3 ret
我的问题。
它是什么???
3: e8 fc ff ff ff call 4 <dummy_test_entrypoint+0x4>
8: 05 01 00 00 00 add eax,0x1