1.程序
/****************************************************/
//filename 001.c
/***************************************************/
#include<stdio.h>
int main(void)
{
printf("Hello world!/n');
return 0;
}
2.分析
如果在linux下命令 gcc -nostdlib 001.c -o 001,那么就会报错。
[root@localhost home]# gcc -nostdlib 001.c -o 001
/usr/bin/ld: warning: cannot find entry symbol _start; defaulting to 08048074
/tmp/ccqs2I1v.o: In function `main':
001.c:(.text+0x19): undefined reference to `printf'
collect2: ld 返回 1