confused about symbol version table

Jie Zhang jie@codesourcery.com
Mon Jul 26 05:27:00 GMT 2010
On 07/26/2010 01:07 PM, Pan ruochen wrote:
> 2010/7/23 Ian Lance Taylor<iant@google.com>:
>>
>> They do mean that.
>>
>> However, the relevant data here is not the PT_DYNAMIC segment, it is the
>> DT_SYMTAB section referenced from the PT_DYNAMIC segment.  In section
>> terms, it is the .dynsym section, not the .dynamic section.
>>
>> Ian
>>
>
> So how to understand the .dynamic and .gnu.version sections don't
> contain the same number of entries?

You originally asked why .dynsym section and .gnu.version section 
contained different number of entries. As Alan and Ian said, .dynsym and 
.dynamic are different things.

Come back to your original question:

>    2 .dynsym       00008e60  00714d08  00714d08  00003d08  2**2
>                    CONTENTS, ALLOC, LOAD, READONLY, DATA

It's Elf32_Sym in .dynsym section. Its size is 16-byte. So entries are:

0x8e60 / 16 = 2278

>    4 .gnu.version  000011cc  007233f4  007233f4  000123f4  2**1
>                    CONTENTS, ALLOC, LOAD, READONLY, DATA

As you know, the size of an entry in .gnu.version is 2-byte. So entries are:

0x11cc / 2 = 2278.


Regards,
-- 
Jie Zhang
CodeSourcery



More information about the Binutils mailing list