Mail Archives: djgpp-workers/2006/05/12/07:26:12
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
- Raw text -