我的C程序无法运行`不能执行二进制文件:执行格式错误`(My C program fails to run with `cannot execute binary file: Exec format error`)
我刚刚开始C.我试图编译下面的代码并执行它,但我得到一个错误。
在BS或数据堆栈中,运行size还没有显示任何内容?
#include
/* test.c: My first C program on a Linux */
int main(void)
{
printf("Hello! This is a test prgoram.\n");
return 0;
}
编译作品:
gcc -c test.c -o test
执行:
bash: ./test: cannot execute binary file: Exec format error
尺寸:
text data bss dec hex filename
108 0 0 108 6c test
I'm just starting with C. I'm trying to compile the below code and execute it, but I get an error.
Also running size shows nothing in BS or data stacks?
#include
/* test.c: My first C program on a Linux */
int main(void)
{
<