aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMichael Weiser <michael.weiser@gmx.de>2018-01-11 13:25:33 +0000
committerPeter Maydell <peter.maydell@linaro.org>2018-01-11 13:25:33 +0000
commit2ced93eee04ac636387233c64720d0f764d8d24d (patch)
tree6a18e593ac1555e26675297cf9444f6095d39826 /scripts
parentf772f212b39a79b4510b0e9b403714cc03dae9b9 (diff)
linux-user: Separate binfmt arm CPU families
Give big-endian arm and aarch64 CPUs their own family in qemu-binfmt-conf.sh to make sure we register qemu-user for binaries of the opposite endianness on arm and aarch64. Apart from the family assignments of the magic values, qemu_get_family() needs to be able to distinguish the two and recognise aarch64{,_be} as well. Signed-off-by: Michael Weiser <michael.weiser@gmx.de> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-id: 20171220212308.12614-7-michael.weiser@gmx.de Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/qemu-binfmt-conf.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh
index d69953525c..597efdbe50 100755
--- a/scripts/qemu-binfmt-conf.sh
+++ b/scripts/qemu-binfmt-conf.sh
@@ -24,7 +24,7 @@ arm_family=arm
armeb_magic='\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28'
armeb_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'
-armeb_family=arm
+armeb_family=armeb
sparc_magic='\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x02'
sparc_mask='\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'
@@ -94,7 +94,7 @@ aarch64_family=arm
aarch64_be_magic='\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb7'
aarch64_be_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'
-aarch64_be_family=arm
+aarch64_be_family=armeb
hppa_magic='\x7f\x45\x4c\x46\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x0f'
hppa_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'
@@ -115,9 +115,12 @@ qemu_get_family() {
ppc64el|ppc64le)
echo "ppcle"
;;
- arm|armel|armhf|arm64|armv[4-9]*)
+ arm|armel|armhf|arm64|armv[4-9]*l|aarch64)
echo "arm"
;;
+ armeb|armv[4-9]*b|aarch64_be)
+ echo "armeb"
+ ;;
sparc*)
echo "sparc"
;;