![]() |
#2
vfdff2010-11-01 22:44
|

#include <stdlib.h>
int main(void)
{
exit(0);
}
(gdb) disas exitint main(void)
{
exit(0);
}
Dump of assembler code for function exit@plt:
0x0804832c <exit@plt+0>: jmp *0x804a008
0x08048332 <exit@plt+6>: push $0x10
0x08048337 <exit@plt+11>: jmp 0x80482fc
End of assembler dump.
一般函数都会在开始部分保存堆栈的,但是这个exit函数去比较特别,竟然没有push之类的指令,是不是因为这个函数不必返回,所以不用保存堆栈了?