diff --git a/lld/MachO/UnwindInfoSection.cpp b/lld/MachO/UnwindInfoSection.cpp --- a/lld/MachO/UnwindInfoSection.cpp +++ b/lld/MachO/UnwindInfoSection.cpp @@ -195,7 +195,8 @@ // (See discussions/alternatives already considered on D107533) if (!defined->isExternal()) if (const Symbol *sym = symtab->find(defined->getName())) - r.referent = s = const_cast(sym); + if (sym->kind() != Symbol::LazyKind) + r.referent = s = const_cast(sym); } if (auto *undefined = dyn_cast(s)) { treatUndefinedSymbol(*undefined);