On 21.03.14 19:44, Peter Maydell wrote:
When trying to load an ELF file specified via -kernel, we need to
pass load_elf() the ELF machine type corresponding to the CPU we're
booting with, not the one corresponding to the softmmu binary
we happen to be running. (The two are different in the case of
loading a 32-bit ARM ELF file into a 32 bit CPU being emulated
by qemu-system aarch64.) This was causing us to incorrectly fail
to load ELF images in this situation.
Signed-off-by: Peter Maydell <peter.maydell@xxxxxxxxxx>
---
This isn't really a big deal since we can just say "use the
qemu-system-arm binary instead". However maybe we should put
this into 2.0. Opinions?
Incidentally I suspect hw/i386/multiboot.c has a similar
problem where it calls load_elf() passing ELF_MACHINE.
We have some compatibility code in the elf loader that says "if
elf_machine == ppc64, then allow loading of ppc32 binaries too":
http://git.qemu.org/?p=qemu.git;a=blob;f=include/hw/elf_ops.h;h=c6b5129bab394704cf2197fe079ab195ec84ec2a;hb=HEAD#l213
which we need because our mac99 firmware is 32bit, but does know how to
drive a ppc64 CPU. I suppose your case is slightly different for AArch64
which is not compatible with 32bit binaries on firmware level.
Alex
_______________________________________________
kvmarm mailing list
kvmarm@xxxxxxxxxxxxxxxxxxxxx
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm