From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56740) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZQksY-0006N6-35 for qemu-devel@nongnu.org; Sat, 15 Aug 2015 19:28:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZQksU-0000XE-Gz for qemu-devel@nongnu.org; Sat, 15 Aug 2015 19:28:46 -0400 Received: from mail-pa0-x22d.google.com ([2607:f8b0:400e:c03::22d]:35954) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZQksU-0000XA-9o for qemu-devel@nongnu.org; Sat, 15 Aug 2015 19:28:42 -0400 Received: by pacrr5 with SMTP id rr5so83321406pac.3 for ; Sat, 15 Aug 2015 16:28:41 -0700 (PDT) From: Peter Crosthwaite Date: Sat, 15 Aug 2015 16:28:11 -0700 Message-Id: <88f69681ce6fbc4229181b7e8b8784f8982db72a.1439679104.git.crosthwaite.peter@gmail.com> In-Reply-To: References: In-Reply-To: References: Subject: [Qemu-devel] [PATCH 01/19] linux_user: elfload: Default ELF_MACHINE to ELF_ARCH List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com, riku.voipio@iki.fi, Peter Crosthwaite 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 --- 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