[PATCH] D34688: [LLD][ELF] Add call to assignAddresses() before createThunks() [NFC]

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 6 15:54:49 PDT 2017


LGTM

Peter Smith via Phabricator <reviews at reviews.llvm.org> writes:

> peter.smith created this revision.
> Herald added a subscriber: emaste.
>
> In preparation for the addition of rangeThunks() calculate the addresses of all the inputSections so that ThunkSections can be inserted at the right place.
> This is range thunks patch 5/11 it depends on: https://reviews.llvm.org/D34344 and https://reviews.llvm.org/D34345
>
>
> https://reviews.llvm.org/D34688
>
> Files:
>   ELF/Writer.cpp
>
>
> Index: ELF/Writer.cpp
> ===================================================================
> --- ELF/Writer.cpp
> +++ ELF/Writer.cpp
> @@ -1287,6 +1287,7 @@
>      // 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(); });
>
>
> Index: ELF/Writer.cpp
> ===================================================================
> --- ELF/Writer.cpp
> +++ ELF/Writer.cpp
> @@ -1287,6 +1287,7 @@
>      // 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