static linking 2379490 579220
Since this is more than you'd expect for such a simple program, I think the problem is the linker - although you have less overhead with static linking ( hence faster ), the linker does not know how to omit unused library code.
The linker doesn't seem to be very "smart" in this respect. Is there any hope of a smart linker for GCC or GPC? The GNU guys are so clever at doing so many amazing things that it seems odd that they cannot (or probably will not) produce a smart linker.
(Maybe I sent this to the list earlier, sorry, group reply confusal)
Simply having GPC split up all sources to a symbol per assemblerfile and AR'ing the resulting pack to a .a would also do the trick.
It is how FPC smartlinks (with LD!)