Skip to content

Commit eff51f0

Browse files
committed
[ELF] Make .captable explicitly MIPS-specific
CHERI-RISC-V no longer uses it, and Morello never has downstream.
1 parent 636325c commit eff51f0

File tree

11 files changed

+140
-130
lines changed

11 files changed

+140
-130
lines changed

lld/ELF/Arch/Cheri.cpp

Lines changed: 40 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -583,14 +583,14 @@ void CheriCapRelocsSection::writeTo(uint8_t *buf) {
583583
invokeELFT(writeToImpl, buf);
584584
}
585585

586-
CheriCapTableSection::CheriCapTableSection()
586+
MipsCheriCapTableSection::MipsCheriCapTableSection()
587587
: SyntheticSection(SHF_ALLOC | SHF_WRITE, SHT_PROGBITS,
588588
config->capabilitySize, ".captable") {
589589
assert(config->capabilitySize > 0);
590590
this->entsize = config->capabilitySize;
591591
}
592592

593-
void CheriCapTableSection::writeTo(uint8_t* buf) {
593+
void MipsCheriCapTableSection::writeTo(uint8_t *buf) {
594594
// Capability part should be filled with all zeros and crt_init_globals fills
595595
// it in. For the TLS part, assignValuesAndAddCapTableSymbols adds any static
596596
// relocations needed, and should be procesed by relocateAlloc.
@@ -603,8 +603,8 @@ static Defined *findMatchingFunction(const InputSectionBase *isec,
603603
return isec->getEnclosingFunction(symOffset);
604604
}
605605

606-
CheriCapTableSection::CaptableMap &
607-
CheriCapTableSection::getCaptableMapForFileAndOffset(
606+
MipsCheriCapTableSection::CaptableMap &
607+
MipsCheriCapTableSection::getCaptableMapForFileAndOffset(
608608
const InputSectionBase *isec, uint64_t offset) {
609609
if (LLVM_LIKELY(config->capTableScope == CapTableScopePolicy::All))
610610
return globalEntries;
@@ -626,17 +626,18 @@ CheriCapTableSection::getCaptableMapForFileAndOffset(
626626
return globalEntries;
627627
}
628628

629-
void CheriCapTableSection::addEntry(Symbol &sym, RelExpr expr,
630-
InputSectionBase *isec, uint64_t offset) {
629+
void MipsCheriCapTableSection::addEntry(Symbol &sym, RelExpr expr,
630+
InputSectionBase *isec,
631+
uint64_t offset) {
631632
// FIXME: can this be called from multiple threads?
632633
CapTableIndex idx;
633634
idx.needsSmallImm = false;
634635
idx.usedInCallExpr = false;
635636
idx.firstUse = SymbolAndOffset(isec, offset);
636637
assert(!idx.firstUse->symOrSec.isNull());
637638
switch (expr) {
638-
case R_CHERI_CAPABILITY_TABLE_INDEX_SMALL_IMMEDIATE:
639-
case R_CHERI_CAPABILITY_TABLE_INDEX_CALL_SMALL_IMMEDIATE:
639+
case R_MIPS_CHERI_CAPTAB_INDEX_SMALL_IMMEDIATE:
640+
case R_MIPS_CHERI_CAPTAB_INDEX_CALL_SMALL_IMMEDIATE:
640641
idx.needsSmallImm = true;
641642
break;
642643
default:
@@ -648,8 +649,8 @@ void CheriCapTableSection::addEntry(Symbol &sym, RelExpr expr,
648649
// not used as a function pointer and therefore does not need a unique
649650
// address (plt stub) across all DSOs.
650651
switch (expr) {
651-
case R_CHERI_CAPABILITY_TABLE_INDEX_CALL:
652-
case R_CHERI_CAPABILITY_TABLE_INDEX_CALL_SMALL_IMMEDIATE:
652+
case R_MIPS_CHERI_CAPTAB_INDEX_CALL:
653+
case R_MIPS_CHERI_CAPTAB_INDEX_CALL_SMALL_IMMEDIATE:
653654
if (!sym.isFunc() && !sym.isUndefWeak()) {
654655
CheriCapRelocLocation loc{isec, offset};
655656
std::string msg = "call relocation against non-function symbol " + verboseToString(&sym, 0) +
@@ -689,25 +690,25 @@ void CheriCapTableSection::addEntry(Symbol &sym, RelExpr expr,
689690
}
690691
}
691692

692-
void CheriCapTableSection::addDynTlsEntry(Symbol &sym) {
693+
void MipsCheriCapTableSection::addDynTlsEntry(Symbol &sym) {
693694
dynTlsEntries.map.insert(std::make_pair(&sym, CapTableIndex()));
694695
}
695696

696-
void CheriCapTableSection::addTlsIndex() {
697+
void MipsCheriCapTableSection::addTlsIndex() {
697698
dynTlsEntries.map.insert(std::make_pair(nullptr, CapTableIndex()));
698699
}
699700

700-
void CheriCapTableSection::addTlsEntry(Symbol &sym) {
701+
void MipsCheriCapTableSection::addTlsEntry(Symbol &sym) {
701702
tlsEntries.map.insert(std::make_pair(&sym, CapTableIndex()));
702703
}
703704

704-
uint32_t CheriCapTableSection::getIndex(const Symbol &sym,
705-
const InputSectionBase *isec,
706-
uint64_t offset) const {
705+
uint32_t MipsCheriCapTableSection::getIndex(const Symbol &sym,
706+
const InputSectionBase *isec,
707+
uint64_t offset) const {
707708
assert(valuesAssigned && "getIndex called before index assignment");
708709
const CaptableMap &entries =
709-
const_cast<CheriCapTableSection *>(this)->getCaptableMapForFileAndOffset(
710-
isec, offset);
710+
const_cast<MipsCheriCapTableSection *>(this)
711+
->getCaptableMapForFileAndOffset(isec, offset);
711712
auto it = entries.map.find(const_cast<Symbol *>(&sym));
712713
assert(entries.firstIndex != std::numeric_limits<uint64_t>::max() &&
713714
"First index not set yet?");
@@ -719,31 +720,31 @@ uint32_t CheriCapTableSection::getIndex(const Symbol &sym,
719720
return *it->second.index - entries.firstIndex;
720721
}
721722

722-
uint32_t CheriCapTableSection::getDynTlsOffset(const Symbol &sym) const {
723+
uint32_t MipsCheriCapTableSection::getDynTlsOffset(const Symbol &sym) const {
723724
assert(valuesAssigned && "getDynTlsOffset called before index assignment");
724725
auto it = dynTlsEntries.map.find(const_cast<Symbol *>(&sym));
725726
assert(it != dynTlsEntries.map.end());
726727
return *it->second.index * config->wordsize;
727728
}
728729

729-
uint32_t CheriCapTableSection::getTlsIndexOffset() const {
730+
uint32_t MipsCheriCapTableSection::getTlsIndexOffset() const {
730731
assert(valuesAssigned && "getTlsIndexOffset called before index assignment");
731732
auto it = dynTlsEntries.map.find(nullptr);
732733
assert(it != dynTlsEntries.map.end());
733734
return *it->second.index * config->wordsize;
734735
}
735736

736-
uint32_t CheriCapTableSection::getTlsOffset(const Symbol &sym) const {
737+
uint32_t MipsCheriCapTableSection::getTlsOffset(const Symbol &sym) const {
737738
assert(valuesAssigned && "getTlsOffset called before index assignment");
738739
auto it = tlsEntries.map.find(const_cast<Symbol *>(&sym));
739740
assert(it != tlsEntries.map.end());
740741
return *it->second.index * config->wordsize;
741742
}
742743

743744
template <class ELFT>
744-
uint64_t CheriCapTableSection::assignIndices(uint64_t startIndex,
745-
CaptableMap &entries,
746-
const Twine &symContext) {
745+
uint64_t MipsCheriCapTableSection::assignIndices(uint64_t startIndex,
746+
CaptableMap &entries,
747+
const Twine &symContext) {
747748
// Usually StartIndex will be zero (one global captable) but if we are
748749
// compiling with per-file/per-function
749750
uint64_t smallEntryCount = 0;
@@ -846,7 +847,7 @@ uint64_t CheriCapTableSection::assignIndices(uint64_t startIndex,
846847
RelocationBaseSection *dynRelSec =
847848
it.second.usedInCallExpr ? in.relaPlt.get() : mainPart->relaDyn.get();
848849
addCapabilityRelocation<ELFT>(
849-
targetSym, elfCapabilityReloc, in.cheriCapTable.get(), off,
850+
targetSym, elfCapabilityReloc, in.mipsCheriCapTable.get(), off,
850851
R_CHERI_CAPABILITY, 0, it.second.usedInCallExpr,
851852
[&]() {
852853
return ("\n>>> referenced by " + refName + "\n>>> first used in " +
@@ -860,7 +861,7 @@ uint64_t CheriCapTableSection::assignIndices(uint64_t startIndex,
860861
}
861862

862863
template <class ELFT>
863-
void CheriCapTableSection::assignValuesAndAddCapTableSymbols() {
864+
void MipsCheriCapTableSection::assignValuesAndAddCapTableSymbols() {
864865
// First assign the global indices (which will usually be the only ones)
865866
uint64_t assignedEntries = assignIndices<ELFT>(0, globalEntries, "");
866867
if (LLVM_UNLIKELY(config->capTableScope != CapTableScopePolicy::All)) {
@@ -948,22 +949,22 @@ void CheriCapTableSection::assignValuesAndAddCapTableSymbols() {
948949
}
949950

950951
template void
951-
CheriCapTableSection::assignValuesAndAddCapTableSymbols<ELF32LE>();
952+
MipsCheriCapTableSection::assignValuesAndAddCapTableSymbols<ELF32LE>();
952953
template void
953-
CheriCapTableSection::assignValuesAndAddCapTableSymbols<ELF32BE>();
954+
MipsCheriCapTableSection::assignValuesAndAddCapTableSymbols<ELF32BE>();
954955
template void
955-
CheriCapTableSection::assignValuesAndAddCapTableSymbols<ELF64LE>();
956+
MipsCheriCapTableSection::assignValuesAndAddCapTableSymbols<ELF64LE>();
956957
template void
957-
CheriCapTableSection::assignValuesAndAddCapTableSymbols<ELF64BE>();
958+
MipsCheriCapTableSection::assignValuesAndAddCapTableSymbols<ELF64BE>();
958959

959-
CheriCapTableMappingSection::CheriCapTableMappingSection()
960+
MipsCheriCapTableMappingSection::MipsCheriCapTableMappingSection()
960961
: SyntheticSection(SHF_ALLOC, SHT_PROGBITS, 8, ".captable_mapping") {
961962
assert(config->capabilitySize > 0);
962963
this->entsize = sizeof(CaptableMappingEntry);
963964
static_assert(sizeof(CaptableMappingEntry) == 24, "");
964965
}
965966

966-
size_t CheriCapTableMappingSection::getSize() const {
967+
size_t MipsCheriCapTableMappingSection::getSize() const {
967968
assert(config->capTableScope != CapTableScopePolicy::All);
968969
if (!isNeeded())
969970
return 0;
@@ -980,9 +981,9 @@ size_t CheriCapTableMappingSection::getSize() const {
980981
return count * sizeof(CaptableMappingEntry);
981982
}
982983

983-
void CheriCapTableMappingSection::writeTo(uint8_t *buf) {
984+
void MipsCheriCapTableMappingSection::writeTo(uint8_t *buf) {
984985
assert(config->capTableScope != CapTableScopePolicy::All);
985-
if (!in.cheriCapTable)
986+
if (!in.mipsCheriCapTable)
986987
return;
987988
if (!in.symTab) {
988989
error("Cannot write " + this->name + " without .symtab section!");
@@ -997,14 +998,14 @@ void CheriCapTableMappingSection::writeTo(uint8_t *buf) {
997998
Symbol* sym = ste.sym;
998999
if (!sym->isDefined() || !sym->isFunc())
9991000
continue;
1000-
const CheriCapTableSection::CaptableMap *capTableMap = nullptr;
1001+
const MipsCheriCapTableSection::CaptableMap *capTableMap = nullptr;
10011002
if (config->capTableScope == CapTableScopePolicy::Function) {
1002-
auto it = in.cheriCapTable->perFunctionEntries.find(sym);
1003-
if (it != in.cheriCapTable->perFunctionEntries.end())
1003+
auto it = in.mipsCheriCapTable->perFunctionEntries.find(sym);
1004+
if (it != in.mipsCheriCapTable->perFunctionEntries.end())
10041005
capTableMap = &it->second;
10051006
} else if (config->capTableScope == CapTableScopePolicy::File) {
1006-
auto it = in.cheriCapTable->perFileEntries.find(sym->file);
1007-
if (it != in.cheriCapTable->perFileEntries.end())
1007+
auto it = in.mipsCheriCapTable->perFileEntries.find(sym->file);
1008+
if (it != in.mipsCheriCapTable->perFileEntries.end())
10081009
capTableMap = &it->second;
10091010
} else {
10101011
llvm_unreachable("Invalid mode!");

lld/ELF/Arch/Cheri.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,9 @@ class CheriCapRelocsSection : public SyntheticSection {
186186
// +---------------------------------------+
187187
// TODO: TLS caps also need to be per file/function
188188

189-
class CheriCapTableSection : public SyntheticSection {
189+
class MipsCheriCapTableSection : public SyntheticSection {
190190
public:
191-
CheriCapTableSection();
191+
MipsCheriCapTableSection();
192192
// InputFile and Offset is needed in order to implement per-file/per-function
193193
// tables
194194
void addEntry(Symbol &sym, RelExpr expr, InputSectionBase *isec,
@@ -266,7 +266,7 @@ class CheriCapTableSection : public SyntheticSection {
266266
CaptableMap dynTlsEntries;
267267
CaptableMap tlsEntries;
268268
bool valuesAssigned = false;
269-
friend class CheriCapTableMappingSection;
269+
friend class MipsCheriCapTableMappingSection;
270270
};
271271

272272
// TODO: could shrink these to reduce size overhead but this is experimental
@@ -280,13 +280,13 @@ struct CaptableMappingEntry {
280280

281281
// Map from symbol vaddr -> captable subset so that RTLD can setup the correct
282282
// trampolines to initialize $cgp to the correct subset
283-
class CheriCapTableMappingSection : public SyntheticSection {
283+
class MipsCheriCapTableMappingSection : public SyntheticSection {
284284
public:
285-
CheriCapTableMappingSection();
285+
MipsCheriCapTableMappingSection();
286286
bool isNeeded() const override {
287287
if (config->capTableScope == CapTableScopePolicy::All)
288288
return false;
289-
return in.cheriCapTable && in.cheriCapTable->isNeeded();
289+
return in.mipsCheriCapTable && in.mipsCheriCapTable->isNeeded();
290290
}
291291
void writeTo(uint8_t *buf) override;
292292
size_t getSize() const override;

lld/ELF/Arch/Mips.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ RelExpr MIPS<ELFT>::getRelExpr(RelType type, const Symbol &s,
123123
case R_MICROMIPS_GPREL7_S2:
124124
return R_MIPS_GOTREL;
125125
case R_MIPS_CHERI_CAPTABLEREL16:
126-
return R_CHERI_CAPABILITY_TABLE_REL;
126+
return R_MIPS_CHERI_CAPTAB_REL;
127127
case R_MIPS_26:
128128
case R_MICROMIPS_26_S1:
129129
return R_PLT;
@@ -212,16 +212,16 @@ RelExpr MIPS<ELFT>::getRelExpr(RelType type, const Symbol &s,
212212
return R_CHERI_CAPABILITY;
213213
case R_MIPS_CHERI_CAPTAB_LO16:
214214
case R_MIPS_CHERI_CAPTAB_HI16:
215-
return R_CHERI_CAPABILITY_TABLE_INDEX;
215+
return R_MIPS_CHERI_CAPTAB_INDEX;
216216
case R_MIPS_CHERI_CAPCALL_LO16:
217217
case R_MIPS_CHERI_CAPCALL_HI16:
218-
return R_CHERI_CAPABILITY_TABLE_INDEX_CALL;
218+
return R_MIPS_CHERI_CAPTAB_INDEX_CALL;
219219
case R_MIPS_CHERI_CAPTAB_CLC11:
220220
case R_MIPS_CHERI_CAPTAB20:
221-
return R_CHERI_CAPABILITY_TABLE_INDEX_SMALL_IMMEDIATE;
221+
return R_MIPS_CHERI_CAPTAB_INDEX_SMALL_IMMEDIATE;
222222
case R_MIPS_CHERI_CAPCALL_CLC11:
223223
case R_MIPS_CHERI_CAPCALL20:
224-
return R_CHERI_CAPABILITY_TABLE_INDEX_CALL_SMALL_IMMEDIATE;
224+
return R_MIPS_CHERI_CAPTAB_INDEX_CALL_SMALL_IMMEDIATE;
225225
case R_MIPS_CHERI_CAPTAB_TLS_GD_LO16:
226226
case R_MIPS_CHERI_CAPTAB_TLS_GD_HI16:
227227
return R_MIPS_CHERI_CAPTAB_TLSGD;

lld/ELF/InputSection.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -863,28 +863,28 @@ uint64_t InputSectionBase::getRelocTargetVA(const InputFile *file, RelType type,
863863
return in.got->getTlsIndexVA() + a - p;
864864
case R_CHERI_CAPABILITY:
865865
llvm_unreachable("R_CHERI_CAPABILITY should not be handled here!");
866-
case R_CHERI_CAPABILITY_TABLE_INDEX:
867-
case R_CHERI_CAPABILITY_TABLE_INDEX_SMALL_IMMEDIATE:
868-
case R_CHERI_CAPABILITY_TABLE_INDEX_CALL:
869-
case R_CHERI_CAPABILITY_TABLE_INDEX_CALL_SMALL_IMMEDIATE:
866+
case R_MIPS_CHERI_CAPTAB_INDEX:
867+
case R_MIPS_CHERI_CAPTAB_INDEX_SMALL_IMMEDIATE:
868+
case R_MIPS_CHERI_CAPTAB_INDEX_CALL:
869+
case R_MIPS_CHERI_CAPTAB_INDEX_CALL_SMALL_IMMEDIATE:
870870
assert(a == 0 && "capability table index relocs should not have addends");
871-
return sym.getCapTableOffset(isec, offset);
872-
case R_CHERI_CAPABILITY_TABLE_REL:
873-
if (!ElfSym::cheriCapabilityTable) {
871+
return sym.getMipsCheriCapTableOffset(isec, offset);
872+
case R_MIPS_CHERI_CAPTAB_REL:
873+
if (!ElfSym::mipsCheriCapabilityTable) {
874874
error("cannot compute difference between non-existent "
875875
"CheriCapabilityTable and symbol " + toString(sym));
876876
return sym.getVA(a);
877877
}
878-
return sym.getVA(a) - ElfSym::cheriCapabilityTable->getVA();
878+
return sym.getVA(a) - ElfSym::mipsCheriCapabilityTable->getVA();
879879
case R_MIPS_CHERI_CAPTAB_TLSGD:
880880
assert(a == 0 && "capability table index relocs should not have addends");
881-
return in.cheriCapTable->getDynTlsOffset(sym);
881+
return in.mipsCheriCapTable->getDynTlsOffset(sym);
882882
case R_MIPS_CHERI_CAPTAB_TLSLD:
883883
assert(a == 0 && "capability table index relocs should not have addends");
884-
return in.cheriCapTable->getTlsIndexOffset();
884+
return in.mipsCheriCapTable->getTlsIndexOffset();
885885
case R_MIPS_CHERI_CAPTAB_TPREL:
886886
assert(a == 0 && "capability table index relocs should not have addends");
887-
return in.cheriCapTable->getTlsOffset(sym);
887+
return in.mipsCheriCapTable->getTlsOffset(sym);
888888
default:
889889
llvm_unreachable("invalid expression");
890890
}

lld/ELF/Relocations.cpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ static bool isRelExpr(RelExpr expr) {
222222
return oneof<R_PC, R_GOTREL, R_GOTPLTREL, R_MIPS_GOTREL, R_PPC64_CALL,
223223
R_PPC64_RELAX_TOC, R_AARCH64_PAGE_PC, R_RELAX_GOT_PC,
224224
R_RISCV_PC_INDIRECT, R_PPC64_RELAX_GOT_PC, R_LOONGARCH_PAGE_PC,
225-
R_CHERI_CAPABILITY_TABLE_REL>(expr);
225+
R_MIPS_CHERI_CAPTAB_REL>(expr);
226226
}
227227

228228
static RelExpr toPlt(RelExpr expr) {
@@ -976,11 +976,11 @@ bool RelocationScanner::isStaticLinkTimeConstant(RelExpr e, RelType type,
976976
// These expressions always compute a constant
977977
if (oneof<R_GOTPLT, R_GOT_OFF, R_RELAX_HINT, R_MIPS_GOT_LOCAL_PAGE,
978978
R_MIPS_GOTREL, R_MIPS_GOT_OFF, R_MIPS_GOT_OFF32, R_MIPS_GOT_GP_PC,
979-
R_CHERI_CAPABILITY_TABLE_INDEX,
980-
R_CHERI_CAPABILITY_TABLE_INDEX_SMALL_IMMEDIATE,
981-
R_CHERI_CAPABILITY_TABLE_INDEX_CALL,
982-
R_CHERI_CAPABILITY_TABLE_INDEX_CALL_SMALL_IMMEDIATE,
983-
R_CHERI_CAPABILITY_TABLE_REL,
979+
R_MIPS_CHERI_CAPTAB_INDEX,
980+
R_MIPS_CHERI_CAPTAB_INDEX_SMALL_IMMEDIATE,
981+
R_MIPS_CHERI_CAPTAB_INDEX_CALL,
982+
R_MIPS_CHERI_CAPTAB_INDEX_CALL_SMALL_IMMEDIATE,
983+
R_MIPS_CHERI_CAPTAB_REL,
984984
R_AARCH64_GOT_PAGE_PC, R_GOT_PC, R_GOTONLY_PC, R_GOTPLTONLY_PC,
985985
R_PLT_PC, R_PLT_GOTPLT, R_PPC32_PLTREL, R_PPC64_CALL_PLT,
986986
R_PPC64_RELAX_TOC, R_RISCV_ADD, R_AARCH64_GOT_PAGE,
@@ -1087,12 +1087,12 @@ void RelocationScanner::processAux(RelExpr expr, RelType type, uint64_t offset,
10871087
return;
10881088
}
10891089

1090-
if (oneof<R_CHERI_CAPABILITY_TABLE_INDEX,
1091-
R_CHERI_CAPABILITY_TABLE_INDEX_SMALL_IMMEDIATE,
1092-
R_CHERI_CAPABILITY_TABLE_INDEX_CALL,
1093-
R_CHERI_CAPABILITY_TABLE_INDEX_CALL_SMALL_IMMEDIATE>(expr)) {
1090+
if (oneof<R_MIPS_CHERI_CAPTAB_INDEX,
1091+
R_MIPS_CHERI_CAPTAB_INDEX_SMALL_IMMEDIATE,
1092+
R_MIPS_CHERI_CAPTAB_INDEX_CALL,
1093+
R_MIPS_CHERI_CAPTAB_INDEX_CALL_SMALL_IMMEDIATE>(expr)) {
10941094
std::lock_guard<std::mutex> lock(relocMutex);
1095-
in.cheriCapTable->addEntry(sym, expr, sec, offset);
1095+
in.mipsCheriCapTable->addEntry(sym, expr, sec, offset);
10961096
// Write out the index into the instruction
10971097
sec->relocations.push_back({expr, type, offset, addend, &sym});
10981098
return;
@@ -1295,17 +1295,17 @@ static unsigned handleMipsTlsRelocation(RelType type, Symbol &sym,
12951295
return 1;
12961296
}
12971297
if (expr == R_MIPS_CHERI_CAPTAB_TLSLD) {
1298-
in.cheriCapTable->addTlsIndex();
1298+
in.mipsCheriCapTable->addTlsIndex();
12991299
c.relocations.push_back({expr, type, offset, addend, &sym});
13001300
return 1;
13011301
}
13021302
if (expr == R_MIPS_CHERI_CAPTAB_TLSGD) {
1303-
in.cheriCapTable->addDynTlsEntry(sym);
1303+
in.mipsCheriCapTable->addDynTlsEntry(sym);
13041304
c.relocations.push_back({expr, type, offset, addend, &sym});
13051305
return 1;
13061306
}
13071307
if (expr == R_MIPS_CHERI_CAPTAB_TPREL) {
1308-
in.cheriCapTable->addTlsEntry(sym);
1308+
in.mipsCheriCapTable->addTlsEntry(sym);
13091309
c.relocations.push_back({expr, type, offset, addend, &sym});
13101310
return 1;
13111311
}

0 commit comments

Comments
 (0)