compat_aout has so far survived the purges by keeping its head down,
but now its time has come.  this code does not and cannot work anymore,
since a.out binaries use system calls long since removed.

not shown in the diff is removing of the compat/aout directory.  in
theory, this code could be used by another architecture.  but nobody's
moving to elf soon, and even so, they can jump the old fashioned way
by downloading a snapshot, so i'll be deleting that as well.

Index: arch/i386/conf/files.i386
===================================================================
RCS file: /cvs/src/sys/arch/i386/conf/files.i386,v
retrieving revision 1.210
diff -u -p -r1.210 files.i386
--- arch/i386/conf/files.i386   27 May 2012 12:24:33 -0000      1.210
+++ arch/i386/conf/files.i386   5 Sep 2012 20:25:40 -0000
@@ -270,9 +270,6 @@ file        arch/i386/i386/vm86.c                   vm86
 file   arch/i386/i386/kvm86.c                  kvm86
 file   arch/i386/i386/kvm86call.S              kvm86
 
-# a.out binary compatibility (COMPAT_AOUT)
-include "compat/aout/files.aout"
-
 # Linux binary compatibility (COMPAT_LINUX)
 include "compat/linux/files.linux"
 file   arch/i386/i386/linux_machdep.c          compat_linux
Index: arch/i386/i386/trap.c
===================================================================
RCS file: /cvs/src/sys/arch/i386/i386/trap.c,v
retrieving revision 1.103
diff -u -p -r1.103 trap.c
--- arch/i386/i386/trap.c       7 Aug 2012 05:16:53 -0000       1.103
+++ arch/i386/i386/trap.c       5 Sep 2012 20:26:46 -0000
@@ -71,9 +71,6 @@
 #include <compat/linux/linux_syscall.h>
 extern struct emul emul_linux_aout, emul_linux_elf;
 #endif
-#ifdef COMPAT_AOUT
-extern struct emul emul_aout;
-#endif
 #ifdef KVM86
 #include <machine/kvm86.h>
 #define KVM86MODE (kvm86_incall)
@@ -588,11 +585,7 @@ syscall(struct trapframe *frame)
                 * Like syscall, but code is a quad, so as to maintain
                 * quad alignment for the rest of the arguments.
                 */
-               if (callp != sysent
-#ifdef COMPAT_AOUT
-                   && p->p_emul != &emul_aout
-#endif
-                   )
+               if (callp != sysent)
                        break;
                copyin(params + _QUAD_LOWWORD * sizeof(int), &code, 
sizeof(int));
                params += sizeof(quad_t);
Index: kern/exec_aout.c
===================================================================
RCS file: /cvs/src/sys/kern/exec_aout.c,v
retrieving revision 1.10
diff -u -p -r1.10 exec_aout.c
--- kern/exec_aout.c    12 Nov 2005 04:31:24 -0000      1.10
+++ kern/exec_aout.c    5 Sep 2012 20:28:30 -0000
@@ -41,9 +41,6 @@
 #include <uvm/uvm_extern.h>
 
 #if defined(_KERN_DO_AOUT)
-#if defined(COMPAT_AOUT)
-void aout_compat_setup(struct exec_package *epp);
-#endif
 
 /*
  * exec_aout_makecmds(): Check if it's an a.out-format executable.
@@ -90,9 +87,6 @@ exec_aout_makecmds(struct proc *p, struc
 
        if (error)
                kill_vmcmds(&epp->ep_vmcmds);
-#ifdef COMPAT_AOUT
-       aout_compat_setup(epp);
-#endif
 
        return error;
 }
Index: kern/exec_conf.c
===================================================================
RCS file: /cvs/src/sys/kern/exec_conf.c,v
retrieving revision 1.28
diff -u -p -r1.28 exec_conf.c
--- kern/exec_conf.c    4 Jul 2011 22:53:53 -0000       1.28
+++ kern/exec_conf.c    5 Sep 2012 20:28:54 -0000
@@ -54,11 +54,7 @@ extern struct emul emul_native, emul_elf
 struct execsw execsw[] = {
        { EXEC_SCRIPT_HDRSZ, exec_script_makecmds, &emul_native, },     /* 
shell scripts */
 #ifdef _KERN_DO_AOUT
-#ifdef COMPAT_AOUT
-       { sizeof(struct exec), exec_aout_makecmds, &emul_aout },
-#else
        { sizeof(struct exec), exec_aout_makecmds, &emul_native },      /* 
a.out binaries */
-#endif
 #endif
 #ifdef _KERN_DO_ECOFF
        { ECOFF_HDR_SIZE, exec_ecoff_makecmds, &emul_native },  /* ecoff 
binaries */

Reply via email to