Commit 85f2ada7 authored by Al Viro's avatar Al Viro

x32: make X32, !IA32_EMULATION setups able to execute x32 binaries

It's really trivial - the only wrinkle is making sure that
compiler knows that ia32-related side of COMPAT_ARCH_DLINFO
is dead code on such configs (we don't get there without
having passed compat_elf_check_arch(), and on such configs
that'll fail for ia32 binary).
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 7facdc42
......@@ -2864,7 +2864,6 @@ config IA32_EMULATION
depends on X86_64
select ARCH_WANT_OLD_COMPAT_IPC
select BINFMT_ELF
select COMPAT_BINFMT_ELF
select COMPAT_OLD_SIGACTION
help
Include code to run legacy 32-bit programs under a
......@@ -2900,6 +2899,7 @@ config COMPAT_32
config COMPAT
def_bool y
depends on IA32_EMULATION || X86_X32
select COMPAT_BINFMT_ELF if BINFMT_ELF
if COMPAT
config COMPAT_FOR_U64_ALIGNMENT
......
......@@ -364,7 +364,7 @@ do { \
#define COMPAT_ARCH_DLINFO \
if (exec->e_machine == EM_X86_64) \
ARCH_DLINFO_X32; \
else \
else if (IS_ENABLED(CONFIG_IA32_EMULATION)) \
ARCH_DLINFO_IA32
#define COMPAT_ELF_ET_DYN_BASE (TASK_UNMAPPED_BASE + 0x1000000)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment