[Top][All Lists]

[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 10:14:44 +0000

On 23 November 2017 at 21:00, Alex Kashchenko <address@hidden> wrote:
> Hi,
> I am trying to build qemu-s390x-user static binary to run a hello-world
> program cross-compiled with gcc-s390x-linux-gnu on linux_x86_64.
> I am building qemu with:
> ./configure --static --disable-werror --target-list=s390x-linux-user
> make
> and running example with:
> QEMU_STRACE=1 ./s390x-linux-user/qemu-s390x path/to/s390x-hello
> I tried latest git and a number of v2.x releases without success. Can see
> either hang (on first brk call) or various errors for newer versions and
> "Illegal instruction" for older ones. Tried on ubuntu 16.04 and 17.10
> without success.
> The same steps worked for me for ppc64le hello-world.
> Any help on this is highly appreciated.

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. (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.)

-- PMM

reply via email to

[Prev in Thread] Current Thread [Next in Thread]