From 75be901cdcd20acc724534e2dff58bc7b539292f Mon Sep 17 00:00:00 2001 From: Peter Crosthwaite Date: Sun, 19 Jul 2015 05:02:37 -0700 Subject: [PATCH] linux_user: elfload: Default ELF_MACHINE to ELF_ARCH In most (but not all) cases, ELF_MACHINE and ELF_ARCH are safely the same. Default ELF_MACHINE to ELF_ARCH. This makes defining ELF_MACHINE optional for target-*/cpu.h when they are known to match. Reviewed-by: Richard Henderson Acked-By: Riku Voipio Signed-off-by: Peter Crosthwaite Signed-off-by: Paolo Bonzini --- linux-user/elfload.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 39f32826ba..4ed8c5e337 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -1245,6 +1245,10 @@ static inline void init_thread(struct target_pt_regs *regs, #define ELF_PLATFORM (NULL) #endif +#ifndef ELF_MACHINE +#define ELF_MACHINE ELF_ARCH +#endif + #ifndef ELF_HWCAP #define ELF_HWCAP 0 #endif -- GitLab