小智 8
是的你可以.
_startfunction是调用C程序的入口点main().
main()从程序员的角度来看,进一步深入研究C程序的起点.在调用之前main(),进程执行大量代码以"清理执行空间".
_start是先调用的函数,然后分配必要的资源,然后调用main()必须由程序员定义的函数.
您可以使用" "选项覆盖_start并告诉编译器不要查找.main()-nostartfiles
#include <stdio.h> //for using printf()
_start()
{
printf("Hello world!!\n");
_exit(0);
}
Run Code Online (Sandbox Code Playgroud)
编译 : gcc -nostartfiles code.c -o a.out
另请参阅http://linuxgazette.net/issue84/hawk.html以获取更多基本信息.