[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-discuss] s390x user-mode working example
From: |
Peter Maydell |
Subject: |
Re: [Qemu-discuss] s390x user-mode working example |
Date: |
Fri, 24 Nov 2017 11:32:09 +0000 |
On 24 November 2017 at 11:16, Alex Kashchenko <address@hidden> wrote:
>> Is your target binary statically linked? If not you'll need
>> to tell QEMU where the libraries are, or run it in a chroot
>> with the s390x libraries etc.
>
>
> No, it is not statically linked, on ubuntu I am installing multiarch packet
> libc6:s390x (goes to /lib/s390x-linux-gnu/libc.so.6 ) for it as a
> dependency.
You will need to tell QEMU -L /usr/s390x-linux-gnu so it
can find the dynamic libraries.
>> (You'll also need to make sure
>> it doesn't pick up the x86 /etc/ld.so.cache, because a glibc
>> bug means a bigendian dynamic linker crashes when it finds
>> a littleendian ld.so.cache, whereas same-endian-wrong-arch
>> just ignores it.)
>
>
> That was it
> Simple example now works fine for me if I delete /etc/ld.so.cache before
> running it.
If you're passing QEMU a -L argument you can just create an
empty /lib/s390x-linux-gnu/etc/ld.so.cache which will then
take precedence over the host's file. That way you don't have
to lose the benefits of ld.so.cache for the host system.
thanks
-- PMM