This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: object size confusion ...


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]