Skip to content

Commit

Permalink
[lld][WebAssembly] Ignore local symbols when parsing lazy object files.
Browse files Browse the repository at this point in the history
This was broken back in llvm#78658 when we transitioned away from archive
indexes to parsing lazy object files.

Fixes: llvm#94077
Fixes: emscripten-core/emscripten#22008
  • Loading branch information
sbc100 committed Aug 19, 2024
1 parent 4d08bb1 commit b592ea1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lld/wasm/InputFiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ void ObjFile::parseLazy() {
<< wasmObj.get() << "\n");
for (const SymbolRef &sym : wasmObj->symbols()) {
const WasmSymbol &wasmSym = wasmObj->getWasmSymbol(sym.getRawDataRefImpl());
if (!wasmSym.isDefined())
if (wasmSym.isUndefined() || wasmSym.isBindingLocal())
continue;
symtab->addLazy(wasmSym.Info.Name, this);
// addLazy() may trigger this->extract() if an existing symbol is an
Expand Down

0 comments on commit b592ea1

Please sign in to comment.