diff options
author | David Howells <dhowells@redhat.com> | 2008-02-08 07:19:28 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-08 12:22:30 -0500 |
commit | 7fa3031500ec9b0a7460c8c23751799006ffee74 (patch) | |
tree | 2a7e9202b35a39dc8217e95825263c0629e67e35 /include/linux | |
parent | b0b933c08bd5fd053bbba8ba6387f543be03d49f (diff) |
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>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/a.out.h | 12 | ||||
-rw-r--r-- | include/linux/kernel.h | 2 |
2 files changed, 11 insertions, 3 deletions
diff --git a/include/linux/a.out.h b/include/linux/a.out.h index 82cd918f2ab7..208f4e8ed304 100644 --- a/include/linux/a.out.h +++ b/include/linux/a.out.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef __A_OUT_GNU_H__ | 1 | #ifndef __A_OUT_GNU_H__ |
2 | #define __A_OUT_GNU_H__ | 2 | #define __A_OUT_GNU_H__ |
3 | 3 | ||
4 | #ifdef CONFIG_ARCH_SUPPORTS_AOUT | ||
5 | |||
4 | #define __GNU_EXEC_MACROS__ | 6 | #define __GNU_EXEC_MACROS__ |
5 | 7 | ||
6 | #ifndef __STRUCT_EXEC_OVERRIDE__ | 8 | #ifndef __STRUCT_EXEC_OVERRIDE__ |
@@ -9,6 +11,8 @@ | |||
9 | 11 | ||
10 | #endif /* __STRUCT_EXEC_OVERRIDE__ */ | 12 | #endif /* __STRUCT_EXEC_OVERRIDE__ */ |
11 | 13 | ||
14 | #ifndef __ASSEMBLY__ | ||
15 | |||
12 | /* these go in the N_MACHTYPE field */ | 16 | /* these go in the N_MACHTYPE field */ |
13 | enum machine_type { | 17 | enum machine_type { |
14 | #if defined (M_OLDSUN2) | 18 | #if defined (M_OLDSUN2) |
@@ -272,5 +276,11 @@ struct relocation_info | |||
272 | }; | 276 | }; |
273 | #endif /* no N_RELOCATION_INFO_DECLARED. */ | 277 | #endif /* no N_RELOCATION_INFO_DECLARED. */ |
274 | 278 | ||
275 | 279 | #endif /*__ASSEMBLY__ */ | |
280 | #else /* CONFIG_ARCH_SUPPORTS_AOUT */ | ||
281 | #ifndef __ASSEMBLY__ | ||
282 | struct exec { | ||
283 | }; | ||
284 | #endif | ||
285 | #endif /* CONFIG_ARCH_SUPPORTS_AOUT */ | ||
276 | #endif /* __A_OUT_GNU_H__ */ | 286 | #endif /* __A_OUT_GNU_H__ */ |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 9e01f376840a..568042290c0b 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -172,8 +172,6 @@ extern int kernel_text_address(unsigned long addr); | |||
172 | struct pid; | 172 | struct pid; |
173 | extern struct pid *session_of_pgrp(struct pid *pgrp); | 173 | extern struct pid *session_of_pgrp(struct pid *pgrp); |
174 | 174 | ||
175 | extern void dump_thread(struct pt_regs *regs, struct user *dump); | ||
176 | |||
177 | #ifdef CONFIG_PRINTK | 175 | #ifdef CONFIG_PRINTK |
178 | asmlinkage int vprintk(const char *fmt, va_list args) | 176 | asmlinkage int vprintk(const char *fmt, va_list args) |
179 | __attribute__ ((format (printf, 1, 0))); | 177 | __attribute__ ((format (printf, 1, 0))); |