aboutsummaryrefslogtreecommitdiff
path: root/linux-user/host
diff options
context:
space:
mode:
authorCarlo Marcelo Arenas Belón <carenas@gmail.com>2020-08-23 03:17:03 -0700
committerLaurent Vivier <laurent@vivier.eu>2020-08-27 12:29:50 +0200
commitace3d65459a01bfd8c2c59ecabb5fd6839b2de54 (patch)
tree2755ae38d7aec634689cde208bb441e21a79f51d /linux-user/host
parent888468db949e8ea1641c33d97e70b70f57eb69e9 (diff)
downloadqemu-ace3d65459a01bfd8c2c59ecabb5fd6839b2de54.zip
qemu-ace3d65459a01bfd8c2c59ecabb5fd6839b2de54.tar.gz
qemu-ace3d65459a01bfd8c2c59ecabb5fd6839b2de54.tar.bz2
linux-user: detect mismatched ELF ABI in qemu-mips[n32][el]
MIPS provides 2 ILP32 ABIs, and therefore 4 possible qemu-mips binaries with 2 pairs using the same endianess and bitness. This could lead to an O32 image loading in the N32 binary or vice versa and in cryptic errors (if lucky that the CPU doesn't match the FPU used) like : qemu: Unexpected FPU mode (o32 ELF loaded to qemu-mipsn32[el]) ELF binary's NaN mode not supported by CPU (n32 -> qemu-mips[el]) Add an ABI check macro that could be used while checking the ELF header that relies in the ABI2 flag to identify n32 binaries and abort instead early with a more descriptive error : Invalid ELF image for this architecture Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20200823101703.18451-1-carenas@gmail.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'linux-user/host')
0 files changed, 0 insertions, 0 deletions