Date: Tue, 20 Oct 1998 11:56:21 -0400 (EDT) Message-Id: <199810201556.LAA08607@indy.delorie.com> From: DJ Delorie To: djgpp AT delorie DOT com In-reply-to: <19981020114706.11792.00003389@ng73.aol.com> (uhfgood@aol.com) Subject: Re: -KWII- Not a problem, but confusing, please help? Reply-To: djgpp AT delorie DOT com > gcc fnlcall.c -s -o fnlcall.o > > What this generates (i'm sure all of you know) is fnlcall.o and fnlcall.exe No, it only generates fnlcall.o, but that's the exe! I think what you want to do is this: gcc -c fnlcall.c generates fnlcall.o, which is an object gcc fnlcall.o -o fnlcall.exe generates gnlcall.exe, which is an exe if you do "gcc -o foo" it makes both foo, the unstubbed COFF file, and foo.exe, the stubbed COFF file. If you do "gcc -o foo.exe" it just makes the one stubbed COFF file. The "-o" option does not tell gcc what to build, it just tells it what the file name is. The -c option tells gcc to produce an object instead of an executable. > Now. It was interesting to see that fnlcall.o was nearly the same size as > fnlcall.exe but to me it looked like the fnlcall.o was too big to be an object > file. Correct. Even though the name was fnlcall.o, you told gcc to produce an executable and call it fnlcall.o. fnlcall.o is an executable (unstubbed, though). > I looked up in the docs the -c which tells it not to link... and > produces a *real* object file which is actually much smaller than > the executable. Correct. You then link that object (possibly with others) into an executable. See http://www.delorie.com/djgpp/doc/ug/larger/multisrc.html > Well what's actually puzzling me is what did i create You created the COFF version of the final executable. DJGPP makes an .EXE by prepending a 2k stub to this which lets MS-DOS load the program. Look up "stub" in http://www.delorie.com/djgpp/doc/lexicon/