X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f Date: Fri, 12 May 2006 11:26:05 +0000 (GMT) From: "A. Wik" To: djgpp-workers AT delorie DOT com Subject: Re: DJGPP ELF (fwd) In-Reply-To: <200605111609.k4BG9n4n005653@envy.delorie.com> Message-ID: <20060512104933.O2491@dynamite.narpes.com> References: <10605110108 DOT AA17525 AT clio DOT rice DOT edu> <200605110135 DOT k4B1ZjDG010106 AT envy DOT delorie DOT com> <20060511152538 DOT N4845 AT dynamite DOT narpes DOT com> <200605111609 DOT k4BG9n4n005653 AT envy DOT delorie DOT com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Thu, 11 May 2006, DJ Delorie wrote: > > You need *something* to get ms-dos to load the first program, which > means one of the files has to have the MZ signature. Well, not necesarily. A config.sys device driver could hook the appropriate APIs and implement "ELF"-compatible loading, or you could hack it permanently into the DOS kernel. In fact, in the case of DOS 7.x, hacking the clouds logo out of IO.SYS may free enough space for an ELF loader to be inserted with no increase in size! But it's true that a loader would have to exist at some level. A device= or TSR-based implementation would make sense for users running a lot of DJGPP programs under plain DOS, while those using one of the 386-Enhances versions of the Windows kernel (with or without GUI) would be better served by a VxD (which is a kernel module, or if you prefer, a 32-bit TSR - a term suggested by Andrew Schulman in his classic "Unauthorized Windows 95"). That would also open the doors to mmap(), fork(), kernel threads, and so on... -aw