compiling and running hello world for ARM Linux

I'm trying to run hello world program on ARM computer with Linux (Debian Wheezy). The libc version on it is 2.13, while my own computer has 2.15 (Ubuntu Precise). I installed arm-linux-gnueabi-gcc on my computer and compiled the application with static linkage.

All my attempts to run compiled binary result in "cannot execute binary file" message. However, QEMU on my own computer (qemu-arm-static) runs the application succesfully.

I thought that it should be enough to link my app statically. The permissions are 755. What am I missing here?

UPD: I tried to install Arch Linux on that ARM. In that distribution my compiled binaries crash with segfault instead of bash error message. Does stock cross compiler in Ubuntu distribution ever work? :-/

Thanks!

链接地址: http://www.djcxy.com/p/15246.html

上一篇: Makefile库的前提条件

下一篇: 编译和运行ARM Linux的hello world