我刚刚开始使用C.我正在尝试编译下面的代码并执行它,但是我收到了一个错误.
还运行size在BS或数据堆栈中什么都不显示?
#include<stdio.h>
/* test.c: My first C program on a Linux */
int main(void)
{
printf("Hello! This is a test prgoram.\n");
return 0;
}
Run Code Online (Sandbox Code Playgroud)
编译工作:
gcc -c test.c -o test
Run Code Online (Sandbox Code Playgroud)
执行:
bash: ./test: cannot execute binary file: Exec format error
Run Code Online (Sandbox Code Playgroud)
尺寸:
text data bss dec hex filename
108 0 0 108 6c test
Run Code Online (Sandbox Code Playgroud)