aboutsummaryrefslogtreecommitdiff
path: root/util/qemu-timer-common.c
diff options
context:
space:
mode:
authorAndreas K. Hüttel <dilfridge@gentoo.org>2022-03-28 22:49:01 +0200
committerPhilippe Mathieu-Daudé <f4bug@amsat.org>2022-03-29 00:51:55 +0200
commit77d119dd335f910c7f953a265726e3753c69a0bb (patch)
treea76e13d729baad6525878323bfb49bd496c655f4 /util/qemu-timer-common.c
parent8cd0e66353018f63322e0dd200b2d31be265f883 (diff)
downloadqemu-77d119dd335f910c7f953a265726e3753c69a0bb.zip
qemu-77d119dd335f910c7f953a265726e3753c69a0bb.tar.gz
qemu-77d119dd335f910c7f953a265726e3753c69a0bb.tar.bz2
qemu-binfmt-conf.sh: mips: allow nonzero EI_ABIVERSION, distinguish o32 and n32
With the command line flag -mplt and a recent toolchain, ELF binaries generated by gcc can obtain EI_ABIVERSION=1, which makes, e.g., gcc three-stage bootstrap in a mips-unknown-linux-gnu qemu-user chroot fail since the binfmt-misc magic does not match anymore. Also other values are technically possible. qemu executes these binaries just fine, so relax the mask for the EI_ABIVERSION byte at offset 0x08. In addition, extend magic string to distinguish mips o32 and n32 ABI. This information is given by the EF_MIPS_ABI2 (0x20) bit in the e_flags field of the ELF header (a 4-byte value at offset 0x24 for the here applicable ELFCLASS32). See-also: ace3d65459 Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: WANG Xuerui <xen0n@gentoo.org> Cc: Laurent Vivier <laurent@vivier.eu> Cc: WANG Xuerui <xen0n@gentoo.org> Cc: Richard Henderson <richard.henderson@linaro.org> Cc: Alex Bennee <alex.bennee@linaro.org> Cc: Philippe Mathieu-Daudé <f4bug@amsat.org> Closes: https://gitlab.com/qemu-project/qemu/-/issues/843 Message-Id: <20220328204900.3914990-1-dilfridge@gentoo.org> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Diffstat (limited to 'util/qemu-timer-common.c')
0 files changed, 0 insertions, 0 deletions