Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Feb 1998 11:09:33 -0100 (GMT)
From:      Remy NONNENMACHER <remy@synx.com>
To:        Richard Foulk <richard@pegasus.com>
Cc:        freebsd-emulation@FreeBSD.ORG
Subject:   Re: NetBSD emulation
Message-ID:  <Pine.A32.3.91.980206104943.10787G-100000@rs1>
In-Reply-To: <199802051807.IAA09715@pegasus.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On Thu, 5 Feb 1998, Richard Foulk wrote:

> } > NetBSD *IS* emulated by FreeBSD. The problem is that someone (Net ? Free 
> } > ?) reversed the exec magic number. This means that FreeBSD recognizes the 
> } > NetBSD Magic, load and starts the binary. The binary try to load the 
> } > ld.so dynamic linker *BUT*, before, it checks the ld.so magic number and 
> } > find it reversed !! (then it dies, spiting something about 'bad ld.so 
> } > magic').
> } > 
> 
> So what about fudging a copy with the magic number modified?
>

AFAIK (as it was time ago when i switched from Net to Free, when i got 
the problem) the NetBSD emulation in Free have no 'file lookup' on a 
specific directory (but it have for Linux and IBCS2). I think it's due to 
the fact that Net and Free are quiet the same at syscalls level and emul 
dvl decided not to make a specific lookup environment.
I remember i made an horrible hack somewhere to trap the open, by a NetBSD 
program, of the specific file 'ld.so' to use an /emul lookup. It was so 
ugly and unreliable that i abandonned the whole thing. (better recompile 
...).

I can't precisely remember but i believe the a.out Magic Number reversing 
was done 
beetween two versions of NetBSD (1.0 to 1.1, i guess). Maybe someone could 
confirm this historic point ?

(I also remember the respect i felt for the ones dealing with shared libs 
and exec loading... It's far above a simple 'load text, load data, create 
stack, return to start point').

> 
> Richard
> 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.A32.3.91.980206104943.10787G-100000>