Skip to content

linux-user qemu-x86_64 can't exec a binary on aarch64 or Loongarch.

Host environment

  • Operating system: archlinux, ky10
  • OS/kernel version: 4.19(aarch64), 6.3(LoongArch)
  • Architecture: aarch64 /LoongArch
  • QEMU flavor: qemu-x86_64
  • QEMU version: 8.0.50 fdd0df53
  • QEMU command line: ./build/qemu-x86_64 hello

Emulated/Virtualized environment

  • Operating system:
  • OS/kernel version:
  • Architecture: x86

Description of problem

on master branch, we build an simply hello.c with x86_cross gcc. then. run './build/qemu-x86_64 hello', no output.

Steps to reproduce

  1. build an hello.c with x86_64 cross. use --static.
  2. build qemu-x86_64 on aarch64 or LoongArch host.
  3. run './build/qemu-x86_64 hello'

Additional information

strace.txt

hello

The following commit causes this problem.

commit 86f04735 Author: Helge Deller deller@gmx.de Date: Sun Dec 25 09:23:19 2022 +0100

linux-user: Fix brk() to release pages
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information