Mail Archives: djgpp/2000/10/31/22:32:13
Ron House <house AT usq DOT edu DOT au> wrote:
> Hi all, I have an app that was originally C, but later I included
> classes and made it C++. Since then the file size has blown out hugely,
If an executable size blowup occured exactly at the point you switched
from C to C++, then the most likely cause of it are large static
arrays. C++ can require them to be present at their full size, right
in the executable file.
> puzzling, the stripped sizes of the exe under Linux and DJGPP are vastly
> different: 950K vs 1.9Mb.
That's most probably by unfair comparison. To make a reasonable test,
here, you have to compare a Linux binary built with linking option
'-static'. You'll find that this creates a program that'll be about as
large as the DJGPP version, I think.
To know for real where all that size is going, make an 'nm' or
'objdump' listing of the executable sorted by size of the individual
object. Or at least have a solid look at 'size -A' outputs.
--
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -