diff options
Diffstat (limited to 'ELF/SymbolTable.cpp')
| -rw-r--r-- | ELF/SymbolTable.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/ELF/SymbolTable.cpp b/ELF/SymbolTable.cpp index 30f1c3653f50..ed8a790c9599 100644 --- a/ELF/SymbolTable.cpp +++ b/ELF/SymbolTable.cpp @@ -540,13 +540,10 @@ void SymbolTable<ELFT>::addLazyObject(StringRef Name, LazyObjectFile &Obj) { return; // See comment for addLazyArchive above. - if (S->isWeak()) { + if (S->isWeak()) replaceBody<LazyObject>(S, Name, Obj, S->body()->Type); - } else { - MemoryBufferRef MBRef = Obj.getBuffer(); - if (!MBRef.getBuffer().empty()) - addFile(createObjectFile(MBRef)); - } + else if (InputFile *F = Obj.fetch()) + addFile(F); } // Process undefined (-u) flags by loading lazy symbols named by those flags. |
