aboutsummaryrefslogtreecommitdiffstats
path: root/fs/binfmt_elf.c
diff options
context:
space:
mode:
authorAndi Kleen <ak@novell.com>2007-10-17 02:26:48 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-17 11:42:51 -0400
commit8e9073ed027771bcdee4033eb900a3c09ac90a19 (patch)
treebe445d976b82a8337af87b6e64f1ccfb23222373 /fs/binfmt_elf.c
parent045f902de5a6eb5927c0f092c38be7a381f634f0 (diff)
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 ld.so 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 ld.so they would need to update the ld.so when updating to a new kernel. This patch just adds an entry to the deprecation file and a printk warning users. [akpm@linux-foundation.org: better warning message] Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/binfmt_elf.c')
-rw-r--r--fs/binfmt_elf.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index 3dc6a123fa10..66cd711a6b1a 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)
730 730
731 /* Some simple consistency checks for the interpreter */ 731 /* Some simple consistency checks for the interpreter */
732 if (elf_interpreter) { 732 if (elf_interpreter) {
733 static int warn;
733 interpreter_type = INTERPRETER_ELF | INTERPRETER_AOUT; 734 interpreter_type = INTERPRETER_ELF | INTERPRETER_AOUT;
734 735
735 /* Now figure out which format our binary is */ 736 /* 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)
741 if (memcmp(loc->interp_elf_ex.e_ident, ELFMAG, SELFMAG) != 0) 742 if (memcmp(loc->interp_elf_ex.e_ident, ELFMAG, SELFMAG) != 0)
742 interpreter_type &= ~INTERPRETER_ELF; 743 interpreter_type &= ~INTERPRETER_ELF;
743 744
745 if (interpreter_type == INTERPRETER_AOUT && warn < 10) {
746 printk(KERN_WARNING "a.out ELF interpreter %s is "
747 "deprecated and will not be supported "
748 "after Linux 2.6.25\n", elf_interpreter);
749 warn++;
750 }
751
744 retval = -ELIBBAD; 752 retval = -ELIBBAD;
745 if (!interpreter_type) 753 if (!interpreter_type)
746 goto out_free_dentry; 754 goto out_free_dentry;