This is the mail archive of the binutils@sourceware.org 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]
Other format: [Raw text]

Re: readelf/objdump segment size doesn't match symbol table sizes


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


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