target-arm: Load ELF images with the correct machine type for CPU
commitda0af40dd70c8f8f821d79c367aecb08618af28e
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 21 Mar 2014 18:44:36 +0000 (21 18:44 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 24 Mar 2014 16:41:10 +0000 (24 16:41 +0000)
tree9d09bf39b9efeaba3bbffc477c4618dab99304eb
parentd108609bf9ba160d2e2044ce7d553f691ac96dbd
target-arm: Load ELF images with the correct machine type for CPU

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@linaro.org>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Message-id: 1395427476-25546-1-git-send-email-peter.maydell@linaro.org
hw/arm/boot.c