From owner-freebsd-bugs Wed Mar 27 09:10:02 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id JAA09383 for bugs-outgoing; Wed, 27 Mar 1996 09:10:02 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id JAA09373 Wed, 27 Mar 1996 09:10:01 -0800 (PST) Date: Wed, 27 Mar 1996 09:10:01 -0800 (PST) Message-Id: <199603271710.JAA09373@freefall.freebsd.org> To: freebsd-bugs Cc: From: Sujal Patel Subject: Re: kern/1102: Differentiation of FreeBSD & Linux ELF binaries [patch] Reply-To: Sujal Patel Sender: owner-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk The following reply was made to PR kern/1102; it has been noted by GNATS. From: Sujal Patel To: Sujal Patel Cc: FreeBSD-gnats-submit@freebsd.org Subject: Re: kern/1102: Differentiation of FreeBSD & Linux ELF binaries [patch] Date: Wed, 27 Mar 1996 12:01:42 -0500 (EST) On Tue, 26 Mar 1996, Sujal Patel wrote: > >Synopsis: Differentiation of FreeBSD & Linux ELF binaries [patch] > > 3. Follow the "interp" sections hints (current behavior) unless the > environment variable COMPAT_SYSVEC exists. If the variable exists, it > overrides the sysvec in the "interp" section. This means that we can now > invoke Linux ELF binaries by: > > (export COMPAT_SYSVEC=linux; linux.helloworld.elf.static) Maybe I was a bit too tired when I wrote this patch, but I don't really think it's a good idea to let the kernel parse the environment :) How about instead of that, add an extra argument to the execve() syscall (to hold the emulation type requested), and then have libc pass in the emulation type requested (by reading the COMPAT_SYSVEC environment variable). Also, the libc exec() and friends can strip out the COMPAT_SYSVEC environment variable, so it is not inherited by the processes children (which is probably the desired behavior?). Comments? Sujal