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



Daniel Jacobowitz-2 wrote:
> 
> On Thu, Aug 10, 2006 at 02:38:38PM -0700, showard wrote:
>> 
>> >Alignment: empty padding space between symbols.
>> 
>> Is there any good way to account for this padding? I am trying to
>> reconcile
>> the figures. What I want to know is that when readelf reports that a
>> particular function takes up x number of bytes of memory, then it indeed
>> uses that number of bytes, and not more.
> 
> Sorry, the question doesn't make any sense.  I think you don't have
> enough context on what a symbol is, and what its size means - basically
> nothing.  It's informative only.  You can use it for measurement, but
> not to e.g. copy the code around.
> 
> I'm not trying to copy the code around, but I do want to have an accurate
> picture of how much memory my functions use since I am programming for
> resource challenged telos sensor motes. Let's see if this question makes
> more sense:
> 
> 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()'?
> 
>> >Also, potentially, symbols whose sizes are not set; anything with
>> st_size
>> == 0 is somewhat
>> suspect.
>> 
>> Meaning that the sizes of these symbols will be determined at runtime?
> 
> Symbol tables are never used at runtime and symbol sizes are almost
> never needed at runtime.  Everything in the loading process is handled
> by the program header table.
> 
> So, what was meant by saying that a symbol 'with st_size== 0 is somewhat
> suspect'?
> 
> Stefen Howard
> 

-- 
View this message in context: http://www.nabble.com/readelf-objdump-segment-size-doesn%27t-match-symbol-table-sizes-tf2086556.html#a5768316
Sent from the Sourceware - binutils list forum at Nabble.com.


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