MIPS: fix elf_check_arch(x)
Subsystems (2)
PATCH 1/1 MIPS: fix elf_check_arch(x)
Signed-off-by Antony Pavlov <[email protected]>
--- arch/mips/include/asm/elf.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
arch/mips/include/asm/elf.h +4 -2
@@ -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. */
Signature · 1 line
2.45.2
Sascha Hauer
AppliedQuoted 1 line · Antony Pavlov
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,
Signature · 1 line
Sascha Hauer <[email protected]>