summaryrefslogtreecommitdiff
path: root/arch/mips/Kconfig
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2020-06-14 00:18:12 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2021-01-06 08:42:49 -0500
commit0bb87f051e4282afb5f472807c7244b21cf515c7 (patch)
tree89d3c3bbcd1f78a1a22303d79e931c7812abf29b /arch/mips/Kconfig
parent2fb33bec053b01e616fab921aab4d4775d374e8f (diff)
downloadlinux-0bb87f051e4282afb5f472807c7244b21cf515c7.tar.gz
mips compat: switch to compat_binfmt_elf.c
Like amd64, mips has two 32bit ABIs - o32 and n32. Unlike amd64, it does not use compat_binfmt_elf.c for either of those; each of those ABIs has a binfmt handler of its own, both very similar to fs/compat_binfmt_elf.c. And the same technics as we use on amd64 can be used to make fs/compat_binfmt_elf.c handle both. * merge elfo32_check_arch() with elfn32_check_arch(), make that serve as compat_elf_check_arch(). Note that SET_PERSONALITY2() is already the same for all ABI variants - it looks at the elf header to choose the flags to set. * add asm/elfcore-compat.h, using the bigger (n32) variant of elf32_prstatus as compat_elf_prstatus there. * make PRSTATUS_SIZE() and SET_PR_FPVALID() choose the right layout, same as done for amd64. test_thread_flag(TIF_32BIT_REGS) is used as the predicate. Voila - we are rid of binfmt_elf{n,o}32.c; fs/compat_binfmt_elf.c is used, same as for all other ELF-supporting 64bit architectures that need 32bit compat. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/mips/Kconfig')
-rw-r--r--arch/mips/Kconfig8
1 files changed, 3 insertions, 5 deletions
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 04aecf51e376..a46423f1cabc 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -92,6 +92,7 @@ config MIPS
select SET_FS
select SYSCTL_EXCEPTION_TRACE
select VIRT_TO_BUS
+ select ARCH_HAS_ELFCORE_COMPAT
config MIPS_FIXUP_BIGPHYS_ADDR
bool
@@ -3277,6 +3278,7 @@ config MIPS32_O32
select ARCH_WANT_OLD_COMPAT_IPC
select COMPAT
select MIPS32_COMPAT
+ select COMPAT_BINFMT_ELF
select SYSVIPC_COMPAT if SYSVIPC
help
Select this option if you want to run o32 binaries. These are pure
@@ -3290,6 +3292,7 @@ config MIPS32_N32
depends on 64BIT
select ARCH_WANT_COMPAT_IPC_PARSE_VERSION
select COMPAT
+ select COMPAT_BINFMT_ELF
select MIPS32_COMPAT
select SYSVIPC_COMPAT if SYSVIPC
help
@@ -3300,11 +3303,6 @@ config MIPS32_N32
If unsure, say N.
-config BINFMT_ELF32
- bool
- default y if MIPS32_O32 || MIPS32_N32
- select ELFCORE
-
menu "Power management options"
config ARCH_HIBERNATION_POSSIBLE