[lld] r304948 - Move clearOutputSections earlier. NFC.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 7 15:27:52 PDT 2017
Author: rafael
Date: Wed Jun 7 17:27:51 2017
New Revision: 304948
URL: http://llvm.org/viewvc/llvm-project?rev=304948&view=rev
Log:
Move clearOutputSections earlier. NFC.
Modified:
lld/trunk/ELF/Writer.cpp
Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=304948&r1=304947&r2=304948&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Wed Jun 7 17:27:51 2017
@@ -1230,6 +1230,7 @@ template <class ELFT> void Writer<ELFT>:
for (BaseCommand *Base : Script->Opt.Commands)
if (auto *Cmd = dyn_cast<OutputSectionCommand>(Base))
OutputSectionCommands.push_back(Cmd);
+ clearOutputSections();
// Dynamic section must be the last one in this list and dynamic
// symbol table section (DynSymTab) must be the first one.
@@ -1243,8 +1244,6 @@ template <class ELFT> void Writer<ELFT>:
In<ELFT>::VerSym, In<ELFT>::VerNeed, InX::Dynamic},
[](SyntheticSection *SS) { SS->finalizeContents(); });
- clearOutputSections();
-
// Some architectures use small displacements for jump instructions.
// It is linker's responsibility to create thunks containing long
// jump instructions if jump targets are too far. Create thunks.
More information about the llvm-commits
mailing list