From 5e3403bd22039d043d3ffc8ab23255f8b9207b2b Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Fri, 24 Dec 2021 13:16:34 -0800 Subject: [PATCH] [ELF] parseLazy: skip local symbols --- lld/ELF/InputFiles.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 void ObjFile::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)