[lld] r308057 - Pass OutputSectionCommand to getOSThunkSec. NFC.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 14 14:37:10 PDT 2017
Author: rafael
Date: Fri Jul 14 14:37:10 2017
New Revision: 308057
URL: http://llvm.org/viewvc/llvm-project?rev=308057&view=rev
Log:
Pass OutputSectionCommand to getOSThunkSec. NFC.
Modified:
lld/trunk/ELF/Relocations.cpp
lld/trunk/ELF/Relocations.h
Modified: lld/trunk/ELF/Relocations.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Relocations.cpp?rev=308057&r1=308056&r2=308057&view=diff
==============================================================================
--- lld/trunk/ELF/Relocations.cpp (original)
+++ lld/trunk/ELF/Relocations.cpp Fri Jul 14 14:37:10 2017
@@ -1000,16 +1000,16 @@ void ThunkCreator::mergeThunks() {
}
}
-ThunkSection *ThunkCreator::getOSThunkSec(OutputSection *OS,
+ThunkSection *ThunkCreator::getOSThunkSec(OutputSectionCommand *Cmd,
std::vector<InputSection *> *ISR) {
if (CurTS == nullptr) {
uint32_t Off = 0;
- for (auto *IS : OS->Sections) {
+ for (auto *IS : Cmd->Sec->Sections) {
Off = IS->OutSecOff + IS->getSize();
if ((IS->Flags & SHF_EXECINSTR) == 0)
break;
}
- CurTS = addThunkSection(OS, ISR, Off);
+ CurTS = addThunkSection(Cmd->Sec, ISR, Off);
}
return CurTS;
}
@@ -1120,7 +1120,7 @@ bool ThunkCreator::createThunks(
if (auto *TIS = T->getTargetInputSection())
TS = getISThunkSec(TIS, Cmd->Sec);
else
- TS = getOSThunkSec(Cmd->Sec, ISR);
+ TS = getOSThunkSec(Cmd, ISR);
TS->addThunk(T);
Thunks[T->ThunkSym] = T;
}
Modified: lld/trunk/ELF/Relocations.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Relocations.h?rev=308057&r1=308056&r2=308057&view=diff
==============================================================================
--- lld/trunk/ELF/Relocations.h (original)
+++ lld/trunk/ELF/Relocations.h Fri Jul 14 14:37:10 2017
@@ -133,7 +133,7 @@ public:
private:
void mergeThunks();
- ThunkSection *getOSThunkSec(OutputSection *OS,
+ ThunkSection *getOSThunkSec(OutputSectionCommand *Cmd,
std::vector<InputSection *> *ISR);
ThunkSection *getISThunkSec(InputSection *IS, OutputSection *OS);
void forEachExecInputSection(
More information about the llvm-commits
mailing list