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.
Although space is "cheap" these days, it is a pain since it limits what you can break down as small self contained utilities since each one is large.
I imagine the Windows version has the same issues.
I'm not sure if dead code stripping is something that the linker does on some platforms and not others, or whether it is on the agenda for improving. It's probably not really a GPC issue at all, but more a gcc backend linker issue. Peter.