public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] export linux/a.out.h
@ 2008-06-15 21:07 Peter Korsgaard
  2008-06-15 21:32 ` David Woodhouse
  2008-06-15 22:33 ` [PATCH] " Arjan van de Ven
  0 siblings, 2 replies; 41+ messages in thread
From: Peter Korsgaard @ 2008-06-15 21:07 UTC (permalink / raw)
  To: linux-kernel, dwmw2, sam; +Cc: Peter Korsgaard

Export linux/a.out.h like we do for asm/a.out.h as some applications needs
it (E.G. valgrind). One minor complication is that the interesting stuff is
protected by an CONFIG_ARCH_SUPPORTS_AOUT ifdef, so make sure that gets
defined for unifdef.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 include/linux/Kbuild |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index 93b9885..d998fc7 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -162,6 +162,8 @@ header-y += video_encoder.h
 header-y += videotext.h
 header-y += x25.h
 
+UNIFDEF += -DCONFIG_ARCH_SUPPORTS_AOUT
+unifdef-y += a.out.h
 unifdef-y += acct.h
 unifdef-y += adb.h
 unifdef-y += adfs_fs.h
-- 
1.5.5.1


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* Re: [PATCH] export linux/a.out.h
  2008-06-15 21:07 [PATCH] export linux/a.out.h Peter Korsgaard
@ 2008-06-15 21:32 ` David Woodhouse
  2008-06-16  8:29   ` [PATCH v2] " Peter Korsgaard
  2008-06-15 22:33 ` [PATCH] " Arjan van de Ven
  1 sibling, 1 reply; 41+ messages in thread
From: David Woodhouse @ 2008-06-15 21:32 UTC (permalink / raw)
  To: Peter Korsgaard; +Cc: linux-kernel, sam

On Sun, 2008-06-15 at 23:07 +0200, Peter Korsgaard wrote:
> Export linux/a.out.h like we do for asm/a.out.h as some applications needs
> it (E.G. valgrind). One minor complication is that the interesting stuff is
> protected by an CONFIG_ARCH_SUPPORTS_AOUT ifdef, so make sure that gets
> defined for unifdef.

No, let's fix the file instead. We should never have wrapped its
contents in CONFIG_ARCH_SUPPORTS_AOUT in the first place.

And we don't want to export it unconditionally. We want something like
we already have in include/asm-generic/Kbuild.asm:

ifeq ($(wildcard include/asm-$(SRCARCH)/a.out.h),include/asm-$(SRCARCH)/a.out.h)
unifdef-y += a.out.h
endif

-- 
dwmw2


^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PATCH] export linux/a.out.h
  2008-06-15 21:07 [PATCH] export linux/a.out.h Peter Korsgaard
  2008-06-15 21:32 ` David Woodhouse
@ 2008-06-15 22:33 ` Arjan van de Ven
  2008-06-16  7:03   ` Peter Korsgaard
  1 sibling, 1 reply; 41+ messages in thread
From: Arjan van de Ven @ 2008-06-15 22:33 UTC (permalink / raw)
  To: Peter Korsgaard; +Cc: linux-kernel, dwmw2, sam, Peter Korsgaard

On Sun, 15 Jun 2008 23:07:01 +0200
Peter Korsgaard <jacmet@sunsite.dk> wrote:

> Export linux/a.out.h like we do for asm/a.out.h as some applications
> needs it (E.G. valgrind). 

do we know what they need it for?

-- 
If you want to reach me at my work email, use arjan@linux.intel.com
For development, discussion and tips for power savings, 
visit http://www.lesswatts.org

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PATCH] export linux/a.out.h
  2008-06-15 22:33 ` [PATCH] " Arjan van de Ven
@ 2008-06-16  7:03   ` Peter Korsgaard
  0 siblings, 0 replies; 41+ messages in thread
From: Peter Korsgaard @ 2008-06-16  7:03 UTC (permalink / raw)
  To: Arjan van de Ven; +Cc: linux-kernel, dwmw2, sam

>>>>> "Arjan" == Arjan van de Ven <arjan@infradead.org> writes:

Hi,

 >> Export linux/a.out.h like we do for asm/a.out.h as some applications
 >> needs it (E.G. valgrind). 

 Arjan> do we know what they need it for?

>From a quick look at the valgrind code - struct nlist for stabs
parsing.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 41+ messages in thread

* [PATCH v2] export linux/a.out.h
  2008-06-15 21:32 ` David Woodhouse
@ 2008-06-16  8:29   ` Peter Korsgaard
  2008-06-16 12:01     ` David Woodhouse
  0 siblings, 1 reply; 41+ messages in thread
From: Peter Korsgaard @ 2008-06-16  8:29 UTC (permalink / raw)
  To: linux-kernel, dwmw2, sam; +Cc: Peter Korsgaard

Export linux/a.out.h like we do for asm/a.out.h as some applications needs
it (E.G. valgrind). One minor complication is that the content is protected
by an CONFIG_ARCH_SUPPORTS_AOUT ifdef, so get rid of it.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 include/linux/Kbuild  |    3 +++
 include/linux/a.out.h |    8 --------
 2 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index 93b9885..e61f1f9 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -162,6 +162,9 @@ header-y += video_encoder.h
 header-y += videotext.h
 header-y += x25.h
 
+ifeq ($(wildcard include/asm-$(SRCARCH)/a.out.h),include/asm-$(SRCARCH)/a.out.h)
+unifdef-y += a.out.h
+endif
 unifdef-y += acct.h
 unifdef-y += adb.h
 unifdef-y += adfs_fs.h
diff --git a/include/linux/a.out.h b/include/linux/a.out.h
index 208f4e8..e86dfca 100644
--- a/include/linux/a.out.h
+++ b/include/linux/a.out.h
@@ -1,8 +1,6 @@
 #ifndef __A_OUT_GNU_H__
 #define __A_OUT_GNU_H__
 
-#ifdef CONFIG_ARCH_SUPPORTS_AOUT
-
 #define __GNU_EXEC_MACROS__
 
 #ifndef __STRUCT_EXEC_OVERRIDE__
@@ -277,10 +275,4 @@ struct relocation_info
 #endif /* no N_RELOCATION_INFO_DECLARED.  */
 
 #endif /*__ASSEMBLY__ */
-#else /* CONFIG_ARCH_SUPPORTS_AOUT */
-#ifndef __ASSEMBLY__
-struct exec {
-};
-#endif
-#endif /* CONFIG_ARCH_SUPPORTS_AOUT */
 #endif /* __A_OUT_GNU_H__ */
-- 
1.5.5.1


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 1/4] Include <asm/a.out.h> in fs/exec.c only for Alpha.
  2008-06-16 12:20       ` [PATCH v2] export linux/a.out.h Peter Korsgaard
@ 2008-06-16 11:11         ` David Woodhouse
  2008-06-16 11:18         ` [PATCH 2/4] Remove last traces of a.out support from ELF loader David Woodhouse
                           ` (3 subsequent siblings)
  4 siblings, 0 replies; 41+ messages in thread
From: David Woodhouse @ 2008-06-16 11:11 UTC (permalink / raw)
  To: torvalds; +Cc: jacmet, dhowells, k.shutemov, linux-kernel

We only need it for the /sbin/loader hack for OSF/1 executables, and we
don't want to include it otherwise.

While we're at it, remove the redundant '&& CONFIG_ARCH_SUPPORTS_AOUT'
in the ifdef around that code. It's already dependent on __alpha__, and
CONFIG_ARCH_SUPPORTS_AOUT is hard-coded to 'y' there.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 fs/exec.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/fs/exec.c b/fs/exec.c
index 9448f1b..da94a6f 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -26,7 +26,6 @@
 #include <linux/file.h>
 #include <linux/fdtable.h>
 #include <linux/mman.h>
-#include <linux/a.out.h>
 #include <linux/stat.h>
 #include <linux/fcntl.h>
 #include <linux/smp_lock.h>
@@ -61,6 +60,11 @@
 #include <linux/kmod.h>
 #endif
 
+#ifdef __alpha__
+/* for /sbin/loader handling in search_binary_handler() */
+#include <linux/a.out.h>
+#endif
+
 int core_uses_pid;
 char core_pattern[CORENAME_MAX_SIZE] = "core";
 int suid_dumpable = 0;
@@ -1155,7 +1159,7 @@ int search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs)
 {
 	int try,retval;
 	struct linux_binfmt *fmt;
-#if defined(__alpha__) && defined(CONFIG_ARCH_SUPPORTS_AOUT)
+#ifdef __alpha__
 	/* handle /sbin/loader.. */
 	{
 	    struct exec * eh = (struct exec *) bprm->buf;
-- 
1.5.5.1


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 2/4] Remove last traces of a.out support from ELF loader.
  2008-06-16 12:20       ` [PATCH v2] export linux/a.out.h Peter Korsgaard
  2008-06-16 11:11         ` [PATCH 1/4] Include <asm/a.out.h> in fs/exec.c only for Alpha David Woodhouse
@ 2008-06-16 11:18         ` David Woodhouse
  2008-06-16 11:18         ` [PATCH 3/4] Remove #ifdef CONFIG_ARCH_SUPPORTS_AOUT from <linux/a.out.h> David Woodhouse
                           ` (2 subsequent siblings)
  4 siblings, 0 replies; 41+ messages in thread
From: David Woodhouse @ 2008-06-16 11:18 UTC (permalink / raw)
  To: torvalds; +Cc: jacmet, dhowells, k.shutemov, linux-kernel

In commit d20894a23708c2af75966534f8e4dedb46d48db2, Andi removed support
for a.out interpreters from the ELF loader, which was only ever needed
for the transition from a.out to ELF.

This removes the last traces of that support, in particular the
inclusion of <linux/a.out.h>.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 fs/binfmt_elf.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index 0fa95b1..d48ff5f 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -16,7 +16,6 @@
 #include <linux/time.h>
 #include <linux/mm.h>
 #include <linux/mman.h>
-#include <linux/a.out.h>
 #include <linux/errno.h>
 #include <linux/signal.h>
 #include <linux/binfmts.h>
@@ -548,7 +547,6 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
 	struct {
 		struct elfhdr elf_ex;
 		struct elfhdr interp_elf_ex;
-  		struct exec interp_ex;
 	} *loc;
 
 	loc = kmalloc(sizeof(*loc), GFP_KERNEL);
@@ -680,7 +678,6 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
 			}
 
 			/* Get the exec headers */
-			loc->interp_ex = *((struct exec *)bprm->buf);
 			loc->interp_elf_ex = *((struct elfhdr *)bprm->buf);
 			break;
 		}
-- 
1.5.5.1


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 3/4] Remove #ifdef CONFIG_ARCH_SUPPORTS_AOUT from <linux/a.out.h>
  2008-06-16 12:20       ` [PATCH v2] export linux/a.out.h Peter Korsgaard
  2008-06-16 11:11         ` [PATCH 1/4] Include <asm/a.out.h> in fs/exec.c only for Alpha David Woodhouse
  2008-06-16 11:18         ` [PATCH 2/4] Remove last traces of a.out support from ELF loader David Woodhouse
@ 2008-06-16 11:18         ` David Woodhouse
  2008-06-16 11:24         ` [PATCH 4/4] Export <linux/a.out.h> to userspace again David Woodhouse
  2008-06-16 13:22         ` [PATCH v2] export linux/a.out.h David Woodhouse
  4 siblings, 0 replies; 41+ messages in thread
From: David Woodhouse @ 2008-06-16 11:18 UTC (permalink / raw)
  To: torvalds; +Cc: jacmet, dhowells, k.shutemov, linux-kernel

This file is only included where it makes sense now, so there's no need
for the CONFIG_ARCH_SUPPORTS_AOUT conditional -- and that conditional is
bad, because we want to export <linux/a.out.h> to userspace.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 include/linux/a.out.h |    8 --------
 1 files changed, 0 insertions(+), 8 deletions(-)

diff --git a/include/linux/a.out.h b/include/linux/a.out.h
index 208f4e8..e86dfca 100644
--- a/include/linux/a.out.h
+++ b/include/linux/a.out.h
@@ -1,8 +1,6 @@
 #ifndef __A_OUT_GNU_H__
 #define __A_OUT_GNU_H__
 
-#ifdef CONFIG_ARCH_SUPPORTS_AOUT
-
 #define __GNU_EXEC_MACROS__
 
 #ifndef __STRUCT_EXEC_OVERRIDE__
@@ -277,10 +275,4 @@ struct relocation_info
 #endif /* no N_RELOCATION_INFO_DECLARED.  */
 
 #endif /*__ASSEMBLY__ */
-#else /* CONFIG_ARCH_SUPPORTS_AOUT */
-#ifndef __ASSEMBLY__
-struct exec {
-};
-#endif
-#endif /* CONFIG_ARCH_SUPPORTS_AOUT */
 #endif /* __A_OUT_GNU_H__ */
-- 
1.5.5.1


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 4/4] Export <linux/a.out.h> to userspace again.
  2008-06-16 12:20       ` [PATCH v2] export linux/a.out.h Peter Korsgaard
                           ` (2 preceding siblings ...)
  2008-06-16 11:18         ` [PATCH 3/4] Remove #ifdef CONFIG_ARCH_SUPPORTS_AOUT from <linux/a.out.h> David Woodhouse
@ 2008-06-16 11:24         ` David Woodhouse
  2008-06-16 13:22         ` [PATCH v2] export linux/a.out.h David Woodhouse
  4 siblings, 0 replies; 41+ messages in thread
From: David Woodhouse @ 2008-06-16 11:24 UTC (permalink / raw)
  To: torvalds; +Cc: jacmet, dhowells, k.shutemov, linux-kernel

This seems to have been removed accidentally in commit
ed7b1889da256977574663689b598d88950bbd23, but wasn't supposed to have
been -- the original patch at http://lkml.org/lkml/2007/10/30/144 just
moved it from $(header-y) to $(unifdef-y)

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 include/linux/Kbuild |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index 93b9885..b6fbb25 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -166,6 +166,9 @@ unifdef-y += acct.h
 unifdef-y += adb.h
 unifdef-y += adfs_fs.h
 unifdef-y += agpgart.h
+ifeq ($(wildcard include/asm-$(SRCARCH)/a.out.h),include/asm-$(SRCARCH)/a.out.h)
+unifdef-y += a.out.h
+endif
 unifdef-y += apm_bios.h
 unifdef-y += atalk.h
 unifdef-y += atmdev.h
-- 
1.5.5.1


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* Re: [PATCH v2] export linux/a.out.h
  2008-06-16  8:29   ` [PATCH v2] " Peter Korsgaard
