[lld] r307373 - [ELF] Add call to assignAddresses() before createThunks() [NFC]

Peter Smith via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 7 03:03:37 PDT 2017


Author: psmith
Date: Fri Jul  7 03:03:37 2017
New Revision: 307373

URL: http://llvm.org/viewvc/llvm-project?rev=307373&view=rev
Log:
[ELF] Add call to assignAddresses() before createThunks() [NFC]

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


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=307373&r1=307372&r2=307373&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Fri Jul  7 03:03:37 2017
@@ -1307,6 +1307,7 @@ template <class ELFT> void Writer<ELFT>:
     // 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(); });




More information about the llvm-commits mailing list