qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 01/19] linux_user: elfload: Default ELF_MACHINE to E


From: Peter Crosthwaite
Subject: [Qemu-devel] [PATCH 01/19] linux_user: elfload: Default ELF_MACHINE to ELF_ARCH
Date: Sat, 15 Aug 2015 16:28:11 -0700

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.

Signed-off-by: Peter Crosthwaite <address@hidden>
---
 linux-user/elfload.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index 1788368..7f4bb8c 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -1222,6 +1222,10 @@ static inline void init_thread(struct target_pt_regs 
*regs, struct image_info *i
 #define ELF_PLATFORM (NULL)
 #endif
 
+#ifndef ELF_MACHINE
+#define ELF_MACHINE ELF_ARCH
+#endif
+
 #ifndef ELF_HWCAP
 #define ELF_HWCAP 0
 #endif
-- 
1.9.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]