- 论坛徽章:
- 0
|
开发用机:debian 5
目标系统:arm debian5(arm debian5是用QEMU虚拟安装的Linux系统)
交叉编译环境:crosstool-0.43.tar.gz, arm-linux-gcc 4.10
如果用 arm-linux-gcc -o hello hello.c
编译出来的文件:
#file hello
hello: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.8, not stripped
到目标系统里面运行失败。
如果用 arm-linux-gcc -o hello hello.c -static
编译出来的文件:
#file hello
hello: ELF 32-bit LSB executable, ARM, version 1, statically linked, for GNU/Linux 2.4.18, not stripped
#./hello
到目标系统里面运行,显示 helloword!
不知道是交叉编译环境问题还是其他问题。 |
|