> You can probably also work around this by creating an empty ld.so.cache in the QEMU_LD_PREFIX directory, though it's awkward if you wanted that to be the /usr/whatever directory.
Indeed, qemu already analyzes the QEMU_LD_PREFIX, stores a cache of its contents in the static variable 'base', and uses it in the do_openat() function.
The following provides a workaround for me that does not require any change to qemu:
> You can probably also work around this by creating an empty ld.so.cache in the QEMU_LD_PREFIX directory, though it's awkward if you wanted that to be the /usr/whatever directory.
Indeed, qemu already analyzes the QEMU_LD_PREFIX, stores a cache of its contents in the static variable 'base', and uses it in the do_openat() function.
The following provides a workaround for me that does not require any change to qemu:
sudo mkdir -p $QEMU_LD_PREFIX/etc PREFIX/ etc/ld. so.cache
sudo ln -s /nonexistent $QEMU_LD_