Date: Sun, 18 Jun 1995 09:24:28 -0400 From: dj (DJ Delorie) To: gmoscho AT alexander DOT cc DOT ece DOT ntua DOT gr Cc: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: Re: Code generation Please note that discussion about the V2 alpha should be on the djgpp-v2 AT delorie DOT com mailing list, not the general list, until the beta is released. > i compiled the hello.c programm from the V2 snapshot and it > generated an 93kb .exe file. I looked at the executable and found > that the linker included all the names (as strings) of the > functions included from the libs. is there any switch to prevent > this ? coz 93 kb for a hello.c is really TOO much. V2 includes the extension logic in the application, making it bigger than V1 programs. However, the stub is much smaller, which helps to even that out. Your program is big for two reasons: 1. It includes the symbol table. Stripping that off will reduce the size of the exectuable. 2. Depending on which snapshot you have, you might be linking in far more code than you need for a simple program. Just last night I trimmed 18K of the size of the smallest program "main(){}". If you don't need command-line processing, you can remove that, and if you don't use environment variables, you can remove djgpp.env processing. Doing both of these results in a minimum size of 15K for the basic program. Most of this is exception handling and libc routines, and reducing this further will be an ongoing project.