[lld][WebAssemby] Demote LazySymbols back to undefined symbols if they are not loaded
A LazySymbol is one that lives in `.a` archive and gets pulled in by a strong reference. However, weak references to such symbols do not result in them be loaded from the archive. In this case we want to treat such symbols at undefined rather then lazy, once symbols resolution is complete. This fixes a crash bug in the linker when weakly referenced symbol that lives in an archive file is live at the end of the link. In the case of dynamic linking this is expected to turn into an import with (in the case of a function symbol) a function index. Differential Revision: https://reviews.llvm.org/D130736
Loading
Please sign in to comment