This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: object size confusion ...
- From: Grigory Zagorodnev <grigory_zagorodnev at linux dot intel dot com>
- To: Brad Petrus <brad dot petrus at rtc dot bosch dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Fri, 10 Feb 2006 09:54:41 +0300
- Subject: Re: object size confusion ...
- References: <43EB7D4F.4070305@rtc.bosch.com>
Brad Petrus wrote:
> When using the size utility on an object file I get a much larger size
> (~4X) reported than when I use the nm utility on the same object file.
This is because by default size utility accumulates sizes of all
sections with READONLY and CODE flags into the 'text' value (BFD style).
That means text value will either reflect size of sections .rodata,
.eh_frame etc.
However some of these sections may not contain symbols at all. Thus nm
utility will not enumerate them - that makes the difference.
- Grigory