diff --git a/lld/COFF/DLL.cpp b/lld/COFF/DLL.cpp --- a/lld/COFF/DLL.cpp +++ b/lld/COFF/DLL.cpp @@ -525,6 +525,8 @@ if (e.forwardChunk) { write32le(p, e.forwardChunk->getRVA() | bit); } else { + assert(cast(e.sym)->getRVA() != 0 && + "Exported symbol unmapped"); write32le(p, cast(e.sym)->getRVA() | bit); } }