From owner-freebsd-emulation Fri Feb 6 02:18:26 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id CAA13581 for freebsd-emulation-outgoing; Fri, 6 Feb 1998 02:18:26 -0800 (PST) (envelope-from owner-freebsd-emulation@FreeBSD.ORG) Received: from bsd.synx.com (rt.synx.com [194.167.81.239]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id CAA13576 for ; Fri, 6 Feb 1998 02:18:15 -0800 (PST) (envelope-from remy@synx.com) Received: from s3.synx.com (s3 [192.1.1.247]) by bsd.synx.com (8.6.12/8.6.12) with SMTP id LAA12687; Fri, 6 Feb 1998 11:22:38 +0100 Received: from rs1 by s3.synx.com id aa14244; 6 Feb 98 11:08 GMT Date: Fri, 6 Feb 1998 11:09:33 -0100 (GMT) From: Remy NONNENMACHER To: Richard Foulk cc: freebsd-emulation@FreeBSD.ORG Subject: Re: NetBSD emulation In-Reply-To: <199802051807.IAA09715@pegasus.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org X-To-Unsubscribe: mail to majordomo@FreeBSD.org "unsubscribe freebsd-emulation" 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 >