[lld] 5e3403b - [ELF] parseLazy: skip local symbols
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 24 13:16:40 PST 2021
Author: Fangrui Song
Date: 2021-12-24T13:16:34-08:00
New Revision: 5e3403bd22039d043d3ffc8ab23255f8b9207b2b
URL: https://github.com/llvm/llvm-project/commit/5e3403bd22039d043d3ffc8ab23255f8b9207b2b
DIFF: https://github.com/llvm/llvm-project/commit/5e3403bd22039d043d3ffc8ab23255f8b9207b2b.diff
LOG: [ELF] parseLazy: skip local symbols
Added:
Modified:
lld/ELF/InputFiles.cpp
Removed:
################################################################################
diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp
index f2128c84f453..964898fb790e 100644
--- a/lld/ELF/InputFiles.cpp
+++ b/lld/ELF/InputFiles.cpp
@@ -1800,7 +1800,7 @@ template <class ELFT> void ObjFile<ELFT>::parseLazy() {
// resolve() may trigger this->extract() if an existing symbol is an undefined
// symbol. If that happens, this function has served its purpose, and we can
// exit from the loop early.
- for (Symbol *sym : symbols)
+ for (Symbol *sym : makeArrayRef(symbols).slice(firstGlobal))
if (sym) {
sym->resolve(LazyObject{*this, sym->getName()});
if (!lazy)
More information about the llvm-commits
mailing list