@ 2008-06-16 12:01     ` David Woodhouse
  2008-06-16 12:17       ` Adrian Bunk
                         ` (2 more replies)
  0 siblings, 3 replies; 41+ messages in thread
From: David Woodhouse @ 2008-06-16 12:01 UTC (permalink / raw)
  To: Peter Korsgaard; +Cc: linux-kernel, sam, dhowells, andi, Kirill A. Shutemov

On Mon, 2008-06-16 at 10:29 +0200, Peter Korsgaard wrote:
> Export linux/a.out.h like we do for asm/a.out.h as some applications needs
> it (E.G. valgrind). One minor complication is that the content is protected
> by an CONFIG_ARCH_SUPPORTS_AOUT ifdef, so get rid of it.

There was a _reason_ for that ifdef, although on reflection probably not
a particularly good one. But unless we remove the reason for that ifdef,
your patch will break compilation on architectures which don't have
<asm/a.out.h>.

We should get rid of CONFIG_ARCH_SUPPORTS_AOUT entirely. The only
remaining users of it are fs/exec.c, which uses it entirely redundantly:
	#if defined(__alpha__) && defined(CONFIG_ARCH_SUPPORTS_AOUT)

...and (indirectly, by virtue of being the only other file that includes
<linux/a.out.h> when ARCH_SUPPORTS_AOUT might be unset) fs/binfmt_elf.c,
which still has unnecessary references to 'struct exec' even though Andi
removed the support for a.out interpreters a few months ago. That can
just go away.

Please see  git.infradead.org/users/dwmw2/aout-2.6.git

David Woodhouse (6):
      Include <asm/a.out.h> in fs/exec.c only for Alpha.
      Remove last traces of a.out support from ELF loader.
      Remove #ifdef CONFIG_ARCH_SUPPORTS_AOUT from <linux/a.out.h>
      Export <linux/a.out.h> to userspace again.
      Remove redundant CONFIG_ARCH_SUPPORTS_AOUT
      Remove references to now-defunct CONFIG_ARCH_SUPPORTS_AOUT from defconfigs

The first four are shown below, as a single combined patch.

diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index 0fa95b1..d48ff5f 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -16,7 +16,6 @@
 #include <linux/time.h>
 #include <linux/mm.h>
 #include <linux/mman.h>
-#include <linux/a.out.h>
 #include <linux/errno.h>
 #include <linux/signal.h>
 #include <linux/binfmts.h>
@@ -548,7 +547,6 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
 	struct {
 		struct elfhdr elf_ex;
 		struct elfhdr interp_elf_ex;
-  		struct exec interp_ex;
 	} *loc;
 
 	loc = kmalloc(sizeof(*loc), GFP_KERNEL);
@@ -680,7 +678,6 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
 			}
 
 			/* Get the exec headers */
-			loc->interp_ex = *((struct exec *)bprm->buf);
 			loc->interp_elf_ex = *((struct elfhdr *)bprm->buf);
 			break;
 		}
diff --git a/fs/exec.c b/fs/exec.c
index 9448f1b..da94a6f 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -26,7 +26,6 @@
 #include <linux/file.h>
 #include <linux/fdtable.h>
 #include <linux/mman.h>
-#include <linux/a.out.h>
 #include <linux/stat.h>
 #include <linux/fcntl.h>
 #include <linux/smp_lock.h>
@@ -61,6 +60,11 @@
 #include <linux/kmod.h>
 #endif
 
+#ifdef __alpha__
+/* for /sbin/loader handling in search_binary_handler() */
+#include <linux/a.out.h>
+#endif
+
 int core_uses_pid;
 char core_pattern[CORENAME_MAX_SIZE] = "core";
 int suid_dumpable = 0;
@@ -1155,7 +1159,7 @@ int search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs)
 {
 	int try,retval;
 	struct linux_binfmt *fmt;
-#if defined(__alpha__) && defined(CONFIG_ARCH_SUPPORTS_AOUT)
+#ifdef __alpha__
 	/* handle /sbin/loader.. */
 	{
 	    struct exec * eh = (struct exec *) bprm->buf;
diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index 93b9885..b6fbb25 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -166,6 +166,9 @@ unifdef-y += acct.h
 unifdef-y += adb.h
 unifdef-y += adfs_fs.h
 unifdef-y += agpgart.h
+ifeq ($(wildcard include/asm-$(SRCARCH)/a.out.h),include/asm-$(SRCARCH)/a.out.h)
+unifdef-y += a.out.h
+endif
 unifdef-y += apm_bios.h
 unifdef-y += atalk.h
 unifdef-y += atmdev.h
diff --git a/include/linux/a.out.h b/include/linux/a.out.h
index 208f4e8..e86dfca 100644
--- a/include/linux/a.out.h
+++ b/include/linux/a.out.h
@@ -1,8 +1,6 @@
 #ifndef __A_OUT_GNU_H__
 #define __A_OUT_GNU_H__
 
-#ifdef CONFIG_ARCH_SUPPORTS_AOUT
-
 #define __GNU_EXEC_MACROS__
 
 #ifndef __STRUCT_EXEC_OVERRIDE__
@@ -277,10 +275,4 @@ struct relocation_info
 #endif /* no N_RELOCATION_INFO_DECLARED.  */
 
 #endif /*__ASSEMBLY__ */
-#else /* CONFIG_ARCH_SUPPORTS_AOUT */
-#ifndef __ASSEMBLY__
-struct exec {
-};
-#endif
-#endif /* CONFIG_ARCH_SUPPORTS_AOUT */
 #endif /* __A_OUT_GNU_H__ */

-- 
dwmw2


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* Re: [PATCH v2] export linux/a.out.h
  2008-06-16 12:01     ` David Woodhouse
@ 2008-06-16 12:17       ` Adrian Bunk
  2008-06-16 12:26         ` David Woodhouse
  2008-06-16 12:20       ` [PATCH v2] export linux/a.out.h Peter Korsgaard
  2008-06-16 14:40       ` Andi Kleen
  2 siblings, 1 reply; 41+ messages in thread
From: Adrian Bunk @ 2008-06-16 12:17 UTC (permalink / raw)
  To: David Woodhouse
  Cc: Peter Korsgaard, linux-kernel, sam, dhowells, andi,
	Kirill A. Shutemov

On Mon, Jun 16, 2008 at 01:01:03PM +0100, David Woodhouse wrote:
>...
> David Woodhouse (6):
>...
>       Remove references to now-defunct CONFIG_ARCH_SUPPORTS_AOUT from defconfigs

Please don't do this kind of defconfig updates - it doesn't bring any 
advantage but can create tons of patch conflicts.

The next time a defconfig gets updated it will anyway automatically be 
fixed, and for defconfigs that aren't updated it doesn't create any 
problems to keep them as they are today until they might one day get 
updated.

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PATCH v2] export linux/a.out.h
  2008-06-16 12:01     ` David Woodhouse
  2008-06-16 12:17       ` Adrian Bunk
@ 2008-06-16 12:20       ` Peter Korsgaard
  2008-06-16 11:11         ` [PATCH 1/4] Include <asm/a.out.h> in fs/exec.c only for Alpha David Woodhouse
                           ` (4 more replies)
  2008-06-16 14:40       ` Andi Kleen
  2 siblings, 5 replies; 41+ messages in thread
From: Peter Korsgaard @ 2008-06-16 12:20 UTC (permalink / raw)
  To: David Woodhouse; +Cc: linux-kernel, sam, dhowells, andi, Kirill A. Shutemov

>>>>> "David" == David Woodhouse <dwmw2@infradead.org> writes:

Hi,

 David> Please see  git.infradead.org/users/dwmw2/aout-2.6.git

 David> David Woodhouse (6):
 David>       Include <asm/a.out.h> in fs/exec.c only for Alpha.
 David>       Remove last traces of a.out support from ELF loader.
 David>       Remove #ifdef CONFIG_ARCH_SUPPORTS_AOUT from <linux/a.out.h>
 David>       Export <linux/a.out.h> to userspace again.
 David>       Remove redundant CONFIG_ARCH_SUPPORTS_AOUT
 David>       Remove references to now-defunct CONFIG_ARCH_SUPPORTS_AOUT from defconfigs

 David> The first four are shown below, as a single combined patch.

Thanks David, looks good to me.

Acked-by: Peter Korsgaard <jacmet@sunsite.dk>

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PATCH v2] export linux/a.out.h
  2008-06-16 12:17       ` Adrian Bunk
@ 2008-06-16 12:26         ` David Woodhouse
  2008-06-16 13:48           ` David Howells
  2008-06-17  8:42           ` architectures with ARCH_SUPPORTS_AOUT but no binfmt_aout Adrian Bunk
  0 siblings, 2 replies; 41+ messages in thread
From: David Woodhouse @ 2008-06-16 12:26 UTC (permalink / raw)
  To: Adrian Bunk
  Cc: Peter Korsgaard, linux-kernel, sam, dhowells, andi,
	Kirill A. Shutemov

On Mon, 2008-06-16 at 15:17 +0300, Adrian Bunk wrote:
> On Mon, Jun 16, 2008 at 01:01:03PM +0100, David Woodhouse wrote:
> >...
> > David Woodhouse (6):
> >...
> >       Remove references to now-defunct CONFIG_ARCH_SUPPORTS_AOUT from defconfigs
> 
> Please don't do this kind of defconfig updates - it doesn't bring any 
> advantage but can create tons of patch conflicts.
> 
> The next time a defconfig gets updated it will anyway automatically be 
> fixed, and for defconfigs that aren't updated it doesn't create any 
> problems to keep them as they are today until they might one day get 
> updated.

OK. I did wonder about that, which is why I did it in a separate patch.

Actually, I think we can drop the preceding patch too -- it's not
necessary to fix the regression in 2.6.26, and dhowells suggests that we
might still want to use ARCH_SUPPORTS_AOUT, by making BINFMT_AOUT depend
on it instead of that hard-coded list of architectures.

If we do that, then ARCH_SUPPORTS_AOUT would need to be defined on a
different set of architectures to the ones it's currently defined on --
so I don't really want to go there before 2.6.26. I'll push just the
parts which were included in the mail I just sent.

Why _are_ there architectures which define ARCH_SUPPORTS_AOUT and have
<asm/a.out.h> but don't support binfmt_aout, anyway? How does that make
sense?

-- 
dwmw2


^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PATCH v2] export linux/a.out.h
  2008-06-16 12:20       ` [PATCH v2] export linux/a.out.h Peter Korsgaard
                           ` (3 preceding siblings ...)
  2008-06-16 11:24         ` [PATCH 4/4] Export <linux/a.out.h> to userspace again David Woodhouse
@ 2008-06-16 13:22         ` David Woodhouse
  4 siblings, 0 replies; 41+ messages in thread
From: David Woodhouse @ 2008-06-16 13:22 UTC (permalink / raw)
  To: Peter Korsgaard, torvalds
  Cc: linux-kernel, sam, dhowells, andi, Kirill A. Shutemov

On Mon, 2008-06-16 at 14:20 +0200, Peter Korsgaard wrote:
> David Woodhouse <dwmw2@infradead.org> writes:
> > On Mon, 2008-06-16 at 10:29 +0200, Peter Korsgaard wrote:
> > > Export linux/a.out.h like we do for asm/a.out.h as some applications needs
> > > it (E.G. valgrind). One minor complication is that the content is protected
> > > by an CONFIG_ARCH_SUPPORTS_AOUT ifdef, so get rid of it.
> >
> > There was a _reason_ for that ifdef, although on reflection probably not
> > a particularly good one. But unless we remove the reason for that ifdef,
> > your patch will break compilation on architectures which don't have
> > <asm/a.out.h>.
> > 
> > We should get rid of CONFIG_ARCH_SUPPORTS_AOUT entirely. The only
> > remaining users of it are fs/exec.c, which uses it entirely redundantly:
> >         #if defined(__alpha__) && defined(CONFIG_ARCH_SUPPORTS_AOUT)
> > 
> > ...and (indirectly, by virtue of being the only other file that includes
> > <linux/a.out.h> when ARCH_SUPPORTS_AOUT might be unset) fs/binfmt_elf.c,
> > which still has unnecessary references to 'struct exec' even though Andi
> > removed the support for a.out interpreters a few months ago. That can
> > just go away.
>>
> > Please see  git.infradead.org/users/dwmw2/aout-2.6.git
> >
> > David Woodhouse (6):
> >       Include <asm/a.out.h> in fs/exec.c only for Alpha.
> >       Remove last traces of a.out support from ELF loader.
> >       Remove #ifdef CONFIG_ARCH_SUPPORTS_AOUT from <linux/a.out.h>
> >       Export <linux/a.out.h> to userspace again.
> >       Remove redundant CONFIG_ARCH_SUPPORTS_AOUT
> >       Remove references to now-defunct CONFIG_ARCH_SUPPORTS_AOUT from defconfigs
> >
> > The first four are shown below, as a single combined patch.
> 
> Thanks David, looks good to me.
> 
> Acked-by: Peter Korsgaard <jacmet@sunsite.dk>

OK, I'll send just those first four on to Linus for 2.6.26 to fix the
<linux/a.out.h> regression. The rest can wait till later, as discussed.

-- 
dwmw2


^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PATCH v2] export linux/a.out.h
  2008-06-16 12:26         ` David Woodhouse
@ 2008-06-16 13:48           ` David Howells
  2008-06-16 15:47             ` David Woodhouse
  2008-06-17  8:42           ` architectures with ARCH_SUPPORTS_AOUT but no binfmt_aout Adrian Bunk
  1 sibling, 1 reply; 41+ messages in thread
From: David Howells @ 2008-06-16 13:48 UTC (permalink / raw)
  To: David Woodhouse
  Cc: dhowells, Adrian Bunk, Peter Korsgaard, linux-kernel, sam, andi,
	Kirill A. Shutemov

David Woodhouse <dwmw2@infradead.org> wrote:

> Why _are_ there architectures which define ARCH_SUPPORTS_AOUT and have
> <asm/a.out.h> but don't support binfmt_aout, anyway? How does that make
> sense?

Maybe because some arches supported ELF with AOUT interpreters but not full
AOUT binaries?

David

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PATCH v2] export linux/a.out.h
  2008-06-16 12:01     ` David Woodhouse
  2008-06-16 12:17       ` Adrian Bunk
  2008-06-16 12:20       ` [PATCH v2] export linux/a.out.h Peter Korsgaard
@ 2008-06-16 14:40       ` Andi Kleen
  2008-06-16 15:15         ` David Woodhouse
  2 siblings, 1 reply; 41+ messages in thread
From: Andi Kleen @ 2008-06-16 14:40 UTC (permalink / raw)
  To: David Woodhouse
  Cc: Peter Korsgaard, linux-kernel, sam, dhowells, Kirill A. Shutemov,
	rth


> 
> ...and (indirectly, by virtue of being the only other file that includes
> <linux/a.out.h> when ARCH_SUPPORTS_AOUT might be unset) fs/binfmt_elf.c,
> which still has unnecessary references to 'struct exec' even though Andi
> removed the support for a.out interpreters a few months ago. That can
> just go away.

I didn't think the Alpha /sbin/loader stuff was an a.out interpreter for ELF.

Also pure a.out is still supported.

It might be ok to remove it anyways, but you should check with someone
who knows Alpha first. cc Richard.


-Andi

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PATCH v2] export linux/a.out.h
  2008-06-16 14:40       ` Andi Kleen
@ 2008-06-16 15:15         ` David Woodhouse
  0 siblings, 0 replies; 41+ messages in thread
From: David Woodhouse @ 2008-06-16 15:15 UTC (permalink / raw)
  To: Andi Kleen
  Cc: Peter Korsgaard, linux-kernel, sam, dhowells, Kirill A. Shutemov,
	rth

On Mon, 2008-06-16 at 16:40 +0200, Andi Kleen wrote:
> >  We should get rid of CONFIG_ARCH_SUPPORTS_AOUT entirely. The only
> > remaining users of it are fs/exec.c, which uses it entirely redundantly:
> >	#if defined(__alpha__) && defined(CONFIG_ARCH_SUPPORTS_AOUT)
> >
> > ...and (indirectly, by virtue of being the only other file that includes
> > <linux/a.out.h> when ARCH_SUPPORTS_AOUT might be unset) fs/binfmt_elf.c,
> > which still has unnecessary references to 'struct exec' even though Andi
> > removed the support for a.out interpreters a few months ago. That can
> > just go away.
> 
> I didn't think the Alpha /sbin/loader stuff was an a.out interpreter for ELF.
>
> Also pure a.out is still supported.
> 
> It might be ok to remove it anyways, but you should check with someone
> who knows Alpha first. cc Richard.

The Alpha /sbin/loader support, and the a.out-interpreter-for-ELF, are
two completely separate issues -- you're right that /sbin/loader isn't
an a.out interpreter for ELF files.

They're the two places which rely on '#ifdef CONFIG_ARCH_SUPPORTS_AOUT'
in <linux/a.out.h>, because they include <linux/a.out.h> on platforms
which might not have <asm/a.out.h>.

In the Alpha case in fs/exec.c, we can simply include <linux/a.out.h>
only #ifdef __alpha__ -- while noting that that code could probably do
with a little more cleanup and turning into a properly registered binfmt
rather than a special case, if possible.

In the case of fs/binfmt_elf.c, we can simply remove the inclusion of
<linux/a.out.h> and all references to 'struct exec'. You removed the
rest of the a.out interpreter support already; that last part probably
should have gone away at the same time.

Proper a.out support in fs/binfmt_aout.c can stay as it is; you won't be
building binfmt_aout.c unless your platform supports a.out anyway.

And then we can remove the #ifdef CONFIG_ARCH_SUPPORTS_AOUT in
<linux/a.out.h>, and export it to userspace again, which was the point
of Peter's patch that started this thread.

-- 
dwmw2


^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PATCH v2] export linux/a.out.h
  2008-06-16 13:48           ` David Howells
@ 2008-06-16 15:47             ` David Woodhouse
  0 siblings, 0 replies; 41+ messages in thread
From: David Woodhouse @ 2008-06-16 15:47 UTC (permalink / raw)
  To: David Howells
  Cc: Adrian Bunk, Peter Korsgaard, linux-kernel, sam, andi,
	Kirill A. Shutemov

On Mon, 2008-06-16 at 14:48 +0100, David Howells wrote:
> David Woodhouse <dwmw2@infradead.org> wrote:
> 
> > Why _are_ there architectures which define ARCH_SUPPORTS_AOUT and have
> > <asm/a.out.h> but don't support binfmt_aout, anyway? How does that make
> > sense?
> 
> Maybe because some arches supported ELF with AOUT interpreters but not full
> AOUT binaries?

Is that sane? I thought a.out interpreters for ELF were a transitional
thing to cope with moving from a.out to ELF. Would anyone really do that
unless they had real a.out support in the first place?

I'm more inclined to believe that they just blindly copied <asm/user.h>
from i386 when the arch was created, and then later got
ARCH_SUPPORTS_AOUT defined for that arch because they had a
<asm/a.out.h>.

I suspect we could actually just remove <asm/a.out.h> for all
architectures except Alpha, x86, ARM and m68k. We'd probably have to
remove inclusions of <linux/a.out.h> from a few places in arch code, but
all of them will turn out to be gratuitous anyway.

-- 
dwmw2


^ permalink raw reply	[flat|nested] 41+ messages in thread

* architectures with ARCH_SUPPORTS_AOUT but no binfmt_aout
  2008-06-16 12:26         ` David Woodhouse
  2008-06-16 13:48           ` David Howells
@ 2008-06-17  8:42           ` Adrian Bunk
  2008-06-17  9:46             ` David Woodhouse
                               ` (2 more replies)
  1 sibling, 3 replies; 41+ messages in thread
From: Adrian Bunk @ 2008-06-17  8:42 UTC (permalink / raw)
  To: David Woodhouse
  Cc: Peter Korsgaard, linux-kernel, sam, dhowells, andi,
	Kirill A. Shutemov, ysato, takata, linux-m32r, kyle, matthew,
	grundler, linux-parisc, lethal, linux-sh

On Mon, Jun 16, 2008 at 01:26:54PM +0100, David Woodhouse wrote:
>...
> Actually, I think we can drop the preceding patch too -- it's not
> necessary to fix the regression in 2.6.26, and dhowells suggests that we
> might still want to use ARCH_SUPPORTS_AOUT, by making BINFMT_AOUT depend
> on it instead of that hard-coded list of architectures.
> 
> If we do that, then ARCH_SUPPORTS_AOUT would need to be defined on a
> different set of architectures to the ones it's currently defined on --
> so I don't really want to go there before 2.6.26. I'll push just the
> parts which were included in the mail I just sent.
> 
> Why _are_ there architectures which define ARCH_SUPPORTS_AOUT and have
> <asm/a.out.h> but don't support binfmt_aout, anyway? How does that make
> sense?

My guess would be that binfmt_aout isn't actually used there.

The affected architectures are:
- h8300
- m32r
- parisc
- sh
- v850

v850 is broken beyond repair, and I hope my patch to remove the 
architecture will make it into 2.6.27.

For the other 4 architectures I have Cc'ed the architecture maintainers.

> dwmw2

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: architectures with ARCH_SUPPORTS_AOUT but no binfmt_aout
  2008-06-17  8:42           ` architectures with ARCH_SUPPORTS_AOUT but no binfmt_aout Adrian Bunk
@ 2008-06-17  9:46             ` David Woodhouse
  2008-06-17 10:11               ` Adrian Bunk
                                 ` (3 more replies)
  2008-06-17 11:28             ` architectures with ARCH_SUPPORTS_AOUT but no binfmt_aout Matthew Wilcox
  2008-06-24  4:15             ` Paul Mundt
  2 siblings, 4 replies; 41+ messages in thread
From: David Woodhouse @ 2008-06-17  9:46 UTC (permalink / raw)
  To: Adrian Bunk
  Cc: Peter Korsgaard, linux-kernel, sam, dhowells, andi,
	Kirill A. Shutemov, ysato, takata, linux-m32r, kyle, matthew,
	grundler, linux-parisc, lethal, linux-sh, linux-arch

On Tue, 2008-06-17 at 11:42 +0300, Adrian Bunk wrote:
> 
> > Why _are_ there architectures which define ARCH_SUPPORTS_AOUT and have
> > <asm/a.out.h> but don't support binfmt_aout, anyway? How does that make
> > sense?
> 
> My guess would be that binfmt_aout isn't actually used there.
> 
> The affected architectures are:
> - h8300
> - m32r
> - parisc
> - sh
> - v850
> 
> v850 is broken beyond repair, and I hope my patch to remove the 
> architecture will make it into 2.6.27.
> 
> For the other 4 architectures I have Cc'ed the architecture maintainers.

There's another set of architectures which have <asm/a.out.h> but don't
define ARCH_SUPPORTS_AOUT. Including PowerPC.

I think we can probably get away with removing <asm/a.out.h> from every
architecture other than Alpha, ARM, m68k and x86, and killing
ARCH_SUPPORTS_AOUT completely.

Or maybe, as dhowells suggests, re-defining ARCH_SUPPORTS_AOUT to be set
only on Alpha, ARM, m68k and x86 (so BINFMT_AOUT can depend on it).

-- 
dwmw2


^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: architectures with ARCH_SUPPORTS_AOUT but no binfmt_aout
  2008-06-17  9:46             ` David Woodhouse
@ 2008-06-17 10:11               ` Adrian Bunk
  2008-06-17 10:18                 ` David Woodhouse
  2008-06-17 11:28                 ` David Woodhouse
  2008-06-27 21:12               ` [2.6 patch] remove unused asm/a.out.h files Adrian Bunk
                                 ` (2 subsequent siblings)
  3 siblings, 2 replies; 41+ messages in thread
From: Adrian Bunk @ 2008-06-17 10:11 UTC (permalink / raw)
  To: David Woodhouse
  Cc: Peter Korsgaard, linux-kernel, sam, dhowells, andi,
	Kirill A. Shutemov, ysato, takata, linux-m32r, kyle, matthew,
	grundler, linux-parisc, lethal, linux-sh, linux-arch

On Tue, Jun 17, 2008 at 10:46:44AM +0100, David Woodhouse wrote:
> On Tue, 2008-06-17 at 11:42 +0300, Adrian Bunk wrote:
> > 
> > > Why _are_ there architectures which define ARCH_SUPPORTS_AOUT and have
> > > <asm/a.out.h> but don't support binfmt_aout, anyway? How does that make
> > > sense?
> > 
> > My guess would be that binfmt_aout isn't actually used there.
> > 
> > The affected architectures are:
> > - h8300
> > - m32r
> > - parisc
> > - sh
> > - v850
> > 
> > v850 is broken beyond repair, and I hope my patch to remove the 
> > architecture will make it into 2.6.27.
> > 
> > For the other 4 architectures I have Cc'ed the architecture maintainers.
> 
> There's another set of architectures which have <asm/a.out.h> but don't
> define ARCH_SUPPORTS_AOUT. Including PowerPC.
> 
> I think we can probably get away with removing <asm/a.out.h> from every
> architecture other than Alpha, ARM, m68k and x86, and killing
> ARCH_SUPPORTS_AOUT completely.

include/linux/a.out.h contains an #include <asm/a.out.h> and is exported 
to userspace...

> Or maybe, as dhowells suggests, re-defining ARCH_SUPPORTS_AOUT to be set
> only on Alpha, ARM, m68k and x86 (so BINFMT_AOUT can depend on it).

The pattern for this stuff is to provide a HAVE_AOUT kconfig variable 
that gets select'ed by these architectures.

> dwmw2

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: architectures with ARCH_SUPPORTS_AOUT but no binfmt_aout
  2008-06-17 10:11               ` Adrian Bunk
@ 2008-06-17 10:18                 ` David Woodhouse
  2008-06-17 10:24                   ` Adrian Bunk
  2008-06-17 11:28                 ` David Woodhouse
  1 sibling, 1 reply; 41+ messages in thread
From: David Woodhouse @ 2008-06-17 10:18 UTC (permalink / raw)
  To: Adrian Bunk
  Cc: Peter Korsgaard, linux-kernel, sam, dhowells, andi,
	Kirill A. Shutemov, ysato, takata, linux-m32r, kyle, matthew,
	grundler, linux-parisc, lethal, linux-sh, linux-arch

On Tue, 2008-06-17 at 13:11 +0300, Adrian Bunk wrote:
> On Tue, Jun 17, 2008 at 10:46:44AM +0100, David Woodhouse wrote:
> > On Tue, 2008-06-17 at 11:42 +0300, Adrian Bunk wrote:
> > > 
> > > > Why _are_ there architectures which define ARCH_SUPPORTS_AOUT and have
> > > > <asm/a.out.h> but don't support binfmt_aout, anyway? How does that make
> > > > sense?
> > > 
> > > My guess would be that binfmt_aout isn't actually used there.
> > > 
> > > The affected architectures are:
> > > - h8300
> > > - m32r
> > > - parisc
> > > - sh
> > > - v850
> > > 
> > > v850 is broken beyond repair, and I hope my patch to remove the 
> > > architecture will make it into 2.6.27.
> > > 
> > > For the other 4 architectures I have Cc'ed the architecture maintainers.
> > 
> > There's another set of architectures which have <asm/a.out.h> but don't
> > define ARCH_SUPPORTS_AOUT. Including PowerPC.
> > 
> > I think we can probably get away with removing <asm/a.out.h> from every
> > architecture other than Alpha, ARM, m68k and x86, and killing
> > ARCH_SUPPORTS_AOUT completely.
> 
> include/linux/a.out.h contains an #include <asm/a.out.h> and is exported 
> to userspace...

Actually, it isn't -- but it _should_ be. But we can do it conditionally.
See http://git.infradead.org/users/dwmw2/aout-2.6.git?a=commitdiff;h=5939c6a41

> > Or maybe, as dhowells suggests, re-defining ARCH_SUPPORTS_AOUT to be set
> > only on Alpha, ARM, m68k and x86 (so BINFMT_AOUT can depend on it).
> 
> The pattern for this stuff is to provide a HAVE_AOUT kconfig variable 
> that gets select'ed by these architectures.

Or that; it doesn't really matter. I was about to remove
ARCH_SUPPORTS_AOUT completely, but David suggested that it could be used
to kill that hard-coded '(X86_32 || ALPHA || ARM || M68K)' in
fs/Kconfig.binfmt.


-- 
dwmw2


^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: architectures with ARCH_SUPPORTS_AOUT but no binfmt_aout
  2008-06-17 10:18                 ` David Woodhouse
@ 2008-06-17 10:24                   ` Adrian Bunk
  0 siblings, 0 replies; 41+ messages in thread
From: Adrian Bunk @ 2008-06-17 10:24 UTC (permalink / raw)
  To: David Woodhouse
  Cc: Peter Korsgaard, linux-kernel, sam, dhowells, andi,
	Kirill A. Shutemov, ysato, takata, linux-m32r, kyle, matthew,
	grundler, linux-parisc, lethal, linux-sh, linux-arch

On Tue, Jun 17, 2008 at 11:18:45AM +0100, David Woodhouse wrote:
> On Tue, 2008-06-17 at 13:11 +0300, Adrian Bunk wrote:
> > On Tue, Jun 17, 2008 at 10:46:44AM +0100, David Woodhouse wrote:
> > > On Tue, 2008-06-17 at 11:42 +0300, Adrian Bunk wrote:
> > > > 
> > > > > Why _are_ there architectures which define ARCH_SUPPORTS_AOUT and have
> > > > > <asm/a.out.h> but don't support binfmt_aout, anyway? How does that make
> > > > > sense?
> > > > 
> > > > My guess would be that binfmt_aout isn't actually used there.
> > > > 
> > > > The affected architectures are:
> > > > - h8300
> > > > - m32r
> > > > - parisc
> > > > - sh
> > > > - v850
> > > > 
> > > > v850 is broken beyond repair, and I hope my patch to remove the 
> > > > architecture will make it into 2.6.27.
> > > > 
> > > > For the other 4 architectures I have Cc'ed the architecture maintainers.
> > > 
> > > There's another set of architectures which have <asm/a.out.h> but don't
> > > define ARCH_SUPPORTS_AOUT. Including PowerPC.
> > > 
> > > I think we can probably get away with removing <asm/a.out.h> from every
> > > architecture other than Alpha, ARM, m68k and x86, and killing
> > > ARCH_SUPPORTS_AOUT completely.
> > 
> > include/linux/a.out.h contains an #include <asm/a.out.h> and is exported 
> > to userspace...
> 
> Actually, it isn't -- but it _should_ be. But we can do it conditionally.
> See http://git.infradead.org/users/dwmw2/aout-2.6.git?a=commitdiff;h=5939c6a41
>...

It's already in Linus' tree.

Sorry, you are right, I missed that it takes care of exporting 
linux/a.out.h only when asm/a.out.h exists.

> dwmw2

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: architectures with ARCH_SUPPORTS_AOUT but no binfmt_aout
  2008-06-17 10:11               ` Adrian Bunk
  2008-06-17 10:18                 ` David Woodhouse
