On Thu, 22 Jan 2004, Peter N Lewis wrote:
At 10:14 PM -0800 21/1/04, Peter Norton wrote:
I'm new in GNU Pascal and wonder the exe size compiler produces. Three lines Hello World source was blowed up to the 349 KB (!) exe. Stripped down (with -s) the executable is still big - 247 KB. The same source compiled with VirtualPascal's compiler is 11 KB exe. 20 times smaller! Am I doing something wrong?
We have a similar issue under Mac OS X.
The issue (as I understand it for us) is two fold, the fact the no dead code stripping is done means that any code in any imported statically linked library is included with nothing removed, and then the size of the various libraries including the gpc runtime library.
In addition to the dead code there is also program startup and shutdown routines. Interesting to note the difference between a "do nothing" program ( just a "begin end." ) and hello world is about 64 bytes.
Russ