Move synchronize earlier.

This is probably the correct location for it: next to
fabricateDefaultCommands. If we don't have a linker script, we
fabricate one. If we have one, we patch it.

llvm-svn: 304436
This commit is contained in:
Rafael Espindola 2017-06-01 16:42:16 +00:00
parent 2adb7bdbca
commit cca62ef861
1 changed files with 2 additions and 1 deletions

View File

@ -261,6 +261,8 @@ template <class ELFT> void Writer<ELFT>::run() {
if (!Config->Relocatable)
fixSectionAlignments();
Script->fabricateDefaultCommands();
} else {
Script->synchronize();
}
for (BaseCommand *Base : Script->Opt.Commands)
@ -273,7 +275,6 @@ template <class ELFT> void Writer<ELFT>::run() {
parallelForEach(OutputSections.begin(), OutputSections.end(),
[](OutputSection *S) { S->maybeCompress<ELFT>(); });
Script->synchronize();
clearOutputSections();
if (Config->Relocatable) {