android 可执行二进制文件格式,我的C程序无法运行`不能执行二进制文件:执行格式错误`(My C program fails to run with `cannot execute binary...

我的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)

{

<
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值