summaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/binfmt_elfo32.c
diff options
context:
space:
mode:
authorMaciej W. Rozycki2016-05-13 08:21:40 +0200
committerRalf Baechle2016-05-13 15:30:25 +0200
commitc9babb1926852d88ebee3c27f2b8bac848560c0e (patch)
treebfa74272fe3443722c9ca338d801e1251c9c03cf /arch/mips/kernel/binfmt_elfo32.c
parentMIPS: ELF: Unify __MIPS_O32_FP64_MUST_BE_ZERO definitions (diff)
downloadkernel-qcow2-linux-c9babb1926852d88ebee3c27f2b8bac848560c0e.tar.gz
kernel-qcow2-linux-c9babb1926852d88ebee3c27f2b8bac848560c0e.tar.xz
kernel-qcow2-linux-c9babb1926852d88ebee3c27f2b8bac848560c0e.zip
MIPS: ELF: Unify ABI classification macros
Remove a duplicate o32 `elf_check_arch' implementation, move all macro variants to <asm/elf.h> and define them unconditionally under indvidual names, substituting alias `elf_check_arch' definitions in variant code. Signed-off-by: Maciej W. Rozycki <macro@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13245/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/binfmt_elfo32.c')
-rw-r--r--arch/mips/kernel/binfmt_elfo32.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/arch/mips/kernel/binfmt_elfo32.c b/arch/mips/kernel/binfmt_elfo32.c
index ca43eaf1734b..49fb881481f7 100644
--- a/arch/mips/kernel/binfmt_elfo32.c
+++ b/arch/mips/kernel/binfmt_elfo32.c
@@ -30,25 +30,7 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
/*
* This is used to ensure we don't load something for the wrong architecture.
*/
-#define elf_check_arch(hdr) \
-({ \
- int __res = 1; \
- struct elfhdr *__h = (hdr); \
- \
- if (!mips_elf_check_machine(__h)) \
- __res = 0; \
- if (__h->e_ident[EI_CLASS] != ELFCLASS32) \
- __res = 0; \
- if ((__h->e_flags & EF_MIPS_ABI2) != 0) \
- __res = 0; \
- if (((__h->e_flags & EF_MIPS_ABI) != 0) && \
- ((__h->e_flags & EF_MIPS_ABI) != EF_MIPS_ABI_O32)) \
- __res = 0; \
- if (__h->e_flags & __MIPS_O32_FP64_MUST_BE_ZERO) \
- __res = 0; \
- \
- __res; \
-})
+#define elf_check_arch elfo32_check_arch
#ifdef CONFIG_KVM_GUEST
#define TASK32_SIZE 0x3fff8000UL