summary refs log tree commit diff stats
path: root/linux-user/ppc
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2025-07-29 11:23:31 -1000
committerRichard Henderson <richard.henderson@linaro.org>2025-08-30 07:04:04 +1000
commite6b7635c9a33918c671e1f2ef4b17b5c2f279d66 (patch)
tree5433397b0dca64251088c6ee3015cd362321dc2c /linux-user/ppc
parent14095cb5f84c0a18707e86ed7f064e2fed3bf87a (diff)
downloadfocaccia-qemu-e6b7635c9a33918c671e1f2ef4b17b5c2f279d66.tar.gz
focaccia-qemu-e6b7635c9a33918c671e1f2ef4b17b5c2f279d66.zip
linux-user: Standardize on ELF_MACHINE not ELF_ARCH
PowerPC was the one outlier that defined both ELF_ARCH and
ELF_MACHINE; ELF_ARCH was defined incorrectly, necessitating
the definition of elf_check_arch.

However, the elf file header field in question is called
e_machine, so ELF_MACHINE is in fact the better name.

Mechanically change most target/target_elf.h files,
then adjust ppc/target_elf.h manually.

Do not provide a default for ELF_MACHINE.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'linux-user/ppc')
-rw-r--r--linux-user/ppc/target_elf.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/linux-user/ppc/target_elf.h b/linux-user/ppc/target_elf.h
index 9a47f18fb8..22854cf52f 100644
--- a/linux-user/ppc/target_elf.h
+++ b/linux-user/ppc/target_elf.h
@@ -13,13 +13,11 @@
 #define ELF_MACHINE             PPC_ELF_MACHINE
 
 #ifdef TARGET_PPC64
-# define elf_check_arch(x)      ((x) == EM_PPC64)
 # define ELF_CLASS              ELFCLASS64
 #else
 # define ELF_CLASS              ELFCLASS32
 # define EXSTACK_DEFAULT        true
 #endif
-#define ELF_ARCH                EM_PPC
 
 #define HAVE_ELF_HWCAP          1
 #define HAVE_ELF_HWCAP2         1