summaryrefslogtreecommitdiffstats
path: root/lld/ELF
diff options
context:
space:
mode:
Diffstat (limited to 'lld/ELF')
-rw-r--r--lld/ELF/Writer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
index 0528434b97e..dbb2bdb7753 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -291,6 +291,7 @@ template <class ELFT> void Writer<ELFT>::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 <class ELFT> void Writer<ELFT>::run() {
if (ErrorCount)
return;
- clearOutputSections();
// Handle -Map option.
writeMapFile<ELFT>(Script->Opt.Commands);
OpenPOWER on IntegriCloud