readelf/objdump segment size doesn't match symbol table sizes
Daniel Jacobowitz
drow@false.org
Wed Aug 16 17:46:00 GMT 2006
On Fri, Aug 11, 2006 at 12:39:33PM -0700, showard wrote:
> > If I write a function called 'xyz()' and the compiler does not optimize
> > this function out by, say, inlining, then there will be a symbol table
> > entry with the name 'xyz' right? If so, does the size reported by readelf
> > for this symbol refer to the size of the generated code for the function
> > 'xyz()'?
Generally yes. It won't account for the fact that the function code is
aligned to some number of bytes, though.
> > So, what was meant by saying that a symbol 'with st_size== 0 is somewhat
> > suspect'?
Symbols generally don't have size zero. That usually means nothing set
the size of the symbol to a useful value.
--
Daniel Jacobowitz
CodeSourcery
More information about the Binutils
mailing list