Fix Mips LA25 Thunks where Caller and Callee in different OS

This change fixes a bug in which the Mips LA25 Thunks are always assigned
to the same Output section as the caller and not the callee as expected.

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

llvm-svn: 297135
This commit is contained in:
Peter Smith
2017-03-07 09:45:04 +00:00
parent 1388e2f792
commit 24fb250cad
2 changed files with 139 additions and 1 deletions

View File

@@ -918,7 +918,7 @@ void createThunks(ArrayRef<OutputSection *> OutputSections) {
return TS;
auto *TOS = cast<OutputSection>(IS->OutSec);
TS = make<ThunkSection<ELFT>>(TOS, IS->OutSecOff);
ThunkSections[OS].push_back(TS);
ThunkSections[TOS].push_back(TS);
ThunkedSections[IS] = TS;
return TS;
};