mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] MIPS: fix elf_check_arch(x)
@ 2024-09-09 20:51 Antony Pavlov
  2024-09-11  8:40 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Antony Pavlov @ 2024-09-09 20:51 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
 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




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] MIPS: fix elf_check_arch(x)
  2024-09-09 20:51 [PATCH] MIPS: fix elf_check_arch(x) Antony Pavlov
@ 2024-09-11  8:40 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2024-09-11  8:40 UTC (permalink / raw)
  To: barebox, Antony Pavlov; +Cc: Ahmad Fatoum


On Mon, 09 Sep 2024 23:51:30 +0300, Antony Pavlov wrote:
> 


Applied, thanks!

[1/1] MIPS: fix elf_check_arch(x)
      https://git.pengutronix.de/cgit/barebox/commit/?id=5b41e0f5106e (link may not be stable)

Best regards,
-- 
Sascha Hauer <s.hauer@pengutronix.de>




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-09-11  8:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-09 20:51 [PATCH] MIPS: fix elf_check_arch(x) Antony Pavlov
2024-09-11  8:40 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox