How to solve “error while loading shared libraries” when trying to run an arm binary with qemu-arm?

后端 未结 6 716
-上瘾入骨i
-上瘾入骨i 2021-02-04 08:40

I\'m running Linux Mint 14 with qemu, qemu-user, and the gnueabi toolchain installed. I compiled test.c with arm-linux-gnueabi-gcc test.c -o test.

When I tr

6条回答
  •  太阳男子
    2021-02-04 09:04

    If you want to run ARM without Linux, then you need a different compiler (at least). arm-linux-gnueabi-gcc is a compiler for Linux. The compiler and libc are intimately linked. You will need a newlib compiler with a portability layer for qemu.porting newlib

    See: Balau and Google newlib+qemu. A newlib port is hosted at Github and seems to the same as the Balau blog.

    Typically a non-Linux gcc is called arm-none-eabi-gcc. The prefix arm-none-eabi- is recognized by some configure scripts.

提交回复
热议问题