I have a very simple arm executable compiled with the arm-linux-gnueabi
toolchain. I can execute it with qemu-arm
without any problem:
$ qemu-arm -L /usr/arm-linux-gnueabi/ ./a.out
Hello world !
Running the linker without any argument seems to work as well:
qemu-arm /usr/arm-linux-gnueabi/lib/ld-linux.so.3
Usage: ld.so [OPTION]... EXECUTABLE-FILE [ARGS-FOR-PROGRAM...]
You have invoked `ld.so', the helper program for shared library executables.
...
However if I want the linker to run my executable, here is what happens:
$ qemu-arm -L /usr/arm-linux-gnueabi/ /usr/arm-linux-gnueabi/lib/ld-linux.so.3 a.out
a.out: error while loading shared libraries: a.out: cannot open shared object file
Here is the output of strace: https://pastebin.com/uJ7AhBdh
Any idea why this is happening ?