From: "Damian Yerrick" Newsgroups: comp.os.msdos.djgpp References: Subject: Re: Size Lines: 79 Organization: Pin Eight Software X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Message-ID: X-Trace: +Sz2rfCjyhdQHVam3TbyVRZco6dIAMUOR8yvPLfEjj1n5lvhcmm4MNq3AXu/Eg1T88BfbQ53QAb+!DCfJxAnZasZKaUCv7/7Puof/hVywnCURMfmQX8gOLmyslQg7l65BRutmwIKsxbh+XwepBUhxIw== X-Complaints-To: abuse AT gte DOT net X-Abuse-Info: Please be sure to forward a copy of ALL headers X-Abuse-Info: Otherwise we will be unable to process your complaint properly NNTP-Posting-Date: Wed, 08 Dec 1999 04:22:39 GMT Distribution: world Date: Wed, 08 Dec 1999 04:22:39 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com "Valkir" wrote: > How can I optimize my config so the size isn't that huge? > > Now if I do something like > > void main(){} /* correction: main() returns an int! */ int main() { return 0; } > it take 86k... something wrong I know :o) Which smiley is :o)? There are two factors. /| | | _|_ o The entry point of a DJGPP program is not main(). It's more like this pseudo-C fragment: int crt0_startup(void *psp) { int rval; int argc; char **argv; /* load the rest of the program */ /* look for DPMI; if not, notify */ /* go into protected mode */ /* parse PSP and glob filenames into argc and argv */ rval = main(argc, argv); /* go back into real or virtual-x86 mode */ return rval; } _ / \ / / /__ o > It does that with rhide and gcc... Also, your EXE (by default) contains debugging symbols when you use RHIDE as your interface to GCC. To remove these symbols, use strip.exe or (if you want the program to be *really* small) upx.exe, a free(beer)ware program packer. Saves about 4:1 or better vs. unstripped DJGPP/COFF EXE. http://upx.tsx.org/ -- Damian Yerrick http://yerricde.tripod.com/ My .sig is too long to include in an e-mail or NG message. Go to http://www.rose-hulman.edu/~yerricde/sig.html to see it. P.S. Glide is now open source. and now you must pay... ...for your crimes against computing, Micro$oft.