Skip to content

Commit a307f13

Browse files
committed
[NFC][ELF][CHERI] Rename CaptablePermissions to CapRelocPermission
1 parent 6ad914b commit a307f13

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

lld/ELF/Arch/Cheri.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -308,8 +308,7 @@ static uint64_t getTargetSize(const CheriCapRelocLocation &location,
308308
return targetSize;
309309
}
310310

311-
template <class ELFT>
312-
struct CaptablePermissions {
311+
template <class ELFT> struct CapRelocPermission {
313312
static constexpr uint64_t permissionBit(uint64_t bit) {
314313
return UINT64_C(1) << ((sizeof(typename ELFT::uint) * 8) - bit);
315314
}
@@ -371,14 +370,14 @@ void CheriCapRelocsSection::writeToImpl(uint8_t *buf) {
371370
uint64_t permissions = 0;
372371
// Fow now Function implies ReadOnly so don't add the flag
373372
if (isFunc || isGnuIFunc) {
374-
permissions |= CaptablePermissions<ELFT>::function;
373+
permissions |= CapRelocPermission<ELFT>::function;
375374
if (isGnuIFunc)
376-
permissions |= CaptablePermissions<ELFT>::indirect;
375+
permissions |= CapRelocPermission<ELFT>::indirect;
377376
} else if (os) {
378377
assert(!isTls);
379378
// if ((OS->getPhdrFlags() & PF_W) == 0) {
380379
if (((os->flags & SHF_WRITE) == 0) || isRelroSection(os)) {
381-
permissions |= CaptablePermissions<ELFT>::readOnly;
380+
permissions |= CapRelocPermission<ELFT>::readOnly;
382381
} else if (os->flags & SHF_EXECINSTR) {
383382
warn("Non-function __cap_reloc against symbol in section with "
384383
"SHF_EXECINSTR (" +

0 commit comments

Comments
 (0)