" call 0x80482f0 <puts@plt>"?只需要在x86程序集中的"hello world"程序中获得一行代码的帮助.
注意:我正在编程/调试这个时运行ubuntu linux,使用gcc作为编译器,使用gdb作为调试器.
我正在阅读Hacking:剥削艺术V2和我编译了这个C程序:
1 #include <stdio.h>
2
3 int main()
4 {
5 int i;
6 for(i=0; i<10; i++)
7 {
8 printf("Hello, world\n");
9 }
10 return 0;
Run Code Online (Sandbox Code Playgroud)
在汇编中加入这个程序:
0x080483b4 <+0>: push ebp
0x080483b5 <+1>: mov ebp,esp
0x080483b7 <+3>: and esp,0xfffffff0
0x080483ba <+6>: sub esp,0x20
0x080483bd <+9>: mov DWORD PTR [esp+0x1c],0x0
0x080483c5 <+17>: jmp 0x80483d8 <main+36>
0x080483c7 <+19>: mov DWORD PTR [esp],0x80484b0
0x080483ce <+26>: call 0x80482f0 <puts@plt>
=> 0x080483d3 <+31>: add …Run Code Online (Sandbox Code Playgroud)