Comment 4 for bug 1701798

Revision history for this message
Peter Maydell (pmaydell) wrote :

Can you check whether these work if you copy the QEMU and the dynamically linked target binary into a chroot (which does not have the x86 host ld.so or /etc in it) instead of using QEMU_LD_PREFIX ? There is a problem I've seen before where:
 1) QEMU when run with QEMU_LD_PREFIX or -L works by "first try in -L, then try in the host filesystem"
 2) files like /etc/ld.so.cache (and other things the dynamic linker uses) are not in the -L directory but are in the host
 3) the ld.so.cache format is not endian-agnostic
 4) glibc's dynamic linker code does not ignore a wrong-endian ld.so.cache but crashes instead

Using a chroot instead of QEMU_LD_PREFIX will work as a test of whether this is the kind of problem you're running into. Personally I think that (4) is a glibc bug...