Subject: Re: Removing compat/aout
To: Todd Vierling <tv@wasabisystems.com>
From: Christoph Hellwig <hch@caldera.de>
List: tech-kern
Date: 03/08/2002 18:16:38
On Fri, Mar 08, 2002 at 12:07:57PM -0500, Todd Vierling wrote:
> I'll say this one more time as I've said in the past:  Path translation is a
> unseful function of the binary emulation code, and particularly so when
> doing an *incremental* migration of a formerly a.out system to ELF.
> 
> Path translation allows you to do the following things (just examples of
> the needs I've had for it, not exhaustive):

Whenever I looked at NetBSD's emulation code I found it very complicated
that you copied the Path translation code into every single emulation.

I know many people here dislike Linux, but the way we handle pathname
translation might actually be a good idea for NetBSD, too.

In Linux every architecture has to define a hook, __emul_prefix that is
supposed to either return NULL for a native binary or a path prefix for
non-native binaries.  Architectures that do have any foreign personality
(like i386 without my Linux-ABI patch) can just define __emul_prefix to
NULL and have no additional cost, others just do a big switch() on the
available personalities.

Take a look at include/asm-*/namei.h and fs/namei.c:set_fs_altroot() in
a uptodate Linux source tree for some more details.

	Christoph

-- 
Of course it doesn't work. We've performed a software upgrade.