以下代码
int _main() {return 0;}
使用命令编译:
gcc -s -nostdlib -nostartfiles 01-simple.c -o01-simple.exe
gcc 版本 4.4.1 (TDM-1 mingw32)
OllyDbg 产生了这个输出:
你能解释一下这里发生了什么吗?到目前为止的分析:
// these two seems to be an idiom:
PUSH EBP // places EBP on stack
MOV EBP, ESP // overwrites EBP with ESP
MOV EAX, 0 // EAX = 0
LEAVE // == mov esp, ebp
// pop ebp
// according to
// http://en.wikipedia.org/wiki/X86_instruction_listings
这一切的意义是什么?