st_value in Elf32_Sym

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello list, I'm not sure if this is the right list to ask, but didn't 
find any other, so....

In the .dynsym, if you take one symbol and dump the contents of the
Elf32_Sym, for some symbols you have the the address of the PLT entry
in the st_value, but for others you get a NULL pointer. One example
can be seen in the sshd binary:

carlos@zaphod:~$ readelf -s /usr/sbin/sshd | grep EVP
     3: 00000000    68 FUNC    GLOBAL DEFAULT  UND EVP_DigestInit
     5: 0804b854    18 FUNC    GLOBAL DEFAULT  UND EVP_enc_null

As can be seen, st_value for the symbol EVP_enc_null is 0x0804b854 (it
PLT entry) but for the symbol EVP_DigestInit it is NULL

Another example is a simple printf("Hello world");

carlos@zaphod:~$ readelf -s t| grep printf
     2: 00000000    57 FUNC    GLOBAL DEFAULT  UND printf@xxxxxxxxx (2)
    97: 00000000    57 FUNC    GLOBAL DEFAULT  UND printf@@GLIBC_2.0

 it is still NULL and it is SURE that printf has you own PLT entry.

Can anyone explain me the exact meaning of the st_value for a external
symbol and why some symbols have it pointing to its PLT entry and
others have it pointing to NULL

thanks in advance

Carlos Barros


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux