Mail Archives: djgpp/1999/12/11/03:18:41
"sl" <junk AT bbs DOT darktech DOT org> writes:
> Hi,
> 
> 	I was wondering if anyone could explain to me what a file stub is ..
> I've been seeing this word used in the context of DJGPP and other problems
> quite frequently..
The GNU toolchain doesn't produce DOS EXE's by itself.  DJGPP uses the
Unix-born COFF file format.  Of course, DOS doesn't know how to
execute these.  So in order to create an EXE, DJGPP prepends a small
(2K) chunk of code (the stub) to the front.  This contains an EXE
header, and knows how to start DPMI, switch to protected mode, load a
COFF image, etc.  DOS therefore sees an EXE file, which it does know
how to handle, and we go merrily on our way.
-- 
Nate Eldredge
neldredge AT hmc DOT edu
- Raw text -