aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzabolcs Nagy <szabolcs.nagy@arm.com>2022-10-20 12:33:20 +0100
committerSzabolcs Nagy <szabolcs.nagy@arm.com>2022-10-27 14:46:51 +0100
commitd9c082706ea28d45f94f8c7ec46e15ec615a2e66 (patch)
tree43ce55e88232a2e51e9f162d4efe9b23add64483
parentdb0005c7d3ad9f27e1acc0610b58dddde095be00 (diff)
downloadglibc-d9c082706ea28d45f94f8c7ec46e15ec615a2e66.tar
glibc-d9c082706ea28d45f94f8c7ec46e15ec615a2e66.tar.gz
glibc-d9c082706ea28d45f94f8c7ec46e15ec615a2e66.tar.bz2
glibc-d9c082706ea28d45f94f8c7ec46e15ec615a2e66.zip
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).
-rw-r--r--elf/link.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/elf/link.h b/elf/link.h
index 88b1ad7fd0..c0f255ae18 100644
--- a/elf/link.h
+++ b/elf/link.h
@@ -34,6 +34,12 @@
#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. */