|
|||||||||||
|
2nd try Re: a.out dynamic binaries emulation
From: Marc Espie <espie(at)nerim.net>
Date: Sat Apr 26 2003 - 10:43:01 EDT Here's a new one, with a few fixes based on people comments. I'd like to be able to commit this soon... so I'd need some okay, and if people can check I didn't break any arch, I'd love it. Index: sys/arch/i386/conf/GENERIC RCS file: /cvs/src/sys/arch/i386/conf/GENERIC,v retrieving revision 1.332 diff -u -p -r1.332 GENERIC --- sys/arch/i386/conf/GENERIC 28 Mar 2003 00:49:13 -0000 1.332 Index: sys/arch/i386/i386/trap.c RCS file: /cvs/src/sys/arch/i386/i386/trap.c,v retrieving revision 1.53 diff -u -p -r1.53 trap.c --- sys/arch/i386/i386/trap.c 16 Jan 2003 04:15:17 -0000 1.53@@ -91,6 +91,9 @@ extern struct emul emul_aout_freebsd, em #ifdef COMPAT_BSDOS extern struct emul emul_bsdos; #endif +#ifdef COMPAT_AOUT_TRANSLATE +extern struct emul emul_aout_translate; +#endif #include "npx.h" @@ -643,6 +646,9 @@ syscall(frame) #ifdef COMPAT_FREEBSD && p->p_emul != &emul_aout_freebsd && p->p_emul != &emul_elf_freebsd +#endif +#ifdef COMPAT_AOUT_TRANSLATE + && p->p_emul != &emul_aout_translate #endif #ifdef COMPAT_BSDOS
&& p->p_emul != &emul_bsdos
RCS file: /cvs/src/sys/compat/common/Makefile,v retrieving revision 1.13 diff -u -p -r1.13 Makefile --- sys/compat/common/Makefile 30 Jan 2003 03:29:49 -0000 1.13Index: sys/compat/common/exec_aout_translate.c RCS file: sys/compat/common/exec_aout_translate.c diff -N sys/compat/common/exec_aout_translate.c --- /dev/null 1 Jan 1970 00:00:00 -0000+ +/* + * Copyright (c) 2003 Marc Espie + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR Index: sys/kern/exec_aout.c RCS file: /cvs/src/sys/kern/exec_aout.c,v retrieving revision 1.8 diff -u -p -r1.8 exec_aout.c --- sys/kern/exec_aout.c 26 Jul 2002 23:32:50 -0000 1.8@@ -41,6 +41,9 @@ #include <uvm/uvm_extern.h>
#if defined(_KERN_DO_AOUT)
/*
if (error) kill_vmcmds(&epp->ep_vmcmds);
return error;
RCS file: /cvs/src/sys/kern/init_main.c,v retrieving revision 1.101 diff -u -p -r1.101 init_main.c --- sys/kern/init_main.c 6 Mar 2003 17:06:18 -0000 1.101 }; +#ifdef COMPAT_AOUT_TRANSLATE
/*
* System startup; initialize the world, create process 0, mount root
* filesystem, and fork to create init and pagedaemon. Most of the
@@ -197,6 +222,9 @@ main(framep)
printf(copyright);
printf("\n");
Index: share/man/man4/options.4 RCS file: /cvs/src/share/man/man4/options.4,v retrieving revision 1.120 diff -u -p -r1.120 options.4 --- share/man/man4/options.4 3 Apr 2003 06:47:59 -0000 1.120This option is available on the alpha architecture. See .Xr compat_osf1 8 . +.It Cd Option COMPAT_AOUT_TRANSLATE +On those ELF architectures that require it, this enables +full compatibility with old a.out binaries, by allowing the +a.out dynamic linking system to reside under +.Pa /emul/a.out . +This option is available on the i386 architecture. .It Cd option COMPAT_43 Use of this option is discouraged. It enables compatibility with Index: etc/rc RCS file: /cvs/src/etc/rc,v retrieving revision 1.226 diff -u -p -r1.226 rc --- etc/rc 8 Apr 2003 01:53:43 -0000 1.226 fi +if [ -f /emul/a.out/sbin/ldconfig ]; then
echo -n "ssh-keygen: generating new DSA host key... " if /usr/bin/ssh-keygen -q -t dsa -f /etc/ssh/ssh_host_dsa_key -N ''; thenIndex: etc/rc.conf RCS file: /cvs/src/etc/rc.conf,v retrieving revision 1.86 diff -u -p -r1.86 rc.conf --- etc/rc.conf 10 Mar 2003 01:05:28 -0000 1.86 local_rcconf="/etc/rc.conf.local" Received on Sat Apr 26 10:48:14 2003 This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 13:48:39 EDT |
||||||||||
|
|||||||||||