From 27dd659be181315aaf0af2b5386d3d8b1a7dc39c Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Wed, 24 May 2017 17:54:28 +0000 Subject: [PATCH] Move clearOutputSections earlier. NFC. llvm-svn: 303781 --- lld/ELF/Writer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index 0528434b..dbb2bdb 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -291,6 +291,7 @@ template void Writer::run() { } else { writeSectionsBinary(); } + clearOutputSections(); // Backfill .note.gnu.build-id section content. This is done at last // because the content is usually a hash value of the entire output file. @@ -298,7 +299,6 @@ template void Writer::run() { if (ErrorCount) return; - clearOutputSections(); // Handle -Map option. writeMapFile(Script->Opt.Commands); -- 2.7.4