Move clearOutputSections earlier. NFC.

llvm-svn: 303781
This commit is contained in:
Rafael Espindola 2017-05-24 17:54:28 +00:00
parent 932978315b
commit 27dd659be1
1 changed files with 1 additions and 1 deletions

View File

@ -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);