Skip to content
Commit 8b3c5f2b authored by George Rimar's avatar George Rimar
Browse files

[ELF] - Assign sh_link field of SHT_GNU_versym section to DynSymTab section index.

.gnu.version should have sh_link field initialized with index of DynSymTab section.

GNU documentation looks misses that, but Sun docs mention it, according to
https://docs.oracle.com/cd/E19120-01/open.solaris/819-0690/chapter6-54676/index.html 
versym sh_link is indeed supposed to point to the .dynsym section.

Binutils readelf tool also relies on that:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob;f=binutils/readelf.c;h=b6454d353279dc57745cd5a2d68b5f3f69f8e17c;hb=5522f910cb539905d6adfdceab208ddfa5e84557#l9988

Both gold/bfd do the same + after this patch I am able to see this section in readelf output, was unable before in my case.

Differential revision: http://reviews.llvm.org/D20956

llvm-svn: 271874
parent f51cc077
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment