[PATCH] MIPS: fix elf_check_arch(x)

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

 



Signed-off-by: Antony Pavlov <antonynpavlov@xxxxxxxxx>
---
 arch/mips/include/asm/elf.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/mips/include/asm/elf.h b/arch/mips/include/asm/elf.h
index 3dd6b82357e..ca0fb55069e 100644
--- a/arch/mips/include/asm/elf.h
+++ b/arch/mips/include/asm/elf.h
@@ -14,12 +14,14 @@
 
 #ifndef ELF_ARCH
 
-#ifdef CONFIG_32BIT
+#define EM_MIPS		 8	/* MIPS R3000 (officially, big-endian only) */
 
 /*
  * This is used to ensure we don't load something for the wrong architecture.
  */
-#define elf_check_arch(hdr)						\
+#define elf_check_arch(x) ((x)->e_machine == EM_MIPS)
+
+#ifdef CONFIG_32BIT
 /*
  * These are used to set parameters in the core dumps.
  */
-- 
2.45.2





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux