Commit:     8e9073ed027771bcdee4033eb900a3c09ac90a19
Parent:     045f902de5a6eb5927c0f092c38be7a381f634f0
Author:     Andi Kleen <[EMAIL PROTECTED]>
AuthorDate: Tue Oct 16 23:26:48 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed Oct 17 08:42:51 2007 -0700

    Deprecate a.out ELF interpreters
    The Linux ELF loader is quite complicated and messy code (that could
    probably need a rewrite, but that's a different chapter).  One particular
    messy part in it is the support for non ELF a.out ld.sos.  This was
    originally added to make transition from a.out to ELF easier because an
    a.out ELF could be still build using an older a.out toolkit.  But by
    now that should be fully obsolete and removing it would clean up
    binfmt_elf.c up a bit.
    I propose to deprecate this support and remove for 2.6.25.
    Drawback is that someone still runs their system with a.out
    they would need to update the when updating to a new kernel.
    This patch just adds an entry to the deprecation file and a printk
    warning users.
    [EMAIL PROTECTED]: better warning message]
    Signed-off-by: Andi Kleen <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 Documentation/feature-removal-schedule.txt |   11 +++++++++++
 fs/binfmt_elf.c                            |    8 ++++++++
 2 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/Documentation/feature-removal-schedule.txt 
index fb8258e..280ec06 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -82,6 +82,17 @@ Who: Dominik Brodowski <[EMAIL PROTECTED]>
+What:  a.out interpreter support for ELF executables
+When:  2.6.25
+Files: fs/binfmt_elf.c
+Why:   Using a.out interpreters for ELF executables was a feature for
+       transition from a.out to ELF. But now it is unlikely to be still
+       needed anymore and removing it would simplify the hairy ELF
+       loader code.
+Who:   Andi Kleen <[EMAIL PROTECTED]>
 What:  remove EXPORT_SYMBOL(kernel_thread)
 When:  August 2006
 Files: arch/*/kernel/*_ksyms.c
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index 3dc6a12..66cd711 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -730,6 +730,7 @@ static int load_elf_binary(struct linux_binprm *bprm, 
struct pt_regs *regs)
        /* Some simple consistency checks for the interpreter */
        if (elf_interpreter) {
+               static int warn;
                interpreter_type = INTERPRETER_ELF | INTERPRETER_AOUT;
                /* Now figure out which format our binary is */
@@ -741,6 +742,13 @@ static int load_elf_binary(struct linux_binprm *bprm, 
struct pt_regs *regs)
                if (memcmp(loc->interp_elf_ex.e_ident, ELFMAG, SELFMAG) != 0)
                        interpreter_type &= ~INTERPRETER_ELF;
+               if (interpreter_type == INTERPRETER_AOUT && warn < 10) {
+                       printk(KERN_WARNING "a.out ELF interpreter %s is "
+                               "deprecated and will not be supported "
+                               "after Linux 2.6.25\n", elf_interpreter);
+                       warn++;
+               }
                retval = -ELIBBAD;
                if (!interpreter_type)
                        goto out_free_dentry;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to