summaryrefslogtreecommitdiff
path: root/ELF/SymbolTable.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-05-08 17:13:44 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-05-08 17:13:44 +0000
commitfbe69f787ace06f44b6cb1bd3cd45ac703a16a05 (patch)
tree71baf2dfe04008283f87b4c0ae75a2268033cd62 /ELF/SymbolTable.cpp
parentd803cda42997f42649910309ac18170d2d6f2214 (diff)
Notes
Diffstat (limited to 'ELF/SymbolTable.cpp')
-rw-r--r--ELF/SymbolTable.cpp9
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.