Pass OutputSectionCommand to getOSThunkSec. NFC.

llvm-svn: 308057
This commit is contained in:
Rafael Espindola 2017-07-14 21:37:10 +00:00
parent e8b087c7e4
commit 72385ba53a
2 changed files with 5 additions and 5 deletions

View File

@ -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;
}

View File

@ -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(