Skip to content

Commit 7c8981f

Browse files
jrtc27resistor
authored andcommitted
[NFC][ELF][CHERI] Rename CaptablePermissions to CapRelocPermission
1 parent 529e2be commit 7c8981f

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
@@ -312,8 +312,7 @@ static uint64_t getTargetSize(Ctx &ctx, const CheriCapRelocLocation &location,
312312
return targetSize;
313313
}
314314

315-
template <class ELFT>
316-
struct CaptablePermissions {
315+
template <class ELFT> struct CapRelocPermission {
317316
static constexpr uint64_t permissionBit(uint64_t bit) {
318317
return UINT64_C(1) << ((sizeof(typename ELFT::uint) * 8) - bit);
319318
}
@@ -375,14 +374,14 @@ void CheriCapRelocsSection::writeToImpl(uint8_t *buf) {
375374
uint64_t permissions = 0;
376375
// Fow now Function implies ReadOnly so don't add the flag
377376
if (isFunc || isGnuIFunc) {
378-
permissions |= CaptablePermissions<ELFT>::function;
377+
permissions |= CapRelocPermission<ELFT>::function;
379378
if (isGnuIFunc)
380-
permissions |= CaptablePermissions<ELFT>::indirect;
379+
permissions |= CapRelocPermission<ELFT>::indirect;
381380
} else if (os) {
382381
assert(!isTls);
383382
// if ((OS->getPhdrFlags() & PF_W) == 0) {
384383
if (((os->flags & SHF_WRITE) == 0) || isRelroSection(ctx, os)) {
385-
permissions |= CaptablePermissions<ELFT>::readOnly;
384+
permissions |= CapRelocPermission<ELFT>::readOnly;
386385
} else if (os->flags & SHF_EXECINSTR) {
387386
#if 0
388387
// This generates a load of annoying spurious warnings with CHERIoT.

0 commit comments

Comments
 (0)