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
diff --git a/lld/ELF/Relocations.cpp b/lld/ELF/Relocations.cpp
index c3a7b8f..8ef1d4d 100644
--- a/lld/ELF/Relocations.cpp
+++ b/lld/ELF/Relocations.cpp
@@ -918,7 +918,7 @@
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;
};