object size confusion ...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am trying to determine the contributions of individual classes (and packages) in a C++ application to the amount of ROM / Flash required for storing the (embedded) application image.

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. For example,

size rt_osthread.o:
 text   1652
 data      0
bss 0 dec 1652

nm --format=bsd --size-sort --print-file-name --demangle rt_osthread.o:
 456 (after summing all reported sizes)

Additionally, the results using nm on the executable are similar to those produced when running nm on the object file (with the exception of the unused methods ...).

Which of these utilities more accurately reflects the contribution of the class/object to the application image size?

Thanks!!!

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux