]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
cheri: Introduce elfptr_t int type that can hold pointers
authorSzabolcs Nagy <szabolcs.nagy@arm.com>
Thu, 20 Oct 2022 11:33:20 +0000 (12:33 +0100)
committerSzabolcs Nagy <szabolcs.nagy@arm.com>
Thu, 27 Oct 2022 13:46:51 +0000 (14:46 +0100)
Use elfptr_t when ElfW(Addr) represents a runtime pointer (may be
dereferenced or pointers may be derived from it).

elf/link.h

index 88b1ad7fd014a6eef38cd6a42a271f18fedcad76..c0f255ae18a8a8fef72c562e002d0308cfd40b8d 100644 (file)
 #include <bits/elfclass.h>             /* Defines __ELF_NATIVE_CLASS.  */
 #include <bits/link.h>
 
+#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.  */