@ 2008-06-17 11:28                 ` David Woodhouse
  2008-06-17 12:23                   ` Sam Ravnborg
  2008-06-22  9:49                   ` Adrian Bunk
  1 sibling, 2 replies; 41+ messages in thread
From: David Woodhouse @ 2008-06-17 11:28 UTC (permalink / raw)
  To: Adrian Bunk
  Cc: Peter Korsgaard, linux-kernel, sam, dhowells, andi,
	Kirill A. Shutemov, ysato, takata, linux-m32r, kyle, matthew,
	grundler, linux-parisc, lethal, linux-sh, linux-arch

On Tue, 2008-06-17 at 13:11 +0300, Adrian Bunk wrote:
> The pattern for this stuff is to provide a HAVE_AOUT kconfig variable 
> that gets select'ed by these architectures.

http://git.infradead.org/users/dwmw2/aout-2.6.git?a=commitdiff;h=a5db5179

Subject: [PATCH] Introduce HAVE_AOUT symbol to remove hard-coded arch list for BINFMT_AOUT

HAVE_AOUT doesn't quite do the same thing as the recently removed
ARCH_SUPPORTS_AOUT config option. That was set even on platforms where
binfmt_aout isn't supported, although it's not entirely clear why.

So it's best just to introduce a new symbol, handled consistently with
other similar HAVE_xxx symbols; with a simple 'select' the arch Kconfig.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
---
 arch/alpha/Kconfig |    1 +
 arch/arm/Kconfig   |    1 +
 arch/m68k/Kconfig  |    1 +
 arch/x86/Kconfig   |    1 +
 fs/Kconfig.binfmt  |    5 ++++-
 5 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index 207196e..f80e548 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -7,6 +7,7 @@ config ALPHA
 	default y
 	select HAVE_IDE
 	select HAVE_OPROFILE
+	select HAVE_AOUT
 	help
 	  The Alpha is a 64-bit general-purpose processor designed and
 	  marketed by the Digital Equipment Corporation of blessed memory,
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 8fd3ab3..2be8bd7 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -14,6 +14,7 @@ config ARM
 	select HAVE_OPROFILE
 	select HAVE_KPROBES if (!XIP_KERNEL)
 	select HAVE_KRETPROBES if (HAVE_KPROBES)
+	select HAVE_AOUT
 	help
 	  The ARM series is a line of low-power-consumption RISC chip designs
 	  licensed by ARM Ltd and targeted at embedded applications and
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index bfb6395..83c4338 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -6,6 +6,7 @@ config M68K
 	bool
 	default y
 	select HAVE_IDE
+	select HAVE_AOUT
 
 config MMU
 	bool
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 8fdaa70..bd066ae 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -25,6 +25,7 @@ config X86
 	select HAVE_KRETPROBES
 	select HAVE_KVM if ((X86_32 && !X86_VOYAGER && !X86_VISWS && !X86_NUMAQ) || X86_64)
 	select HAVE_ARCH_KGDB if !X86_VOYAGER
+	select HAVE_AOUT if X86_32
 
 config ARCH_DEFCONFIG
 	string
diff --git a/fs/Kconfig.binfmt b/fs/Kconfig.binfmt
index 0999d5c..5592e08 100644
--- a/fs/Kconfig.binfmt
+++ b/fs/Kconfig.binfmt
@@ -59,9 +59,12 @@ config BINFMT_SHARED_FLAT
 	help
 	  Support FLAT shared libraries
 
+config HAVE_AOUT
+       def_bool n
+
 config BINFMT_AOUT
 	tristate "Kernel support for a.out and ECOFF binaries"
-	depends on (X86_32 || ALPHA || ARM || M68K)
+	depends on HAVE_AOUT
 	---help---
 	  A.out (Assembler.OUTput) is a set of formats for libraries and
 	  executables used in the earliest versions of UNIX.  Linux used
-- 
1.5.5.1


-- 
dwmw2


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* Re: architectures with ARCH_SUPPORTS_AOUT but no binfmt_aout
  2008-06-17  8:42           ` architectures with ARCH_SUPPORTS_AOUT but no binfmt_aout Adrian Bunk
  2008-06-17  9:46             ` David Woodhouse
@ 2008-06-17 11:28             ` Matthew Wilcox
  2008-06-24  4:15             ` Paul Mundt
  2 siblings, 0 replies; 41+ messages in thread
From: Matthew Wilcox @ 2008-06-17 11:28 UTC (permalink / raw)
  To: Adrian Bunk
  Cc: David Woodhouse, Peter Korsgaard, linux-kernel, sam, dhowells,
	andi, Kirill A. Shutemov, ysato, takata, linux-m32r, kyle,
	grundler, linux-parisc, lethal, linux-sh

On Tue, Jun 17, 2008 at 11:42:35AM +0300, Adrian Bunk wrote:
> On Mon, Jun 16, 2008 at 01:26:54PM +0100, David Woodhouse wrote:
> > Why _are_ there architectures which define ARCH_SUPPORTS_AOUT and have
> > <asm/a.out.h> but don't support binfmt_aout, anyway? How does that make
> > sense?
> 
> My guess would be that binfmt_aout isn't actually used there.

It was probably copied from MIPS in the early days of the parisc port
and nobody ever b othered to look at it before.  There was never an
a.out format for parisc.

-- 
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: architectures with ARCH_SUPPORTS_AOUT but no binfmt_aout
  2008-06-17 11:28                 ` David Woodhouse
@ 2008-06-17 12:23                   ` Sam Ravnborg
  2008-06-17 12:29                     ` David Woodhouse
  2008-06-22  9:49                   ` Adrian Bunk
  1 sibling, 1 reply; 41+ messages in thread
From: Sam Ravnborg @ 2008-06-17 12:23 UTC (permalink / raw)
  To: David Woodhouse
  Cc: Adrian Bunk, Peter Korsgaard, linux-kernel, dhowells, andi,
	Kirill A. Shutemov, ysato, takata, linux-m32r, kyle, matthew,
	grundler, linux-parisc, lethal, linux-sh, linux-arch

On Tue, Jun 17, 2008 at 12:28:33PM +0100, David Woodhouse wrote:
> On Tue, 2008-06-17 at 13:11 +0300, Adrian Bunk wrote:
> > The pattern for this stuff is to provide a HAVE_AOUT kconfig variable 
> > that gets select'ed by these architectures.
> 
> http://git.infradead.org/users/dwmw2/aout-2.6.git?a=commitdiff;h=a5db5179
> 
> Subject: [PATCH] Introduce HAVE_AOUT symbol to remove hard-coded arch list for BINFMT_AOUT
> 
> HAVE_AOUT doesn't quite do the same thing as the recently removed
> ARCH_SUPPORTS_AOUT config option. That was set even on platforms where
> binfmt_aout isn't supported, although it's not entirely clear why.
> 
> So it's best just to introduce a new symbol, handled consistently with
> other similar HAVE_xxx symbols; with a simple 'select' the arch Kconfig.

Looks good.
One minor issue...


> @@ -7,6 +7,7 @@ config ALPHA
>  	default y
>  	select HAVE_IDE
>  	select HAVE_OPROFILE
> +	select HAVE_AOUT
Sorting these alphabetically will result in less merge conflicts when the list grows.

	Sam

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: architectures with ARCH_SUPPORTS_AOUT but no binfmt_aout
  2008-06-17 12:23                   ` Sam Ravnborg
@ 2008-06-17 12:29                     ` David Woodhouse
  2008-06-17 12:37                       ` Sam Ravnborg
  0 siblings, 1 reply; 41+ messages in thread
From: David Woodhouse @ 2008-06-17 12:29 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Adrian Bunk, Peter Korsgaard, linux-kernel, dhowells, andi,
	Kirill A. Shutemov, ysato, takata, linux-m32r, kyle, matthew,
	grundler, linux-parisc, lethal, linux-sh, linux-arch

On Tue, 2008-06-17 at 14:23 +0200, Sam Ravnborg wrote:
> Sorting these alphabetically will result in less merge conflicts when
> the list grows.

Maybe, but it doesn't grow that fast -- and it's small enough that if I
add stuff in the middle, the context will cover the whole thing and
cause a merge conflict either way. And it isn't in alphabetical order
now either :)

-- 
dwmw2


^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: architectures with ARCH_SUPPORTS_AOUT but no binfmt_aout
  2008-06-17 12:29                     ` David Woodhouse
@ 2008-06-17 12:37                       ` Sam Ravnborg
  2008-06-17 12:54                         ` David Woodhouse
  0 siblings, 1 reply; 41+ messages in thread
From: Sam Ravnborg @ 2008-06-17 12:37 UTC (permalink / raw)
  To: David Woodhouse
  Cc: Adrian Bunk, Peter Korsgaard, linux-kernel, dhowells, andi,
	Kirill A. Shutemov, ysato, takata, linux-m32r, kyle, matthew,
	grundler, linux-parisc, lethal, linux-sh, linux-arch

On Tue, Jun 17, 2008 at 01:29:09PM +0100, David Woodhouse wrote:
> On Tue, 2008-06-17 at 14:23 +0200, Sam Ravnborg wrote:
> > Sorting these alphabetically will result in less merge conflicts when
> > the list grows.
> 
> Maybe, but it doesn't grow that fast -- and it's small enough that if I
> add stuff in the middle, the context will cover the whole thing and
> cause a merge conflict either way. And it isn't in alphabetical order
> now either :)
I know and I know.
If someone did the janitorial effort and converted all the
per-arch defined symbols to one single definiton
and select the list would grow rapidly.

	Sam

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: architectures with ARCH_SUPPORTS_AOUT but no binfmt_aout
  2008-06-17 12:37                       ` Sam Ravnborg
@ 2008-06-17 12:54                         ` David Woodhouse
  0 siblings, 0 replies; 41+ messages in thread
From: David Woodhouse @ 2008-06-17 12:54 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Adrian Bunk, Peter Korsgaard, linux-kernel, dhowells, andi,
	Kirill A. Shutemov, ysato, takata, linux-m32r, kyle, matthew,
	grundler, linux-parisc, lethal, linux-sh, linux-arch

On Tue, 2008-06-17 at 14:37 +0200, Sam Ravnborg wrote:
> I know and I know.
> If someone did the janitorial effort and converted all the
> per-arch defined symbols to one single definiton
> and select the list would grow rapidly.

http://git.infradead.org/users/dwmw2/aout-2.6.git?a=commitdiff;h=e75fd00c

They're still not in alphabetical order, but I haven't made it worse :)

-- 
dwmw2


^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: architectures with ARCH_SUPPORTS_AOUT but no binfmt_aout
  2008-06-17 11:28                 ` David Woodhouse
  2008-06-17 12:23                   ` Sam Ravnborg
@ 2008-06-22  9:49                   ` Adrian Bunk
  2008-06-22 11:40                     ` David Woodhouse
  1 sibling, 1 reply; 41+ messages in thread
From: Adrian Bunk @ 2008-06-22  9:49 UTC (permalink / raw)
  To: David Woodhouse
  Cc: Peter Korsgaard, linux-kernel, sam, dhowells, andi,
	Kirill A. Shutemov, ysato, takata, linux-m32r, kyle, matthew,
	grundler, linux-parisc, lethal, linux-sh, linux-arch, gerg

On Tue, Jun 17, 2008 at 12:28:33PM +0100, David Woodhouse wrote:
> On Tue, 2008-06-17 at 13:11 +0300, Adrian Bunk wrote:
> > The pattern for this stuff is to provide a HAVE_AOUT kconfig variable 
> > that gets select'ed by these architectures.
> 
> http://git.infradead.org/users/dwmw2/aout-2.6.git?a=commitdiff;h=a5db5179
> 
> Subject: [PATCH] Introduce HAVE_AOUT symbol to remove hard-coded arch list for BINFMT_AOUT
> 
> HAVE_AOUT doesn't quite do the same thing as the recently removed
> ARCH_SUPPORTS_AOUT config option. That was set even on platforms where
> binfmt_aout isn't supported, although it's not entirely clear why.
> 
> So it's best just to introduce a new symbol, handled consistently with
> other similar HAVE_xxx symbols; with a simple 'select' the arch Kconfig.
> 
> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
> ---
>  arch/alpha/Kconfig |    1 +
>  arch/arm/Kconfig   |    1 +
>  arch/m68k/Kconfig  |    1 +
>  arch/x86/Kconfig   |    1 +
>  fs/Kconfig.binfmt  |    5 ++++-
>  5 files changed, 8 insertions(+), 1 deletions(-)
>...
> --- a/fs/Kconfig.binfmt
> +++ b/fs/Kconfig.binfmt
> @@ -59,9 +59,12 @@ config BINFMT_SHARED_FLAT
>  	help
>  	  Support FLAT shared libraries
>  
> +config HAVE_AOUT
> +       def_bool n
> +
>  config BINFMT_AOUT
>  	tristate "Kernel support for a.out and ECOFF binaries"
> -	depends on (X86_32 || ALPHA || ARM || M68K)
> +	depends on HAVE_AOUT
>  	---help---
>  	  A.out (Assembler.OUTput) is a set of formats for libraries and
>  	  executables used in the earliest versions of UNIX.  Linux used

What about m68knommu?

I don't know whether it was intentionally available there, but the 
removal in your patch does not seem to be intentional.

> dwmw2

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: architectures with ARCH_SUPPORTS_AOUT but no binfmt_aout
  2008-06-22  9:49                   ` Adrian Bunk
@ 2008-06-22 11:40                     ` David Woodhouse
  2008-06-22 23:53                       ` David McCullough
  2008-06-24 11:46                       ` Adrian Bunk
  0 siblings, 2 replies; 41+ messages in thread
From: David Woodhouse @ 2008-06-22 11:40 UTC (permalink / raw)
  To: Adrian Bunk
  Cc: Peter Korsgaard, linux-kernel, sam, dhowells, andi,
	Kirill A. Shutemov, ysato, takata, linux-m32r, kyle, matthew,
	grundler, linux-parisc, lethal, linux-sh, linux-arch, gerg

On Sun, 2008-06-22 at 12:49 +0300, Adrian Bunk wrote:
> 
> What about m68knommu?
> 
> I don't know whether it was intentionally available there, but the 
> removal in your patch does not seem to be intentional.

Hm, true. Well spotted. I think it's probably correct though -- I don't
think m68knommu can really support a.out binaries, can it?

-- 
dwmw2


^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: architectures with ARCH_SUPPORTS_AOUT but no binfmt_aout
  2008-06-22 11:40                     ` David Woodhouse
@ 2008-06-22 23:53                       ` David McCullough
  2008-06-24 11:46                       ` Adrian Bunk
  1 sibling, 0 replies; 41+ messages in thread
From: David McCullough @ 2008-06-22 23:53 UTC (permalink / raw)
  To: David Woodhouse
  Cc: Adrian Bunk, Peter Korsgaard, linux-kernel, sam, dhowells, andi,
	Kirill A. Shutemov, ysato, takata, linux-m32r, kyle, matthew,
	grundler, linux-parisc, lethal, linux-sh, linux-arch, gerg


Jivin David Woodhouse lays it down ...
> On Sun, 2008-06-22 at 12:49 +0300, Adrian Bunk wrote:
> > 
> > What about m68knommu?
> > 
> > I don't know whether it was intentionally available there, but the 
> > removal in your patch does not seem to be intentional.
> 
> Hm, true. Well spotted. I think it's probably correct though -- I don't
> think m68knommu can really support a.out binaries, can it?

No it can't.

-- 
David McCullough,  david_mccullough@securecomputing.com,   Ph:+61 734352815
Secure Computing - SnapGear  http://www.uCdot.org   http://www.snapgear.com

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: architectures with ARCH_SUPPORTS_AOUT but no binfmt_aout
  2008-06-17  8:42           ` architectures with ARCH_SUPPORTS_AOUT but no binfmt_aout Adrian Bunk
  2008-06-17  9:46             ` David Woodhouse
  2008-06-17 11:28             ` architectures with ARCH_SUPPORTS_AOUT but no binfmt_aout Matthew Wilcox
@ 2008-06-24  4:15             ` Paul Mundt
  2 siblings, 0 replies; 41+ messages in thread
From: Paul Mundt @ 2008-06-24  4:15 UTC (permalink / raw)
  To: Adrian Bunk
  Cc: David Woodhouse, Peter Korsgaard, linux-kernel, sam, dhowells,
	andi, Kirill A. Shutemov, ysato, takata, linux-m32r, kyle,
	matthew, grundler, linux-parisc, linux-sh

On Tue, Jun 17, 2008 at 11:42:35AM +0300, Adrian Bunk wrote:
> On Mon, Jun 16, 2008 at 01:26:54PM +0100, David Woodhouse wrote:
> >...
> > Actually, I think we can drop the preceding patch too -- it's not
> > necessary to fix the regression in 2.6.26, and dhowells suggests that we
> > might still want to use ARCH_SUPPORTS_AOUT, by making BINFMT_AOUT depend
> > on it instead of that hard-coded list of architectures.
> > 
> > If we do that, then ARCH_SUPPORTS_AOUT would need to be defined on a
> > different set of architectures to the ones it's currently defined on --
> > so I don't really want to go there before 2.6.26. I'll push just the
> > parts which were included in the mail I just sent.
> > 
> > Why _are_ there architectures which define ARCH_SUPPORTS_AOUT and have
> > <asm/a.out.h> but don't support binfmt_aout, anyway? How does that make
> > sense?
> 
> My guess would be that binfmt_aout isn't actually used there.
> 
> The affected architectures are:
> - h8300
> - m32r
> - parisc
> - sh
> - v850
> 
> v850 is broken beyond repair, and I hope my patch to remove the 
> architecture will make it into 2.6.27.
> 
> For the other 4 architectures I have Cc'ed the architecture maintainers.
> 
There was never an a.out format for any of sh/h8300/m32r. It's likely
just perpetuated damage copied over from the other ports, as in the
parisc case.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: architectures with ARCH_SUPPORTS_AOUT but no binfmt_aout
  2008-06-22 11:40                     ` David Woodhouse
  2008-06-22 23:53                       ` David McCullough
