Arm64 fails to run a binary which runs OK on real hardware
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Note this is using the not-yet-upstream aarch64 patches from:
https:/
---- ----
This binary:
http://
runs OK on real aarch64 hardware. It is a statically linked Linux binary which (if successful) will print "hello, world" and exit cleanly.
On qemu-arm64 userspace emulator it doesn't print anything and loops forever using 100% CPU.
---- ----
The following section is only if you wish to compile this binary from source, otherwise you can ignore it.
First compile OCaml from:
https:/
(note you have to compile it on aarch64 or in qemu, it's not possible to cross-compile). You will have to apply the one-line patch from:
https:/
./configure
make -j1 world.opt
Then do:
echo 'print_endline "hello, world"' > test.ml
./boot/ocamlrun ./ocamlopt -I stdlib stdlib.cmxa test.ml -o test
./test
description: | updated |
Changed in qemu: | |
status: | Fix Committed → Fix Released |
On 23 December 2013 18:38, Richard Jones <email address hidden> wrote: oirase. annexia. org/tmp/ test.gz
> This binary:
>
> http://
>
> runs OK on real aarch64 hardware. It is a statically linked Linux
> binary which (if successful) will print "hello, world" and exit cleanly.
>
> On qemu-arm64 userspace emulator it doesn't print anything and loops
> forever using 100% CPU.
Does the equivalent binary run OK in 32 bit ARM QEMU?
Does the binary use multiple threads?
If you have the time to investigate more closely what the binary
is actually doing when it loops (eg by running under a host gdb,
or using the debug log tracing of TCG input and output code and
execution) that would be helpful. Otherwise it's likely to be quite a
long time before I get round to looking at this kind of thing, because
"runs complex binaries/runtimes like ocaml" is not very high up the
priority list, I'm afraid.
thanks
-- PMM