Re: space-profiling an ELF binary

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

 



Alex Flint <alex.flint@xxxxxxxxx> writes:

> I was wondering if there is a way to see how much space each input
> file takes up within an ELF binary as output from gcc. Specifically, I
> would like to see how much space each .o object file, and each
> statically linked .a file contribute to the final binary output by
> gcc. It would also be great to be able to break it down further and
> see how much space each function, class, and (particularly) template
> take up.

You can get a fair amount of that information from a linker map.  Use
something like -Wl,-Map,mapfilename when linking.  That will create a
file mapfilename.  I don't know if the format is documented, but it
will give you the size of each symbol.

Ian

[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