Index: lld/trunk/ELF/Writer.cpp =================================================================== --- lld/trunk/ELF/Writer.cpp +++ lld/trunk/ELF/Writer.cpp @@ -217,6 +217,9 @@ fixAbsoluteSymbols(); } + // It does not make sense try to open the file if we have error already. + if (ErrorCount) + return; // Write the result down to a file. openFile(); if (ErrorCount)