From d9c082706ea28d45f94f8c7ec46e15ec615a2e66 Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Thu, 20 Oct 2022 12:33:20 +0100 Subject: [PATCH] cheri: Introduce elfptr_t int type that can hold pointers Use elfptr_t when ElfW(Addr) represents a runtime pointer (may be dereferenced or pointers may be derived from it). --- elf/link.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/elf/link.h b/elf/link.h index 88b1ad7fd01..c0f255ae18a 100644 --- a/elf/link.h +++ b/elf/link.h @@ -34,6 +34,12 @@ #include /* Defines __ELF_NATIVE_CLASS. */ #include +#ifdef __CHERI_PURE_CAPABILITY__ +typedef uintptr_t elfptr_t; +#else +typedef ElfW(Addr) elfptr_t; +#endif + /* The legacy rendezvous structure used by the run-time dynamic linker to communicate details of shared object loading to the debugger. */ -- 2.47.2