Skip to content

Commit b2e7f18

Browse files
jrtc27veselypeta
authored andcommitted
[NFC][ELF][CHERI] Rename CaptablePermissions to CapRelocPermission
2 parents 9641c3a + a307f13 commit b2e7f18

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

lld/ELF/Arch/Cheri.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -393,8 +393,7 @@ static uint64_t getTargetSize(const CheriCapRelocLocation &location,
393393
return targetSize;
394394
}
395395

396-
template <class ELFT>
397-
struct CaptablePermissions {
396+
template <class ELFT> struct CapRelocPermission {
398397
static constexpr uint64_t permissionBit(uint64_t bit) {
399398
return UINT64_C(1) << ((sizeof(typename ELFT::uint) * 8) - bit);
400399
}
@@ -459,16 +458,16 @@ void CheriCapRelocsSection::writeToImpl(uint8_t *buf) {
459458
uint64_t permissions = 0;
460459
// Fow now Function implies ReadOnly so don't add the flag
461460
if (isFunc || isGnuIFunc) {
462-
permissions |= CaptablePermissions<ELFT>::function;
461+
permissions |= CapRelocPermission<ELFT>::function;
463462
if (isGnuIFunc)
464-
permissions |= CaptablePermissions<ELFT>::indirect;
463+
permissions |= CapRelocPermission<ELFT>::indirect;
465464
if (dontSeal)
466-
permissions |= CaptablePermissions<ELFT>::dontSeal;
465+
permissions |= CapRelocPermission<ELFT>::dontSeal;
467466
} else if (os) {
468467
assert(!isTls);
469468
// if ((OS->getPhdrFlags() & PF_W) == 0) {
470469
if (((os->flags & SHF_WRITE) == 0) || isRelroSection(os)) {
471-
permissions |= CaptablePermissions<ELFT>::readOnly;
470+
permissions |= CapRelocPermission<ELFT>::readOnly;
472471
} else if (os->flags & SHF_EXECINSTR) {
473472
warn("Non-function __cap_reloc against symbol in section with "
474473
"SHF_EXECINSTR (" +

0 commit comments

Comments
 (0)