On 23 November 2017 at 21:00, Alex Kashchenko <akash...@redhat.com> 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.) thanks -- PMM