forked from OSchip/llvm-project
[ELF] - Do not create huge garbage files on section offset overflow.
Patch changes behavior to not try open the output file if we already know about error. That is not just cleaner, but also fixes nasty behavior of linker that could create huge temporarily files under certain conditions. Differential revision: https://reviews.llvm.org/D28107 llvm-svn: 292219
This commit is contained in:
parent
903d35e50e
commit
2ddab6d186
|
@ -217,6 +217,9 @@ template <class ELFT> void Writer<ELFT>::run() {
|
|||
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)
|
||||
|
|
Loading…
Reference in New Issue