@ 2008-06-24 11:46                       ` Adrian Bunk
  2008-06-27 16:27                         ` Jeff Dike
  1 sibling, 1 reply; 41+ messages in thread
From: Adrian Bunk @ 2008-06-24 11:46 UTC (permalink / raw)
  To: David Woodhouse
  Cc: Peter Korsgaard, linux-kernel, sam, dhowells, andi,
	Kirill A. Shutemov, ysato, takata, linux-m32r, kyle, matthew,
	grundler, linux-parisc, lethal, linux-sh, linux-arch, gerg, jdike

On Sun, Jun 22, 2008 at 12:40:50PM +0100, David Woodhouse wrote:
> On Sun, 2008-06-22 at 12:49 +0300, Adrian Bunk wrote:
> > 
> > What about m68knommu?
> > 
> > I don't know whether it was intentionally available there, but the 
> > removal in your patch does not seem to be intentional.
> 
> Hm, true. Well spotted. I think it's probably correct though -- I don't
> think m68knommu can really support a.out binaries, can it?

I found another similar case:

X86_32 UML.

a.out is most likely working there?

> dwmw2

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: architectures with ARCH_SUPPORTS_AOUT but no binfmt_aout
  2008-06-24 11:46                       ` Adrian Bunk
@ 2008-06-27 16:27                         ` Jeff Dike
  0 siblings, 0 replies; 41+ messages in thread
From: Jeff Dike @ 2008-06-27 16:27 UTC (permalink / raw)
  To: Adrian Bunk
  Cc: David Woodhouse, Peter Korsgaard, linux-kernel, sam, dhowells,
	andi, Kirill A. Shutemov, ysato, takata, linux-m32r, kyle,
	matthew, grundler, linux-parisc, lethal, linux-sh, linux-arch,
	gerg

On Tue, Jun 24, 2008 at 02:46:43PM +0300, Adrian Bunk wrote:
> I found another similar case:
> 
> X86_32 UML.
> 
> a.out is most likely working there?

Yup, if it works on the host, it'll work in UML.

     	   	 Jeff

-- 
Work email - jdike at linux dot intel dot com

^ permalink raw reply	[flat|nested] 41+ messages in thread

* [2.6 patch] remove unused asm/a.out.h files
  2008-06-17  9:46             ` David Woodhouse
  2008-06-17 10:11               ` Adrian Bunk
@ 2008-06-27 21:12               ` Adrian Bunk
  2008-09-05 16:27               ` [PATCH 1/2] Remove redundant CONFIG_ARCH_SUPPORTS_AOUT David Woodhouse
  2008-09-05 16:27               ` [PATCH 2/2] Introduce HAVE_AOUT symbol to remove hard-coded arch list for BINFMT_AOUT David Woodhouse
  3 siblings, 0 replies; 41+ messages in thread
From: Adrian Bunk @ 2008-06-27 21:12 UTC (permalink / raw)
  To: David Woodhouse
  Cc: Peter Korsgaard, linux-kernel, sam, dhowells, andi,
	Kirill A. Shutemov, ysato, takata, linux-m32r, kyle, matthew,
	grundler, linux-parisc, lethal, linux-sh, linux-arch

On Tue, Jun 17, 2008 at 10:46:44AM +0100, David Woodhouse wrote:
>...
> I think we can probably get away with removing <asm/a.out.h> from every
> architecture other than Alpha, ARM, m68k and x86,
>...

Patch below.

> dwmw2

cu
Adrian


<--  snip  -->


This patch removes asm/a.out.h from all architectures that do not
provide a.out support.

This patch also includes the required removal of (unused)
#include <asm/a.out.h>'s and #include <linux/a.out.h>'s in the arch/
code for these architectures.

The ppc and v850 architectures that should anyway be removed in 2.6.27 
are not touched by this patch to avoid needless merge conflicts.

Signed-off-by: Adrian Bunk <bunk@kernel.org>

---

 arch/cris/arch-v10/boot/tools/build.c   |    1 
 arch/h8300/kernel/process.c             |    1 
 arch/ia64/mm/init.c                     |    1 
 arch/m68knommu/kernel/process.c         |    1 
 arch/m68knommu/kernel/traps.c           |    1 
 arch/mips/kernel/irixelf.c              |    1 
 arch/mips/kernel/process.c              |    1 
 arch/mips/kernel/syscall.c              |    1 
 arch/powerpc/kernel/softemu8xx.c        |    1 
 arch/powerpc/kernel/traps.c             |    1 
 arch/powerpc/platforms/chrp/setup.c     |    1 
 arch/powerpc/platforms/maple/setup.c    |    1 
 arch/powerpc/platforms/powermac/setup.c |    1 
 arch/powerpc/platforms/pseries/setup.c  |    1 
 include/asm-avr32/a.out.h               |   20 -------------
 include/asm-blackfin/a.out.h            |   19 -------------
 include/asm-cris/a.out.h                |   26 -----------------
 include/asm-h8300/a.out.h               |   20 -------------
 include/asm-ia64/a.out.h                |   32 ---------------------
 include/asm-m32r/a.out.h                |   20 -------------
 include/asm-m68knommu/a.out.h           |    1 
 include/asm-mips/a.out.h                |   35 ------------------------
 include/asm-parisc/a.out.h              |   20 -------------
 include/asm-powerpc/a.out.h             |   20 -------------
 include/asm-sh/a.out.h                  |   20 -------------
 include/asm-xtensa/a.out.h              |   29 -------------------
 26 files changed, 276 deletions(-)

9cd72b780be8d25cd2deb99a923030f2fe2aeba4 diff --git a/arch/cris/arch-v10/boot/tools/build.c b/arch/cris/arch-v10/boot/tools/build.c
index 2f9bbb2..c8adef3 100644
--- a/arch/cris/arch-v10/boot/tools/build.c
+++ b/arch/cris/arch-v10/boot/tools/build.c
@@ -30,7 +30,6 @@
 #include <sys/sysmacros.h>
 #include <unistd.h>	/* contains read/write */
 #include <fcntl.h>
-#include <linux/a.out.h>
 #include <errno.h>
 
 #define MINIX_HEADER 32
diff --git a/arch/h8300/kernel/process.c b/arch/h8300/kernel/process.c
index dfbe7ab..a8ef654 100644
--- a/arch/h8300/kernel/process.c
+++ b/arch/h8300/kernel/process.c
@@ -34,7 +34,6 @@
 #include <linux/ptrace.h>
 #include <linux/slab.h>
 #include <linux/user.h>
-#include <linux/a.out.h>
 #include <linux/interrupt.h>
 #include <linux/reboot.h>
 #include <linux/fs.h>
diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c
index 200100e..f482a90 100644
--- a/arch/ia64/mm/init.c
+++ b/arch/ia64/mm/init.c
@@ -21,7 +21,6 @@
 #include <linux/bitops.h>
 #include <linux/kexec.h>
 
-#include <asm/a.out.h>
 #include <asm/dma.h>
 #include <asm/ia32.h>
 #include <asm/io.h>
diff --git a/arch/m68knommu/kernel/process.c b/arch/m68knommu/kernel/process.c
index 47502d5..3f2d774 100644
--- a/arch/m68knommu/kernel/process.c
+++ b/arch/m68knommu/kernel/process.c
@@ -25,7 +25,6 @@
 #include <linux/ptrace.h>
 #include <linux/slab.h>
 #include <linux/user.h>
-#include <linux/a.out.h>
 #include <linux/interrupt.h>
 #include <linux/reboot.h>
 #include <linux/fs.h>
diff --git a/arch/m68knommu/kernel/traps.c b/arch/m68knommu/kernel/traps.c
index ec9aea6..0157b9d 100644
--- a/arch/m68knommu/kernel/traps.c
+++ b/arch/m68knommu/kernel/traps.c
@@ -22,7 +22,6 @@
 #include <linux/mm.h>
 #include <linux/module.h>
 #include <linux/types.h>
-#include <linux/a.out.h>
 #include <linux/user.h>
 #include <linux/string.h>
 #include <linux/linkage.h>
diff --git a/arch/mips/kernel/irixelf.c b/arch/mips/kernel/irixelf.c
index 469c723..e068a72 100644
--- a/arch/mips/kernel/irixelf.c
+++ b/arch/mips/kernel/irixelf.c
@@ -18,7 +18,6 @@
 #include <linux/sched.h>
 #include <linux/mm.h>
 #include <linux/mman.h>
-#include <linux/a.out.h>
 #include <linux/errno.h>
 #include <linux/init.h>
 #include <linux/signal.h>
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c
index 2c09a44..2040fc5 100644
--- a/arch/mips/kernel/process.c
+++ b/arch/mips/kernel/process.c
@@ -22,7 +22,6 @@
 #include <linux/personality.h>
 #include <linux/sys.h>
 #include <linux/user.h>
-#include <linux/a.out.h>
 #include <linux/init.h>
 #include <linux/completion.h>
 #include <linux/kallsyms.h>
diff --git a/arch/mips/kernel/syscall.c b/arch/mips/kernel/syscall.c
index af1bdc8..0d2b609 100644
--- a/arch/mips/kernel/syscall.c
+++ b/arch/mips/kernel/syscall.c
@@ -7,7 +7,6 @@
  * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
  * Copyright (C) 2001 MIPS Technologies, Inc.
  */
-#include <linux/a.out.h>
 #include <linux/capability.h>
 #include <linux/errno.h>
 #include <linux/linkage.h>
diff --git a/arch/powerpc/kernel/softemu8xx.c b/arch/powerpc/kernel/softemu8xx.c
index 67d6f68..2489493 100644
--- a/arch/powerpc/kernel/softemu8xx.c
+++ b/arch/powerpc/kernel/softemu8xx.c
@@ -23,7 +23,6 @@
 #include <linux/ptrace.h>
 #include <linux/slab.h>
 #include <linux/user.h>
-#include <linux/a.out.h>
 #include <linux/interrupt.h>
 
 #include <asm/pgtable.h>
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index 4b5b7ff..c7e499e 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -23,7 +23,6 @@
 #include <linux/ptrace.h>
 #include <linux/slab.h>
 #include <linux/user.h>
-#include <linux/a.out.h>
 #include <linux/interrupt.h>
 #include <linux/init.h>
 #include <linux/module.h>
diff --git a/arch/powerpc/platforms/chrp/setup.c b/arch/powerpc/platforms/chrp/setup.c
index 116babb..e6b3fac 100644
--- a/arch/powerpc/platforms/chrp/setup.c
+++ b/arch/powerpc/platforms/chrp/setup.c
@@ -17,7 +17,6 @@
 #include <linux/ptrace.h>
 #include <linux/slab.h>
 #include <linux/user.h>
-#include <linux/a.out.h>
 #include <linux/tty.h>
 #include <linux/major.h>
 #include <linux/interrupt.h>
diff --git a/arch/powerpc/platforms/maple/setup.c b/arch/powerpc/platforms/maple/setup.c
index 3647147..d4c61c3 100644
--- a/arch/powerpc/platforms/maple/setup.c
+++ b/arch/powerpc/platforms/maple/setup.c
@@ -23,7 +23,6 @@
 #include <linux/ptrace.h>
 #include <linux/slab.h>
 #include <linux/user.h>
-#include <linux/a.out.h>
 #include <linux/tty.h>
 #include <linux/string.h>
 #include <linux/delay.h>
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c
index 00bd016..19c287a 100644
--- a/arch/powerpc/platforms/powermac/setup.c
+++ b/arch/powerpc/platforms/powermac/setup.c
@@ -33,7 +33,6 @@
 #include <linux/ptrace.h>
 #include <linux/slab.h>
 #include <linux/user.h>
-#include <linux/a.out.h>
 #include <linux/tty.h>
 #include <linux/string.h>
 #include <linux/delay.h>
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index f5d29f5..577efcd 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -25,7 +25,6 @@
 #include <linux/unistd.h>
 #include <linux/slab.h>
 #include <linux/user.h>
-#include <linux/a.out.h>
 #include <linux/tty.h>
 #include <linux/major.h>
 #include <linux/interrupt.h>
diff --git a/include/asm-avr32/a.out.h b/include/asm-avr32/a.out.h
deleted file mode 100644
index e46375a..0000000
--- a/include/asm-avr32/a.out.h
+++ /dev/null
@@ -1,20 +0,0 @@
-#ifndef __ASM_AVR32_A_OUT_H
-#define __ASM_AVR32_A_OUT_H
-
-struct exec
-{
-  unsigned long a_info;		/* Use macros N_MAGIC, etc for access */
-  unsigned a_text;		/* length of text, in bytes */
-  unsigned a_data;		/* length of data, in bytes */
-  unsigned a_bss;		/* length of uninitialized data area for file, in bytes */
-  unsigned a_syms;		/* length of symbol table data in file, in bytes */
-  unsigned a_entry;		/* start address */
-  unsigned a_trsize;		/* length of relocation info for text, in bytes */
-  unsigned a_drsize;		/* length of relocation info for data, in bytes */
-};
-
-#define N_TRSIZE(a)	((a).a_trsize)
-#define N_DRSIZE(a)	((a).a_drsize)
-#define N_SYMSIZE(a)	((a).a_syms)
-
-#endif /* __ASM_AVR32_A_OUT_H */
diff --git a/include/asm-blackfin/a.out.h b/include/asm-blackfin/a.out.h
deleted file mode 100644
index 6c3d652..0000000
--- a/include/asm-blackfin/a.out.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifndef __BFIN_A_OUT_H__
-#define __BFIN_A_OUT_H__
-
-struct exec {
-	unsigned long a_info;	/* Use macros N_MAGIC, etc for access */
-	unsigned a_text;	/* length of text, in bytes */
-	unsigned a_data;	/* length of data, in bytes */
-	unsigned a_bss;		/* length of uninitialized data area for file, in bytes */
-	unsigned a_syms;	/* length of symbol table data in file, in bytes */
-	unsigned a_entry;	/* start address */
-	unsigned a_trsize;	/* length of relocation info for text, in bytes */
-	unsigned a_drsize;	/* length of relocation info for data, in bytes */
-};
-
-#define N_TRSIZE(a)	((a).a_trsize)
-#define N_DRSIZE(a)	((a).a_drsize)
-#define N_SYMSIZE(a)	((a).a_syms)
-
-#endif				/* __BFIN_A_OUT_H__ */
diff --git a/include/asm-cris/a.out.h b/include/asm-cris/a.out.h
deleted file mode 100644
index c82e9f9..0000000
--- a/include/asm-cris/a.out.h
+++ /dev/null
@@ -1,26 +0,0 @@
-#ifndef __CRIS_A_OUT_H__
-#define __CRIS_A_OUT_H__
-
-/* we don't support a.out binaries on Linux/CRIS anyway, so this is
- * not really used but still needed because binfmt_elf.c for some reason
- * wants to know about a.out even if there is no interpreter available...
- */
-
-struct exec
-{
-  unsigned long a_info;		/* Use macros N_MAGIC, etc for access */
-  unsigned a_text;		/* length of text, in bytes */
-  unsigned a_data;		/* length of data, in bytes */
-  unsigned a_bss;		/* length of uninitialized data area for file, in bytes */
-  unsigned a_syms;		/* length of symbol table data in file, in bytes */
-  unsigned a_entry;		/* start address */
-  unsigned a_trsize;		/* length of relocation info for text, in bytes */
-  unsigned a_drsize;		/* length of relocation info for data, in bytes */
-};
-
-
-#define N_TRSIZE(a)	((a).a_trsize)
-#define N_DRSIZE(a)	((a).a_drsize)
-#define N_SYMSIZE(a)	((a).a_syms)
-
-#endif
diff --git a/include/asm-h8300/a.out.h b/include/asm-h8300/a.out.h
deleted file mode 100644
index ded780f..0000000
--- a/include/asm-h8300/a.out.h
+++ /dev/null
@@ -1,20 +0,0 @@
-#ifndef __H8300_A_OUT_H__
-#define __H8300_A_OUT_H__
-
-struct exec
-{
-  unsigned long a_info;		/* Use macros N_MAGIC, etc for access */
-  unsigned a_text;		/* length of text, in bytes */
-  unsigned a_data;		/* length of data, in bytes */
-  unsigned a_bss;		/* length of uninitialized data area for file, in bytes */
-  unsigned a_syms;		/* length of symbol table data in file, in bytes */
-  unsigned a_entry;		/* start address */
-  unsigned a_trsize;		/* length of relocation info for text, in bytes */
-  unsigned a_drsize;		/* length of relocation info for data, in bytes */
-};
-
-#define N_TRSIZE(a)	((a).a_trsize)
-#define N_DRSIZE(a)	((a).a_drsize)
-#define N_SYMSIZE(a)	((a).a_syms)
-
-#endif /* __H8300_A_OUT_H__ */
diff --git a/include/asm-ia64/a.out.h b/include/asm-ia64/a.out.h
deleted file mode 100644
index 193dcfb..0000000
--- a/include/asm-ia64/a.out.h
+++ /dev/null
@@ -1,32 +0,0 @@
-#ifndef _ASM_IA64_A_OUT_H
-#define _ASM_IA64_A_OUT_H
-
-/*
- * No a.out format has been (or should be) defined so this file is
- * just a dummy that allows us to get binfmt_elf compiled.  It
- * probably would be better to clean up binfmt_elf.c so it does not
- * necessarily depend on there being a.out support.
- *
- * Modified 1998-2002
- *	David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co.
- */
-
-#include <linux/types.h>
-
-struct exec {
-	unsigned long a_info;
-	unsigned long a_text;
-	unsigned long a_data;
-	unsigned long a_bss;
-	unsigned long a_entry;
-};
-
-#define N_TXTADDR(x)	0
-#define N_DATADDR(x)	0
-#define N_BSSADDR(x)	0
-#define N_DRSIZE(x)	0
-#define N_TRSIZE(x)	0
-#define N_SYMSIZE(x)	0
-#define N_TXTOFF(x)	0
-
-#endif /* _ASM_IA64_A_OUT_H */
diff --git a/include/asm-m32r/a.out.h b/include/asm-m32r/a.out.h
deleted file mode 100644
index ab150f5..0000000
--- a/include/asm-m32r/a.out.h
+++ /dev/null
@@ -1,20 +0,0 @@
-#ifndef _ASM_M32R_A_OUT_H
-#define _ASM_M32R_A_OUT_H
-
-struct exec
-{
-  unsigned long a_info;		/* Use macros N_MAGIC, etc for access */
-  unsigned a_text;		/* length of text, in bytes */
-  unsigned a_data;		/* length of data, in bytes */
-  unsigned a_bss;		/* length of uninitialized data area for file, in bytes */
-  unsigned a_syms;		/* length of symbol table data in file, in bytes */
-  unsigned a_entry;		/* start address */
-  unsigned a_trsize;		/* length of relocation info for text, in bytes */
-  unsigned a_drsize;		/* length of relocation info for data, in bytes */
-};
-
-#define N_TRSIZE(a)	((a).a_trsize)
-#define N_DRSIZE(a)	((a).a_drsize)
-#define N_SYMSIZE(a)	((a).a_syms)
-
-#endif /* _ASM_M32R_A_OUT_H */
diff --git a/include/asm-m68knommu/a.out.h b/include/asm-m68knommu/a.out.h
deleted file mode 100644
index ce18ef9..0000000
--- a/include/asm-m68knommu/a.out.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-m68k/a.out.h>
diff --git a/include/asm-mips/a.out.h b/include/asm-mips/a.out.h
deleted file mode 100644
index cad8371..0000000
--- a/include/asm-mips/a.out.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 1994 - 1999, 2003 by Ralf Baechle
- */
-#ifndef _ASM_A_OUT_H
-#define _ASM_A_OUT_H
-
-#ifdef __KERNEL__
-
-
-#endif
-
-struct exec
-{
-	unsigned long a_info;	/* Use macros N_MAGIC, etc for access */
-	unsigned a_text;	/* length of text, in bytes */
-	unsigned a_data;	/* length of data, in bytes */
-	unsigned a_bss;		/* length of uninitialized data area for
-				    file, in bytes */
-	unsigned a_syms;	/* length of symbol table data in file,
-				   in bytes */
-	unsigned a_entry;	/* start address */
-	unsigned a_trsize;	/* length of relocation info for text, in
-				    bytes */
-	unsigned a_drsize;	/* length of relocation info for data, in bytes */
-};
-
-#define N_TRSIZE(a)	((a).a_trsize)
-#define N_DRSIZE(a)	((a).a_drsize)
-#define N_SYMSIZE(a)	((a).a_syms)
-
-#endif /* _ASM_A_OUT_H */
diff --git a/include/asm-parisc/a.out.h b/include/asm-parisc/a.out.h
deleted file mode 100644
index eb04e34..0000000
--- a/include/asm-parisc/a.out.h
+++ /dev/null
@@ -1,20 +0,0 @@
-#ifndef __PARISC_A_OUT_H__
-#define __PARISC_A_OUT_H__
-
-struct exec
-{
-  unsigned int a_info;		/* Use macros N_MAGIC, etc for access */
-  unsigned a_text;		/* length of text, in bytes */
-  unsigned a_data;		/* length of data, in bytes */
-  unsigned a_bss;		/* length of uninitialized data area for file, in bytes */
-  unsigned a_syms;		/* length of symbol table data in file, in bytes */
-  unsigned a_entry;		/* start address */
-  unsigned a_trsize;		/* length of relocation info for text, in bytes */
-  unsigned a_drsize;		/* length of relocation info for data, in bytes */
-};
-
-#define N_TRSIZE(a)	((a).a_trsize)
-#define N_DRSIZE(a)	((a).a_drsize)
-#define N_SYMSIZE(a)	((a).a_syms)
-
-#endif /* __A_OUT_GNU_H__ */
diff --git a/include/asm-powerpc/a.out.h b/include/asm-powerpc/a.out.h
deleted file mode 100644
index 89cead6..0000000
--- a/include/asm-powerpc/a.out.h
+++ /dev/null
@@ -1,20 +0,0 @@
-#ifndef _ASM_POWERPC_A_OUT_H
-#define _ASM_POWERPC_A_OUT_H
-
-struct exec
-{
-	unsigned long a_info;	/* Use macros N_MAGIC, etc for access */
-	unsigned a_text;	/* length of text, in bytes */
-	unsigned a_data;	/* length of data, in bytes */
-	unsigned a_bss;		/* length of uninitialized data area for file, in bytes */
-	unsigned a_syms;	/* length of symbol table data in file, in bytes */
-	unsigned a_entry;	/* start address */
-	unsigned a_trsize;	/* length of relocation info for text, in bytes */
-	unsigned a_drsize;	/* length of relocation info for data, in bytes */
-};
-
-#define N_TRSIZE(a)	((a).a_trsize)
-#define N_DRSIZE(a)	((a).a_drsize)
-#define N_SYMSIZE(a)	((a).a_syms)
-
-#endif /* _ASM_POWERPC_A_OUT_H */
diff --git a/include/asm-sh/a.out.h b/include/asm-sh/a.out.h
deleted file mode 100644
index 1f93130..0000000
--- a/include/asm-sh/a.out.h
+++ /dev/null
@@ -1,20 +0,0 @@
-#ifndef __ASM_SH_A_OUT_H
-#define __ASM_SH_A_OUT_H
-
-struct exec
-{
-  unsigned long a_info;		/* Use macros N_MAGIC, etc for access */
-  unsigned a_text;		/* length of text, in bytes */
-  unsigned a_data;		/* length of data, in bytes */
-  unsigned a_bss;		/* length of uninitialized data area for file, in bytes */
-  unsigned a_syms;		/* length of symbol table data in file, in bytes */
-  unsigned a_entry;		/* start address */
-  unsigned a_trsize;		/* length of relocation info for text, in bytes */
-  unsigned a_drsize;		/* length of relocation info for data, in bytes */
-};
-
-#define N_TRSIZE(a)	((a).a_trsize)
-#define N_DRSIZE(a)	((a).a_drsize)
-#define N_SYMSIZE(a)	((a).a_syms)
-
-#endif /* __ASM_SH_A_OUT_H */
diff --git a/include/asm-xtensa/a.out.h b/include/asm-xtensa/a.out.h
deleted file mode 100644
index fdf1370..0000000
--- a/include/asm-xtensa/a.out.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * include/asm-xtensa/a.out.h
- *
- * Dummy a.out file. Xtensa does not support the a.out format, but the kernel
- * seems to depend on it.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_A_OUT_H
-#define _XTENSA_A_OUT_H
-
-struct exec
-{
-  unsigned long a_info;
-  unsigned a_text;
-  unsigned a_data;
-  unsigned a_bss;
-  unsigned a_syms;
-  unsigned a_entry;
-  unsigned a_trsize;
-  unsigned a_drsize;
-};
-
-#endif /* _XTENSA_A_OUT_H */


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 1/2] Remove redundant CONFIG_ARCH_SUPPORTS_AOUT
  2008-06-17  9:46             ` David Woodhouse
  2008-06-17 10:11               ` Adrian Bunk
  2008-06-27 21:12               ` [2.6 patch] remove unused asm/a.out.h files Adrian Bunk
@ 2008-09-05 16:27               ` David Woodhouse
  2008-09-05 16:28                 ` Kyle McMartin
  2008-09-05 16:27               ` [PATCH 2/2] Introduce HAVE_AOUT symbol to remove hard-coded arch list for BINFMT_AOUT David Woodhouse
  3 siblings, 1 reply; 41+ messages in thread
From: David Woodhouse @ 2008-09-05 16:27 UTC (permalink / raw)
  To: linux-kernel, linux-arch

We don't need this any more; arguably we never really did.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
---

I think I meant to send these two in for 2.6.27 (since they weren't
suitable during 2.6.26-rc), but I forgot. So I'll queue them up for
2.6.28.

 arch/alpha/Kconfig     |    3 ---
 arch/arm/Kconfig       |    3 ---
 arch/h8300/Kconfig     |    3 ---
 arch/m32r/Kconfig      |    3 ---
 arch/m68k/Kconfig      |    3 ---
 arch/m68knommu/Kconfig |    3 ---
 arch/mn10300/Kconfig   |    3 ---
 arch/parisc/Kconfig    |    3 ---
 arch/um/Kconfig.i386   |    3 ---
 arch/um/Kconfig.x86_64 |    3 ---
 arch/x86/Kconfig       |    5 +----
 fs/Kconfig.binfmt      |    3 +--
 12 files changed, 2 insertions(+), 36 deletions(-)

diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index 1bec55d..46f0ddf 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -68,9 +68,6 @@ config AUTO_IRQ_AFFINITY
 	depends on SMP
 	default y
 
-config ARCH_SUPPORTS_AOUT
-	def_bool y
-
 source "init/Kconfig"
 

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 70dba16..8803c39 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -140,9 +140,6 @@ config GENERIC_CALIBRATE_DELAY
 	bool
 	default y
 
-config ARCH_SUPPORTS_AOUT
-	def_bool y
-
 config ARCH_MAY_HAVE_PC_FDC
 	bool
 
diff --git a/arch/h8300/Kconfig b/arch/h8300/Kconfig
index 396ab05..107cb5b 100644
--- a/arch/h8300/Kconfig
+++ b/arch/h8300/Kconfig
@@ -66,9 +66,6 @@ config TIME_LOW_RES
 	bool
 	default y
 
-config ARCH_SUPPORTS_AOUT
-	def_bool y
-
 config NO_IOPORT
 	def_bool y
 
diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig
index a5f864c..8a165cc 100644
--- a/arch/m32r/Kconfig
+++ b/arch/m32r/Kconfig
@@ -36,9 +36,6 @@ config NO_IOPORT
 config NO_DMA
 	def_bool y
 
-config ARCH_SUPPORTS_AOUT
-	def_bool y
-
 config HZ
 	int
 	default 100
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index 8c5e1de..d42b996 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -53,9 +53,6 @@ config NO_IOPORT
 config NO_DMA
 	def_bool SUN3
 
-config ARCH_SUPPORTS_AOUT
-	def_bool y
-
 config HZ
 	int
 	default 100
diff --git a/arch/m68knommu/Kconfig b/arch/m68knommu/Kconfig
index 2e7515e..0a89983 100644
--- a/arch/m68knommu/Kconfig
+++ b/arch/m68knommu/Kconfig
@@ -73,9 +73,6 @@ config GENERIC_CLOCKEVENTS
 config NO_IOPORT
 	def_bool y
 
-config ARCH_SUPPORTS_AOUT
-	def_bool y
-
 source "init/Kconfig"
 
 menu "Processor type and features"
diff --git a/arch/mn10300/Kconfig b/arch/mn10300/Kconfig
index e856218..dd557c9 100644
--- a/arch/mn10300/Kconfig
+++ b/arch/mn10300/Kconfig
@@ -53,9 +53,6 @@ config QUICKLIST
 config ARCH_HAS_ILOG2_U32
 	def_bool y
 
-config ARCH_SUPPORTS_AOUT
-	def_bool n
-
 # Use the generic interrupt handling code in kernel/irq/
 config GENERIC_HARDIRQS
 	def_bool y
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
index a7d4fd3..8313fcc 100644
--- a/arch/parisc/Kconfig
+++ b/arch/parisc/Kconfig
@@ -76,9 +76,6 @@ config IRQ_PER_CPU
 	bool
 	default y
 
-config ARCH_SUPPORTS_AOUT
-	def_bool y
-
 # unless you want to implement ACPI on PA-RISC ... ;-)
 config PM
 	bool
diff --git a/arch/um/Kconfig.i386 b/arch/um/Kconfig.i386
index e09edfa..2a44e5c 100644
--- a/arch/um/Kconfig.i386
+++ b/arch/um/Kconfig.i386
@@ -42,6 +42,3 @@ config ARCH_REUSE_HOST_VSYSCALL_AREA
 config GENERIC_HWEIGHT
 	bool
 	default y
-
-config ARCH_SUPPORTS_AOUT
-	def_bool y
diff --git a/arch/um/Kconfig.x86_64 b/arch/um/Kconfig.x86_64
index 5696e7b..40b3407 100644
--- a/arch/um/Kconfig.x86_64
+++ b/arch/um/Kconfig.x86_64
@@ -37,6 +37,3 @@ config SMP_BROKEN
 config GENERIC_HWEIGHT
 	bool
 	default y
-
-config ARCH_SUPPORTS_AOUT
-	def_bool y
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index ed92864..2e8fa40 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -151,9 +151,6 @@ config AUDIT_ARCH
 	bool
 	default X86_64
 
-config ARCH_SUPPORTS_AOUT
-	def_bool y
-
 config ARCH_SUPPORTS_OPTIMIZED_INLINING
 	def_bool y
 
@@ -1759,7 +1756,7 @@ config IA32_EMULATION
 
 config IA32_AOUT
        tristate "IA32 a.out support"
-       depends on IA32_EMULATION && ARCH_SUPPORTS_AOUT
+       depends on IA32_EMULATION
        help
          Support old a.out binaries in the 32bit emulation.
 
diff --git a/fs/Kconfig.binfmt b/fs/Kconfig.binfmt
index 4a551af..e4df913 100644
--- a/fs/Kconfig.binfmt
+++ b/fs/Kconfig.binfmt
@@ -61,8 +61,7 @@ config BINFMT_SHARED_FLAT
 
 config BINFMT_AOUT
 	tristate "Kernel support for a.out and ECOFF binaries"
-	depends on ARCH_SUPPORTS_AOUT && \
-		(X86_32 || ALPHA || ARM || M68K)
+	depends on (X86_32 || ALPHA || ARM || M68K)
 	---help---
 	  A.out (Assembler.OUTput) is a set of formats for libraries and
 	  executables used in the earliest versions of UNIX.  Linux used
-- 
1.5.5.1

-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse@intel.com                              Intel Corporation




^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [PATCH 2/2] Introduce HAVE_AOUT symbol to remove hard-coded arch list for BINFMT_AOUT
  2008-06-17  9:46             ` David Woodhouse
                                 ` (2 preceding siblings ...)
  2008-09-05 16:27               ` [PATCH 1/2] Remove redundant CONFIG_ARCH_SUPPORTS_AOUT David Woodhouse
