forked from OSchip/llvm-project
Move clearOutputSections earlier.
Now it is as early as it can go: just before synchronize. We now have to move synchronize earlier too. llvm-svn: 304434
This commit is contained in:
parent
805f5152c5
commit
3f235c71cc
|
@ -274,6 +274,7 @@ template <class ELFT> void Writer<ELFT>::run() {
|
||||||
[](OutputSection *S) { S->maybeCompress<ELFT>(); });
|
[](OutputSection *S) { S->maybeCompress<ELFT>(); });
|
||||||
|
|
||||||
Script->synchronize();
|
Script->synchronize();
|
||||||
|
clearOutputSections();
|
||||||
|
|
||||||
if (Config->Relocatable) {
|
if (Config->Relocatable) {
|
||||||
assignFileOffsets();
|
assignFileOffsets();
|
||||||
|
@ -301,7 +302,7 @@ template <class ELFT> void Writer<ELFT>::run() {
|
||||||
openFile();
|
openFile();
|
||||||
if (ErrorCount)
|
if (ErrorCount)
|
||||||
return;
|
return;
|
||||||
clearOutputSections();
|
|
||||||
if (!Config->OFormatBinary) {
|
if (!Config->OFormatBinary) {
|
||||||
writeHeader();
|
writeHeader();
|
||||||
writeSections();
|
writeSections();
|
||||||
|
|
Loading…
Reference in New Issue