This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


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

Re: getting actual function sizes from NM



> Sorry if it's out of the topic but I am trying to
> find the size of functions using NM and when the
> addresses are not contiguous, the --size-sort option
> seems to fail. Am I missing something? If not, any
> suggestions to get the actual sizes?

Try "nm -an" to sort by address, not size, and not skip any symbols.
Then you can determine for yourself what the "end of the function" is
and subtract the addresses.  If that doesn't work, try "objdump -d"
and it will show you the address of every single opcode - you should
be able to figure it out from that, even though the output file is
pretty big.

Note that gcc sometimes rearranges functions that are inlined.


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