@ 2008-09-05 16:27               ` David Woodhouse
  3 siblings, 0 replies; 41+ messages in thread
From: David Woodhouse @ 2008-09-05 16:27 UTC (permalink / raw)
  To: linux-kernel, linux-arch

HAVE_AOUT doesn't quite do the same thing as the recently removed
ARCH_SUPPORTS_AOUT config option. That was set even on platforms where
binfmt_aout isn't supported, although it's not entirely clear why.

So it's best just to introduce a new symbol, handled consistently with
other similar HAVE_xxx symbols; with a simple 'select' in the arch Kconfig.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
---
 arch/alpha/Kconfig   |    1 +
 arch/arm/Kconfig     |    1 +
 arch/m68k/Kconfig    |    1 +
 arch/um/Kconfig.i386 |    5 +++--
 arch/x86/Kconfig     |    1 +
 fs/Kconfig.binfmt    |    5 ++++-
 6 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index 46f0ddf..ee35226 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -5,6 +5,7 @@
 config ALPHA
 	bool
 	default y
+	select HAVE_AOUT
 	select HAVE_IDE
 	select HAVE_OPROFILE
 	help
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 8803c39..2f7ef54 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -8,6 +8,7 @@ mainmenu "Linux Kernel Configuration"
 config ARM
 	bool
 	default y
+	select HAVE_AOUT
 	select HAVE_IDE
 	select RTC_LIB
 	select SYS_SUPPORTS_APM_EMULATION
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index d42b996..41e5bf0 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -5,6 +5,7 @@
 config M68K
 	bool
 	default y
+	select HAVE_AOUT
 	select HAVE_IDE
 
 config MMU
diff --git a/arch/um/Kconfig.i386 b/arch/um/Kconfig.i386
index 2a44e5c..1f57c11 100644
--- a/arch/um/Kconfig.i386
+++ b/arch/um/Kconfig.i386
@@ -9,8 +9,9 @@ config UML_X86
 	default y
 
 config X86_32
-       bool
-       default y
+	bool
+	default y
+  	select HAVE_AOUT
 
 config RWSEM_XCHGADD_ALGORITHM
 	def_bool y
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 2e8fa40..59b1d65 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -18,6 +18,7 @@ config X86_64
 ### Arch settings
 config X86
 	def_bool y
+	select HAVE_AOUT if X86_32
 	select HAVE_UNSTABLE_SCHED_CLOCK
 	select HAVE_IDE
 	select HAVE_OPROFILE
diff --git a/fs/Kconfig.binfmt b/fs/Kconfig.binfmt
index e4df913..17c9c5e 100644
--- a/fs/Kconfig.binfmt
+++ b/fs/Kconfig.binfmt
@@ -59,9 +59,12 @@ config BINFMT_SHARED_FLAT
 	help
 	  Support FLAT shared libraries
 
+config HAVE_AOUT
+       def_bool n
+
 config BINFMT_AOUT
 	tristate "Kernel support for a.out and ECOFF binaries"
-	depends on (X86_32 || ALPHA || ARM || M68K)
+	depends on HAVE_AOUT
 	---help---
 	  A.out (Assembler.OUTput) is a set of formats for libraries and
 	  executables used in the earliest versions of UNIX.  Linux used
-- 
1.5.5.1
-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse@intel.com                              Intel Corporation




^ permalink raw reply related	[flat|nested] 41+ messages in thread

* Re: [PATCH 1/2] Remove redundant CONFIG_ARCH_SUPPORTS_AOUT
  2008-09-05 16:27               ` [PATCH 1/2] Remove redundant CONFIG_ARCH_SUPPORTS_AOUT David Woodhouse
@ 2008-09-05 16:28                 ` Kyle McMartin
  2008-09-05 17:17                   ` [PATCH 3/2] Remove asm/a.out.h files for all architectures without a.out support David Woodhouse
  2008-09-05 17:17                   ` [PATCH 1/2] Remove redundant CONFIG_ARCH_SUPPORTS_AOUT David Woodhouse
  0 siblings, 2 replies; 41+ messages in thread
From: Kyle McMartin @ 2008-09-05 16:28 UTC (permalink / raw)
  To: David Woodhouse; +Cc: linux-kernel, linux-arch

On Fri, Sep 05, 2008 at 05:27:01PM +0100, David Woodhouse wrote:
> diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
> index a7d4fd3..8313fcc 100644
> --- a/arch/parisc/Kconfig
> +++ b/arch/parisc/Kconfig
> @@ -76,9 +76,6 @@ config IRQ_PER_CPU
>  	bool
>  	default y
>  
> -config ARCH_SUPPORTS_AOUT
> -	def_bool y
> -
>  # unless you want to implement ACPI on PA-RISC ... ;-)
>  config PM
>  	bool

This isn't even correct. PA-RISC only supports SOM or ELF...

^ permalink raw reply	[flat|nested] 41+ messages in thread

* [PATCH 3/2] Remove asm/a.out.h files for all architectures without a.out support.
  2008-09-05 16:28                 ` Kyle McMartin
@ 2008-09-05 17:17                   ` David Woodhouse
  2008-09-05 17:17                   ` [PATCH 1/2] Remove redundant CONFIG_ARCH_SUPPORTS_AOUT David Woodhouse
  1 sibling, 0 replies; 41+ messages in thread
From: David Woodhouse @ 2008-09-05 17:17 UTC (permalink / raw)
  To: linux-kernel, linux-arch; +Cc: Kyle McMartin, Adrian Bunk

From: Adrian Bunk <bunk@kernel.org>

This patch also includes the required removal of (unused) inclusion of
<asm/a.out.h> <linux/a.out.h>'s in the arch/ code for these
architectures.

[dwmw2: updated for 2.6.27-rc]
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
---
 arch/avr32/include/asm/a.out.h          |   20 -----------------
 arch/blackfin/include/asm/a.out.h       |   19 ----------------
 arch/cris/arch-v10/boot/tools/build.c   |    1 -
 arch/h8300/include/asm/a.out.h          |   20 -----------------
 arch/h8300/kernel/process.c             |    1 -
 arch/ia64/include/asm/a.out.h           |   32 ----------------------------
 arch/ia64/mm/init.c                     |    1 -
 arch/m68knommu/include/asm/a.out.h      |    1 -
 arch/m68knommu/kernel/process.c         |    1 -
 arch/m68knommu/kernel/traps.c           |    1 -
 arch/mips/kernel/process.c              |    1 -
 arch/mips/kernel/syscall.c              |    1 -
 arch/powerpc/include/asm/a.out.h        |   20 -----------------
 arch/powerpc/kernel/softemu8xx.c        |    1 -
 arch/powerpc/kernel/traps.c             |    1 -
 arch/powerpc/platforms/chrp/setup.c     |    1 -
 arch/powerpc/platforms/maple/setup.c    |    1 -
 arch/powerpc/platforms/powermac/setup.c |    1 -
 arch/powerpc/platforms/pseries/setup.c  |    1 -
 include/asm-cris/a.out.h                |   26 -----------------------
 include/asm-m32r/a.out.h                |   20 -----------------
 include/asm-mips/a.out.h                |   35 -------------------------------
 include/asm-parisc/a.out.h              |   20 -----------------
 include/asm-xtensa/a.out.h              |   29 -------------------------
 24 files changed, 0 insertions(+), 255 deletions(-)
 delete mode 100644 arch/avr32/include/asm/a.out.h
 delete mode 100644 arch/blackfin/include/asm/a.out.h
 delete mode 100644 arch/h8300/include/asm/a.out.h
 delete mode 100644 arch/ia64/include/asm/a.out.h
 delete mode 100644 arch/m68knommu/include/asm/a.out.h
 delete mode 100644 arch/powerpc/include/asm/a.out.h
 delete mode 100644 include/asm-cris/a.out.h
 delete mode 100644 include/asm-m32r/a.out.h
 delete mode 100644 include/asm-mips/a.out.h
 delete mode 100644 include/asm-parisc/a.out.h
 delete mode 100644 include/asm-xtensa/a.out.h

diff --git a/arch/avr32/include/asm/a.out.h b/arch/avr32/include/asm/a.out.h
deleted file mode 100644
index e46375a..0000000
--- a/arch/avr32/include/asm/a.out.h
+++ /dev/null
@@ -1,20 +0,0 @@
-#ifndef __ASM_AVR32_A_OUT_H
-#define __ASM_AVR32_A_OUT_H
-
-struct exec
-{
-  unsigned long a_info;		/* Use macros N_MAGIC, etc for access */
-  unsigned a_text;		/* length of text, in bytes */
-  unsigned a_data;		/* length of data, in bytes */
-  unsigned a_bss;		/* length of uninitialized data area for file, in bytes */
-  unsigned a_syms;		/* length of symbol table data in file, in bytes */
-  unsigned a_entry;		/* start address */
-  unsigned a_trsize;		/* length of relocation info for text, in bytes */
-  unsigned a_drsize;		/* length of relocation info for data, in bytes */
-};
-
-#define N_TRSIZE(a)	((a).a_trsize)
-#define N_DRSIZE(a)	((a).a_drsize)
-#define N_SYMSIZE(a)	((a).a_syms)
-
-#endif /* __ASM_AVR32_A_OUT_H */
diff --git a/arch/blackfin/include/asm/a.out.h b/arch/blackfin/include/asm/a.out.h
deleted file mode 100644
index 6c3d652..0000000
--- a/arch/blackfin/include/asm/a.out.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifndef __BFIN_A_OUT_H__
-#define __BFIN_A_OUT_H__
-
-struct exec {
-	unsigned long a_info;	/* Use macros N_MAGIC, etc for access */
-	unsigned a_text;	/* length of text, in bytes */
-	unsigned a_data;	/* length of data, in bytes */
-	unsigned a_bss;		/* length of uninitialized data area for file, in bytes */
-	unsigned a_syms;	/* length of symbol table data in file, in bytes */
-	unsigned a_entry;	/* start address */
-	unsigned a_trsize;	/* length of relocation info for text, in bytes */
-	unsigned a_drsize;	/* length of relocation info for data, in bytes */
-};
-
-#define N_TRSIZE(a)	((a).a_trsize)
-#define N_DRSIZE(a)	((a).a_drsize)
-#define N_SYMSIZE(a)	((a).a_syms)
-
-#endif				/* __BFIN_A_OUT_H__ */
diff --git a/arch/cris/arch-v10/boot/tools/build.c b/arch/cris/arch-v10/boot/tools/build.c
index 2f9bbb2..c8adef3 100644
--- a/arch/cris/arch-v10/boot/tools/build.c
+++ b/arch/cris/arch-v10/boot/tools/build.c
@@ -30,7 +30,6 @@
 #include <sys/sysmacros.h>
 #include <unistd.h>	/* contains read/write */
 #include <fcntl.h>
-#include <linux/a.out.h>
 #include <errno.h>
 
 #define MINIX_HEADER 32
diff --git a/arch/h8300/include/asm/a.out.h b/arch/h8300/include/asm/a.out.h
deleted file mode 100644
index ded780f..0000000
--- a/arch/h8300/include/asm/a.out.h
+++ /dev/null
@@ -1,20 +0,0 @@
-#ifndef __H8300_A_OUT_H__
-#define __H8300_A_OUT_H__
-
-struct exec
-{
-  unsigned long a_info;		/* Use macros N_MAGIC, etc for access */
-  unsigned a_text;		/* length of text, in bytes */
-  unsigned a_data;		/* length of data, in bytes */
-  unsigned a_bss;		/* length of uninitialized data area for file, in bytes */
-  unsigned a_syms;		/* length of symbol table data in file, in bytes */
-  unsigned a_entry;		/* start address */
-  unsigned a_trsize;		/* length of relocation info for text, in bytes */
-  unsigned a_drsize;		/* length of relocation info for data, in bytes */
-};
-
-#define N_TRSIZE(a)	((a).a_trsize)
-#define N_DRSIZE(a)	((a).a_drsize)
-#define N_SYMSIZE(a)	((a).a_syms)
-
-#endif /* __H8300_A_OUT_H__ */
diff --git a/arch/h8300/kernel/process.c b/arch/h8300/kernel/process.c
index dfbe7ab..a8ef654 100644
--- a/arch/h8300/kernel/process.c
+++ b/arch/h8300/kernel/process.c
@@ -34,7 +34,6 @@
 #include <linux/ptrace.h>
 #include <linux/slab.h>
 #include <linux/user.h>
-#include <linux/a.out.h>
 #include <linux/interrupt.h>
 #include <linux/reboot.h>
 #include <linux/fs.h>
diff --git a/arch/ia64/include/asm/a.out.h b/arch/ia64/include/asm/a.out.h
deleted file mode 100644
index 193dcfb..0000000
--- a/arch/ia64/include/asm/a.out.h
+++ /dev/null
@@ -1,32 +0,0 @@
-#ifndef _ASM_IA64_A_OUT_H
-#define _ASM_IA64_A_OUT_H
-
-/*
- * No a.out format has been (or should be) defined so this file is
- * just a dummy that allows us to get binfmt_elf compiled.  It
- * probably would be better to clean up binfmt_elf.c so it does not
- * necessarily depend on there being a.out support.
- *
- * Modified 1998-2002
- *	David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co.
- */
-
-#include <linux/types.h>
-
-struct exec {
-	unsigned long a_info;
-	unsigned long a_text;
-	unsigned long a_data;
-	unsigned long a_bss;
-	unsigned long a_entry;
-};
-
-#define N_TXTADDR(x)	0
-#define N_DATADDR(x)	0
-#define N_BSSADDR(x)	0
-#define N_DRSIZE(x)	0
-#define N_TRSIZE(x)	0
-#define N_SYMSIZE(x)	0
-#define N_TXTOFF(x)	0
-
-#endif /* _ASM_IA64_A_OUT_H */
diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c
index 200100e..f482a90 100644
--- a/arch/ia64/mm/init.c
+++ b/arch/ia64/mm/init.c
@@ -21,7 +21,6 @@
 #include <linux/bitops.h>
 #include <linux/kexec.h>
 
-#include <asm/a.out.h>
 #include <asm/dma.h>
 #include <asm/ia32.h>
 #include <asm/io.h>
diff --git a/arch/m68knommu/include/asm/a.out.h b/arch/m68knommu/include/asm/a.out.h
deleted file mode 100644
index ce18ef9..0000000
--- a/arch/m68knommu/include/asm/a.out.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-m68k/a.out.h>
diff --git a/arch/m68knommu/kernel/process.c b/arch/m68knommu/kernel/process.c
index 47502d5..3f2d774 100644
--- a/arch/m68knommu/kernel/process.c
+++ b/arch/m68knommu/kernel/process.c
@@ -25,7 +25,6 @@
 #include <linux/ptrace.h>
 #include <linux/slab.h>
 #include <linux/user.h>
-#include <linux/a.out.h>
 #include <linux/interrupt.h>
 #include <linux/reboot.h>
 #include <linux/fs.h>
