aout: suppress A.OUT library support if !CONFIG_ARCH_SUPPORTS_AOUT
authorDavid Howells <dhowells@redhat.com>
Fri, 8 Feb 2008 12:19:28 +0000 (04:19 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 8 Feb 2008 17:22:30 +0000 (09:22 -0800)
commit7fa3031500ec9b0a7460c8c23751799006ffee74
tree2a7e9202b35a39dc8217e95825263c0629e67e35
parentb0b933c08bd5fd053bbba8ba6387f543be03d49f
aout: suppress A.OUT library support if !CONFIG_ARCH_SUPPORTS_AOUT

Suppress A.OUT library support if CONFIG_ARCH_SUPPORTS_AOUT is not set.

Not all architectures support the A.OUT binfmt, so the ELF binfmt should not
be permitted to go looking for A.OUT libraries to load in such a case.  Not
only that, but under such conditions A.OUT core dumps are not produced either.

To make this work, this patch also does the following:

 (1) Makes the existence of the contents of linux/a.out.h contingent on
     CONFIG_ARCH_SUPPORTS_AOUT.

 (2) Renames dump_thread() to aout_dump_thread() as it's only called by A.OUT
     core dumping code.

 (3) Moves aout_dump_thread() into asm/a.out-core.h and makes it inline.  This
     is then included only where needed.  This means that this bit of arch
     code will be stored in the appropriate A.OUT binfmt module rather than
     the core kernel.

 (4) Drops A.OUT support for Blackfin (according to Mike Frysinger it's not
     needed) and FRV.

This patch depends on the previous patch to move STACK_TOP[_MAX] out of
asm/a.out.h and into asm/processor.h as they're required whether or not A.OUT
format is available.

[jdike@addtoit.com: uml: re-remove accidentally restored code]
Signed-off-by: David Howells <dhowells@redhat.com>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
25 files changed:
arch/alpha/kernel/process.c
arch/arm/kernel/process.c
arch/m68k/kernel/process.c
arch/sparc/kernel/process.c
arch/sparc/kernel/sparc_ksyms.c
arch/sparc64/kernel/binfmt_aout32.c
arch/sparc64/kernel/process.c
arch/um/kernel/ksyms.c
arch/um/kernel/process.c
arch/x86/kernel/process_32.c
fs/Kconfig.binfmt
fs/binfmt_aout.c
fs/binfmt_elf.c
fs/exec.c
include/asm-alpha/a.out-core.h [new file with mode: 0644]
include/asm-arm/a.out-core.h [new file with mode: 0644]
include/asm-frv/a.out.h [deleted file]
include/asm-generic/Kbuild.asm
include/asm-m68k/a.out-core.h [new file with mode: 0644]
include/asm-sparc/a.out-core.h [new file with mode: 0644]
include/asm-sparc64/a.out-core.h [new file with mode: 0644]
include/asm-um/a.out-core.h [new file with mode: 0644]
include/asm-x86/a.out-core.h [new file with mode: 0644]
include/linux/a.out.h
include/linux/kernel.h