我正在运行 Linux Mint 14,并安装了 qemu、qemu-user 和 gnueabi 工具链。我编译了 test.carm-linux-gnueabi-gcc test.c -o test
.
当我尝试跑步时qemu-arm /usr/arm-linux-gnueabi/lib/ld-linux.so.3 test
我收到一条错误消息:test: error while loading shared libraries: test: cannot open shared object file: No such file or directory
。跑步qemu-arm test
正如我之前尝试过的那样,给出/lib/ld-linux.so.3: No such file or directory
但是,该文件确实存在并且可以访问。
$ stat /usr/arm-linux-gnueabi/lib/ld-linux.so.3
File: `/usr/arm-linux-gnueabi/lib/ld-linux.so.3' -> `ld-2.15.so'
Size: 10 Blocks: 0 IO Block: 4096 symbolic link
Device: 801h/2049d Inode: 4083308 Links: 1
Access: (0777/lrwxrwxrwx) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2013-04-22 16:19:48.090613901 -0700
Modify: 2012-09-21 08:31:29.000000000 -0700
Change: 2013-04-22 15:58:41.042542851 -0700
Birth: -
有谁知道如何让 qemu 运行arm程序而不必模拟整个arm Linux内核?
测试.c是
#include <stdio.h>
int main() {
printf("this had better work\n");
}
and file test
is
test: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.31, BuildID[sha1]=0xf2e49db65394b77c77ee5b65b83c0cc9220cbfc0, not stripped