Re: [PATCH 1/2] Suppress A.OUT library support in ELF binfmt if !CONFIG_BINFMT_AOUT [try #3]

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: David Howells
Date: Wednesday, November 7, 2007 - 4:30 pm

David Woodhouse <dwmw2@infradead.org> wrote:


AOUT support can be mostly built into a module, but a small part of it that is
arch-specific still gets built into the main kernel.  *That* is the main thing
that is wrong.

I suppose it might be possible to move those bits of the main kernel into
inline functions in asm/a.out.h and thus include them directly in
binfmt_aout.ko.


No, it's not that simple.  If asm/a.out.h doesn't exist, then various bits of
the kernel break that shouldn't.  fs/binfmt_elf.c for example.  fs/exec.c for
another.  They *expect* bits of the asm/a.out.h and linux/a.out.h to exist -
which they shouldn't.

Not exporting them isn't by itself sufficient.  The required constants
themselves are not defined for an arch that doesn't have the support, and so
the core code must not depend on them.  This patch fixes that.

Furthermore, STACK_TOP and STACK_TOP_MAX don't belong in asm/a.out.h as far as
I can tell.  They should probably be wherever TASK_SIZE resides (ie:
asm/processor.h).

David
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 1/2] Suppress A.OUT library support in ELF binf ..., David Howells, (Wed Nov 7, 4:30 pm)