diff --git a/arch/m68knommu/kernel/traps.c b/arch/m68knommu/kernel/traps.c
index 46f8f9d..5d5d56b 100644
--- a/arch/m68knommu/kernel/traps.c
+++ b/arch/m68knommu/kernel/traps.c
@@ -22,7 +22,6 @@
 #include <linux/mm.h>
 #include <linux/module.h>
 #include <linux/types.h>
-#include <linux/a.out.h>
 #include <linux/user.h>
 #include <linux/string.h>
 #include <linux/linkage.h>
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c
index b16facd..17edc69 100644
--- a/arch/mips/kernel/process.c
+++ b/arch/mips/kernel/process.c
@@ -22,7 +22,6 @@
 #include <linux/personality.h>
 #include <linux/sys.h>
 #include <linux/user.h>
-#include <linux/a.out.h>
 #include <linux/init.h>
 #include <linux/completion.h>
 #include <linux/kallsyms.h>
diff --git a/arch/mips/kernel/syscall.c b/arch/mips/kernel/syscall.c
index 343015a..37970d9 100644
--- a/arch/mips/kernel/syscall.c
+++ b/arch/mips/kernel/syscall.c
@@ -7,7 +7,6 @@
  * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
  * Copyright (C) 2001 MIPS Technologies, Inc.
  */
-#include <linux/a.out.h>
 #include <linux/capability.h>
 #include <linux/errno.h>
 #include <linux/linkage.h>
diff --git a/arch/powerpc/include/asm/a.out.h b/arch/powerpc/include/asm/a.out.h
deleted file mode 100644
index 89cead6..0000000
--- a/arch/powerpc/include/asm/a.out.h
+++ /dev/null
@@ -1,20 +0,0 @@
-#ifndef _ASM_POWERPC_A_OUT_H
-#define _ASM_POWERPC_A_OUT_H
-
-struct exec
-{
-	unsigned long a_info;	/* Use macros N_MAGIC, etc for access */
-	unsigned a_text;	/* length of text, in bytes */
-	unsigned a_data;	/* length of data, in bytes */
-	unsigned a_bss;		/* length of uninitialized data area for file, in bytes */
-	unsigned a_syms;	/* length of symbol table data in file, in bytes */
-	unsigned a_entry;	/* start address */
-	unsigned a_trsize;	/* length of relocation info for text, in bytes */
-	unsigned a_drsize;	/* length of relocation info for data, in bytes */
-};
-
-#define N_TRSIZE(a)	((a).a_trsize)
-#define N_DRSIZE(a)	((a).a_drsize)
-#define N_SYMSIZE(a)	((a).a_syms)
-
-#endif /* _ASM_POWERPC_A_OUT_H */
diff --git a/arch/powerpc/kernel/softemu8xx.c b/arch/powerpc/kernel/softemu8xx.c
index c906c4b..23c8c5e 100644
--- a/arch/powerpc/kernel/softemu8xx.c
+++ b/arch/powerpc/kernel/softemu8xx.c
@@ -23,7 +23,6 @@
 #include <linux/ptrace.h>
 #include <linux/slab.h>
 #include <linux/user.h>
-#include <linux/a.out.h>
 #include <linux/interrupt.h>
 
 #include <asm/pgtable.h>
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index 81ccb8d..f5def6c 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -23,7 +23,6 @@
 #include <linux/ptrace.h>
 #include <linux/slab.h>
 #include <linux/user.h>
-#include <linux/a.out.h>
 #include <linux/interrupt.h>
 #include <linux/init.h>
 #include <linux/module.h>
diff --git a/arch/powerpc/platforms/chrp/setup.c b/arch/powerpc/platforms/chrp/setup.c
index 1ba7ce5..272d79a 100644
--- a/arch/powerpc/platforms/chrp/setup.c
+++ b/arch/powerpc/platforms/chrp/setup.c
@@ -17,7 +17,6 @@
 #include <linux/ptrace.h>
 #include <linux/slab.h>
 #include <linux/user.h>
-#include <linux/a.out.h>
 #include <linux/tty.h>
 #include <linux/major.h>
 #include <linux/interrupt.h>
diff --git a/arch/powerpc/platforms/maple/setup.c b/arch/powerpc/platforms/maple/setup.c
index 3647147..d4c61c3 100644
--- a/arch/powerpc/platforms/maple/setup.c
+++ b/arch/powerpc/platforms/maple/setup.c
@@ -23,7 +23,6 @@
 #include <linux/ptrace.h>
 #include <linux/slab.h>
 #include <linux/user.h>
-#include <linux/a.out.h>
 #include <linux/tty.h>
 #include <linux/string.h>
 #include <linux/delay.h>
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c
index 88ccf3a..82c14d2 100644
--- a/arch/powerpc/platforms/powermac/setup.c
+++ b/arch/powerpc/platforms/powermac/setup.c
@@ -33,7 +33,6 @@
 #include <linux/ptrace.h>
 #include <linux/slab.h>
 #include <linux/user.h>
-#include <linux/a.out.h>
 #include <linux/tty.h>
 #include <linux/string.h>
 #include <linux/delay.h>
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index 7b01d67..ec34170 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -25,7 +25,6 @@
 #include <linux/unistd.h>
 #include <linux/slab.h>
 #include <linux/user.h>
-#include <linux/a.out.h>
 #include <linux/tty.h>
 #include <linux/major.h>
 #include <linux/interrupt.h>
diff --git a/include/asm-cris/a.out.h b/include/asm-cris/a.out.h
deleted file mode 100644
index c82e9f9..0000000
--- a/include/asm-cris/a.out.h
+++ /dev/null
@@ -1,26 +0,0 @@
-#ifndef __CRIS_A_OUT_H__
-#define __CRIS_A_OUT_H__
-
-/* we don't support a.out binaries on Linux/CRIS anyway, so this is
- * not really used but still needed because binfmt_elf.c for some reason
- * wants to know about a.out even if there is no interpreter available...
- */
-
-struct exec
-{
-  unsigned long a_info;		/* Use macros N_MAGIC, etc for access */
-  unsigned a_text;		/* length of text, in bytes */
-  unsigned a_data;		/* length of data, in bytes */
-  unsigned a_bss;		/* length of uninitialized data area for file, in bytes */
-  unsigned a_syms;		/* length of symbol table data in file, in bytes */
-  unsigned a_entry;		/* start address */
-  unsigned a_trsize;		/* length of relocation info for text, in bytes */
-  unsigned a_drsize;		/* length of relocation info for data, in bytes */
-};
-
-
-#define N_TRSIZE(a)	((a).a_trsize)
-#define N_DRSIZE(a)	((a).a_drsize)
-#define N_SYMSIZE(a)	((a).a_syms)
-
-#endif
diff --git a/include/asm-m32r/a.out.h b/include/asm-m32r/a.out.h
deleted file mode 100644
index ab150f5..0000000
--- a/include/asm-m32r/a.out.h
+++ /dev/null
@@ -1,20 +0,0 @@
-#ifndef _ASM_M32R_A_OUT_H
-#define _ASM_M32R_A_OUT_H
-
-struct exec
-{
-  unsigned long a_info;		/* Use macros N_MAGIC, etc for access */
-  unsigned a_text;		/* length of text, in bytes */
-  unsigned a_data;		/* length of data, in bytes */
-  unsigned a_bss;		/* length of uninitialized data area for file, in bytes */
-  unsigned a_syms;		/* length of symbol table data in file, in bytes */
-  unsigned a_entry;		/* start address */
-  unsigned a_trsize;		/* length of relocation info for text, in bytes */
-  unsigned a_drsize;		/* length of relocation info for data, in bytes */
-};
-
-#define N_TRSIZE(a)	((a).a_trsize)
-#define N_DRSIZE(a)	((a).a_drsize)
-#define N_SYMSIZE(a)	((a).a_syms)
-
-#endif /* _ASM_M32R_A_OUT_H */
diff --git a/include/asm-mips/a.out.h b/include/asm-mips/a.out.h
deleted file mode 100644
index cad8371..0000000
--- a/include/asm-mips/a.out.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 1994 - 1999, 2003 by Ralf Baechle
- */
-#ifndef _ASM_A_OUT_H
-#define _ASM_A_OUT_H
-
-#ifdef __KERNEL__
-
-
-#endif
-
-struct exec
-{
-	unsigned long a_info;	/* Use macros N_MAGIC, etc for access */
-	unsigned a_text;	/* length of text, in bytes */
-	unsigned a_data;	/* length of data, in bytes */
-	unsigned a_bss;		/* length of uninitialized data area for
-				    file, in bytes */
-	unsigned a_syms;	/* length of symbol table data in file,
-				   in bytes */
-	unsigned a_entry;	/* start address */
-	unsigned a_trsize;	/* length of relocation info for text, in
-				    bytes */
-	unsigned a_drsize;	/* length of relocation info for data, in bytes */
-};
-
-#define N_TRSIZE(a)	((a).a_trsize)
-#define N_DRSIZE(a)	((a).a_drsize)
-#define N_SYMSIZE(a)	((a).a_syms)
-
-#endif /* _ASM_A_OUT_H */
diff --git a/include/asm-parisc/a.out.h b/include/asm-parisc/a.out.h
deleted file mode 100644
index eb04e34..0000000
--- a/include/asm-parisc/a.out.h
+++ /dev/null
@@ -1,20 +0,0 @@
-#ifndef __PARISC_A_OUT_H__
-#define __PARISC_A_OUT_H__
-
-struct exec
-{
-  unsigned int a_info;		/* Use macros N_MAGIC, etc for access */
-  unsigned a_text;		/* length of text, in bytes */
-  unsigned a_data;		/* length of data, in bytes */
-  unsigned a_bss;		/* length of uninitialized data area for file, in bytes */
-  unsigned a_syms;		/* length of symbol table data in file, in bytes */
-  unsigned a_entry;		/* start address */
-  unsigned a_trsize;		/* length of relocation info for text, in bytes */
-  unsigned a_drsize;		/* length of relocation info for data, in bytes */
-};
-
-#define N_TRSIZE(a)	((a).a_trsize)
-#define N_DRSIZE(a)	((a).a_drsize)
-#define N_SYMSIZE(a)	((a).a_syms)
-
-#endif /* __A_OUT_GNU_H__ */
diff --git a/include/asm-xtensa/a.out.h b/include/asm-xtensa/a.out.h
deleted file mode 100644
index fdf1370..0000000
--- a/include/asm-xtensa/a.out.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * include/asm-xtensa/a.out.h
- *
- * Dummy a.out file. Xtensa does not support the a.out format, but the kernel
- * seems to depend on it.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
-#ifndef _XTENSA_A_OUT_H
-#define _XTENSA_A_OUT_H
-
-struct exec
-{
-  unsigned long a_info;
-  unsigned a_text;
-  unsigned a_data;
-  unsigned a_bss;
-  unsigned a_syms;
-  unsigned a_entry;
-  unsigned a_trsize;
-  unsigned a_drsize;
-};
-
-#endif /* _XTENSA_A_OUT_H */
-- 
1.5.5.1
-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse@intel.com                              Intel Corporation




^ permalink raw reply related	[flat|nested] 41+ messages in thread

* Re: [PATCH 1/2] Remove redundant CONFIG_ARCH_SUPPORTS_AOUT
  2008-09-05 16:28                 ` Kyle McMartin
  2008-09-05 17:17                   ` [PATCH 3/2] Remove asm/a.out.h files for all architectures without a.out support David Woodhouse
@ 2008-09-05 17:17                   ` David Woodhouse
  1 sibling, 0 replies; 41+ messages in thread
From: David Woodhouse @ 2008-09-05 17:17 UTC (permalink / raw)
  To: Kyle McMartin; +Cc: linux-kernel, linux-arch, bunk

On Fri, 2008-09-05 at 12:28 -0400, Kyle McMartin wrote:
> On Fri, Sep 05, 2008 at 05:27:01PM +0100, David Woodhouse wrote:
> > diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
> > index a7d4fd3..8313fcc 100644
> > --- a/arch/parisc/Kconfig
> > +++ b/arch/parisc/Kconfig
> > @@ -76,9 +76,6 @@ config IRQ_PER_CPU
> >  	bool
> >  	default y
> >  
> > -config ARCH_SUPPORTS_AOUT
> > -	def_bool y
> > -
> >  # unless you want to implement ACPI on PA-RISC ... ;-)
> >  config PM
> >  	bool
> 
> This isn't even correct. PA-RISC only supports SOM or ELF...

Yeah, ARCH_SUPPORTS_AOUT was a bit b0rked from the beginning.

Hm, that reminds me -- I was supposed to pick up Adrian's patch to
remove a bunch of pointless <asm/a.out.h> files... now added to my tree
and sent.

-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse@intel.com                              Intel Corporation




^ permalink raw reply	[flat|nested] 41+ messages in thread

end of thread, other threads:[~2008-09-05 17:18 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-15 21:07 [PATCH] export linux/a.out.h Peter Korsgaard
2008-06-15 21:32 ` David Woodhouse
2008-06-16  8:29   ` [PATCH v2] " Peter Korsgaard
2008-06-16 12:01     ` David Woodhouse
2008-06-16 12:17       ` Adrian Bunk
2008-06-16 12:26         ` David Woodhouse
2008-06-16 13:48           ` David Howells
2008-06-16 15:47             ` David Woodhouse
2008-06-17  8:42           ` architectures with ARCH_SUPPORTS_AOUT but no binfmt_aout Adrian Bunk
2008-06-17  9:46             ` David Woodhouse
2008-06-17 10:11               ` Adrian Bunk
2008-06-17 10:18                 ` David Woodhouse
2008-06-17 10:24                   ` Adrian Bunk
2008-06-17 11:28                 ` David Woodhouse
2008-06-17 12:23                   ` Sam Ravnborg
2008-06-17 12:29                     ` David Woodhouse
2008-06-17 12:37                       ` Sam Ravnborg
2008-06-17 12:54                         ` David Woodhouse
2008-06-22  9:49                   ` Adrian Bunk
2008-06-22 11:40                     ` David Woodhouse
2008-06-22 23:53                       ` David McCullough
2008-06-24 11:46                       ` Adrian Bunk
2008-06-27 16:27                         ` Jeff Dike
2008-06-27 21:12               ` [2.6 patch] remove unused asm/a.out.h files Adrian Bunk
2008-09-05 16:27               ` [PATCH 1/2] Remove redundant CONFIG_ARCH_SUPPORTS_AOUT David Woodhouse
2008-09-05 16:28                 ` Kyle McMartin
2008-09-05 17:17                   ` [PATCH 3/2] Remove asm/a.out.h files for all architectures without a.out support David Woodhouse
2008-09-05 17:17                   ` [PATCH 1/2] Remove redundant CONFIG_ARCH_SUPPORTS_AOUT David Woodhouse
2008-09-05 16:27               ` [PATCH 2/2] Introduce HAVE_AOUT symbol to remove hard-coded arch list for BINFMT_AOUT David Woodhouse
2008-06-17 11:28             ` architectures with ARCH_SUPPORTS_AOUT but no binfmt_aout Matthew Wilcox
2008-06-24  4:15             ` Paul Mundt
2008-06-16 12:20       ` [PATCH v2] export linux/a.out.h Peter Korsgaard
2008-06-16 11:11         ` [PATCH 1/4] Include <asm/a.out.h> in fs/exec.c only for Alpha David Woodhouse
2008-06-16 11:18         ` [PATCH 2/4] Remove last traces of a.out support from ELF loader David Woodhouse
2008-06-16 11:18         ` [PATCH 3/4] Remove #ifdef CONFIG_ARCH_SUPPORTS_AOUT from <linux/a.out.h> David Woodhouse
2008-06-16 11:24         ` [PATCH 4/4] Export <linux/a.out.h> to userspace again David Woodhouse
2008-06-16 13:22         ` [PATCH v2] export linux/a.out.h David Woodhouse
2008-06-16 14:40       ` Andi Kleen
2008-06-16 15:15         ` David Woodhouse
2008-06-15 22:33 ` [PATCH] " Arjan van de Ven
2008-06-16  7:03   ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox