From: Nate Eldredge Newsgroups: comp.os.msdos.djgpp Subject: Re: Stubs - definition Date: 10 Dec 1999 10:30:51 -0800 Organization: InterWorld Communications Lines: 20 Message-ID: <83bt7y4pic.fsf@mercury.st.hmc.edu> References: NNTP-Posting-Host: mercury.st.hmc.edu X-Trace: nntp1.interworld.net 944850731 63938 134.173.45.219 (10 Dec 1999 18:32:11 GMT) X-Complaints-To: usenet AT nntp1 DOT interworld DOT net NNTP-Posting-Date: 10 Dec 1999 18:32:11 GMT X-Newsreader: Gnus v5.7/Emacs 20.4 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com "sl" 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