Unusually large data segments in executables.
Jeffrey A Law
law@cygnus.com
Tue Jan 13 08:04:00 GMT 1998
In message < Pine.LNX.3.95.980113161335.11670A-100000@mantis.proximity.com.au >you write:
> I have a C++ program called xe and when I compile xe with g++ (2.7.2.3)
> and link with ld from the binutils package the result of 'size xe' is:
>
> text data bss dec hex filename
> 104292 2208 2152 108652 1a86c xe
>
> When I compile and link the program using egcs the output of 'size xe' is
> now:
>
> text data bss dec hex filename
> 104067 75256 3232 182555 2c91b xe
>
> The data segment is now 73048 bytes larger than it was when compiled with
> gcc! and as a result the executable is that much bigger. Also, the dec
> segment is 73903 bytes larger.
Odds are this is the dwarf2 exception handling unwinder information.
It could also be debug symbols -- some versions of size lump them into
the data segment.
Use objdump -h to get a more accurate view of what's actually in the executable.
jeff
More information about the Gcc
mailing list