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

[ELF] - Check that .dynsym is present in DSO if SHT_GNU_versym section is.

When we have SHT_GNU_versym section, it is should be associated with symbol table
section. Usually (and in out implementation) it is .dynsym.
In case when .dynsym is absent (due to broken object for example), 
lld crashes in parseVerdefs() when accesses null pointer:

Versym = reinterpret_cast<const Elf_Versym *>(this->ELFObj.base() +
                                              VersymSec->sh_offset) +
         this->Symtab->sh_info;

DIfferential revision: https://reviews.llvm.org/D25553

llvm-svn: 285796
parent 5cddd608
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