[ELF] Add call to assignAddresses() before createThunks() [NFC]
authorPeter Smith <peter.smith@linaro.org>
Fri, 7 Jul 2017 10:03:37 +0000 (10:03 +0000)
committerPeter Smith <peter.smith@linaro.org>
Fri, 7 Jul 2017 10:03:37 +0000 (10:03 +0000)
In preparation for the addition of rangeThunks() calculate the addresses
of all the inputSections so that ThunkSections can be inserted at the right
place.

Differential Revision: https://reviews.llvm.org/D34688

llvm-svn: 307373

lld/ELF/Writer.cpp

index b6f79fd..eb8bf4b 100644 (file)
@@ -1307,6 +1307,7 @@ template <class ELFT> void Writer<ELFT>::finalizeSections() {
     // are out of range. This will need to turn into a loop that converges
     // when no more Thunks are added
     ThunkCreator TC;
+    Script->assignAddresses();
     if (TC.createThunks(OutputSectionCommands)) {
       applySynthetic({InX::MipsGot},
                      [](SyntheticSection *SS) { SS->updateAllocSize(); });