[ELF] Dont add local symbols for dynamic lookup.

Unable to add a unit test for this, as there is only one local undefined
symbol in regular shared libraries without a name.

llvm-svn: 232867
This commit is contained in:
Shankar Easwaran 2015-03-20 23:47:05 +00:00
parent 07f6ce0b83
commit 14726cd11b
1 changed files with 5 additions and 0 deletions

View File

@ -64,6 +64,11 @@ protected:
if ((ec = name.getError()))
return ec;
// Dont add local symbols to dynamic entries. The first symbol in the
// dynamic symbol table is a local symbol.
if (i->getBinding() == llvm::ELF::STB_LOCAL)
continue;
// TODO: Add absolute symbols
if (i->st_shndx == llvm::ELF::SHN_ABS)
continue;