Put undefined symbols from shared libraries in the symbol table.

With the recent fixes these symbols have more in common than not with
regular undefined symbols.

llvm-svn: 326242
This commit is contained in:
Rafael Espindola
2018-02-27 20:31:22 +00:00
parent bf28a8fc01
commit 3f4c673d38
7 changed files with 5 additions and 47 deletions

View File

@@ -851,7 +851,10 @@ template <class ELFT> void SharedFile<ELFT>::parseRest() {
StringRef Name = CHECK(Sym.getName(this->StringTable), this);
if (Sym.isUndefined()) {
this->Undefs.insert(Name);
Symbol *S = Symtab->addUndefined<ELFT>(Name, Sym.getBinding(),
Sym.st_other, Sym.getType(),
/*CanOmitFromDynSym=*/false, this);
S->ExportDynamic = true;
continue;
}