diff options
author | Roland McGrath <roland@redhat.com> | 2008-01-30 07:31:55 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 07:31:55 -0500 |
commit | a97f52e67890fda6b373c1c1895ff1c1c69b36c8 (patch) | |
tree | 3cf522fd85e30519eb8b202c6d4243395ccb8653 /arch/x86 | |
parent | 60b3b9af35aad66345e395be911e46fb8443f0c5 (diff) |
x86: compat_binfmt_elf
This switches x86-64's 32-bit ELF support to use the shared
fs/compat_binfmt_elf.c code instead of our own ia32_binfmt.c.
Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/Kconfig | 1 | ||||
-rw-r--r-- | arch/x86/ia32/Makefile | 3 | ||||
-rw-r--r-- | arch/x86/vdso/vdso32-setup.c | 33 |
3 files changed, 35 insertions, 2 deletions
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 1992b8fe6a2f..d89b94528153 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
@@ -1532,6 +1532,7 @@ source "fs/Kconfig.binfmt" | |||
1532 | config IA32_EMULATION | 1532 | config IA32_EMULATION |
1533 | bool "IA32 Emulation" | 1533 | bool "IA32 Emulation" |
1534 | depends on X86_64 | 1534 | depends on X86_64 |
1535 | select COMPAT_BINFMT_ELF | ||
1535 | help | 1536 | help |
1536 | Include code to run 32-bit programs under a 64-bit kernel. You should | 1537 | Include code to run 32-bit programs under a 64-bit kernel. You should |
1537 | likely turn this on, unless you're 100% sure that you don't have any | 1538 | likely turn this on, unless you're 100% sure that you don't have any |
diff --git a/arch/x86/ia32/Makefile b/arch/x86/ia32/Makefile index 93a6fda65f49..52d0ccfcf6ea 100644 --- a/arch/x86/ia32/Makefile +++ b/arch/x86/ia32/Makefile | |||
@@ -2,8 +2,7 @@ | |||
2 | # Makefile for the ia32 kernel emulation subsystem. | 2 | # Makefile for the ia32 kernel emulation subsystem. |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-$(CONFIG_IA32_EMULATION) := ia32entry.o sys_ia32.o ia32_signal.o \ | 5 | obj-$(CONFIG_IA32_EMULATION) := ia32entry.o sys_ia32.o ia32_signal.o |
6 | ia32_binfmt.o | ||
7 | 6 | ||
8 | sysv-$(CONFIG_SYSVIPC) := ipc32.o | 7 | sysv-$(CONFIG_SYSVIPC) := ipc32.o |
9 | obj-$(CONFIG_IA32_EMULATION) += $(sysv-y) | 8 | obj-$(CONFIG_IA32_EMULATION) += $(sysv-y) |
diff --git a/arch/x86/vdso/vdso32-setup.c b/arch/x86/vdso/vdso32-setup.c index e0feb66a2408..348f1341e1c8 100644 --- a/arch/x86/vdso/vdso32-setup.c +++ b/arch/x86/vdso/vdso32-setup.c | |||
@@ -377,6 +377,39 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int exstack) | |||
377 | 377 | ||
378 | __initcall(sysenter_setup); | 378 | __initcall(sysenter_setup); |
379 | 379 | ||
380 | #ifdef CONFIG_SYSCTL | ||
381 | /* Register vsyscall32 into the ABI table */ | ||
382 | #include <linux/sysctl.h> | ||
383 | |||
384 | static ctl_table abi_table2[] = { | ||
385 | { | ||
386 | .procname = "vsyscall32", | ||
387 | .data = &sysctl_vsyscall32, | ||
388 | .maxlen = sizeof(int), | ||
389 | .mode = 0644, | ||
390 | .proc_handler = proc_dointvec | ||
391 | }, | ||
392 | {} | ||
393 | }; | ||
394 | |||
395 | static ctl_table abi_root_table2[] = { | ||
396 | { | ||
397 | .ctl_name = CTL_ABI, | ||
398 | .procname = "abi", | ||
399 | .mode = 0555, | ||
400 | .child = abi_table2 | ||
401 | }, | ||
402 | {} | ||
403 | }; | ||
404 | |||
405 | static __init int ia32_binfmt_init(void) | ||
406 | { | ||
407 | register_sysctl_table(abi_root_table2); | ||
408 | return 0; | ||
409 | } | ||
410 | __initcall(ia32_binfmt_init); | ||
411 | #endif | ||
412 | |||
380 | #else /* CONFIG_X86_32 */ | 413 | #else /* CONFIG_X86_32 */ |
381 | 414 | ||
382 | const char *arch_vma_name(struct vm_area_struct *vma) | 415 | const char *arch_vma_name(struct vm_area_struct *vma) |