aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sysdeps/unix/sysv/linux/dl-osinfo.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/dl-osinfo.h b/sysdeps/unix/sysv/linux/dl-osinfo.h
index 49d8f973c8..c5d864f5ba 100644
--- a/sysdeps/unix/sysv/linux/dl-osinfo.h
+++ b/sysdeps/unix/sysv/linux/dl-osinfo.h
@@ -52,7 +52,12 @@ _dl_setup_stack_chk_guard (void *dl_random)
static inline uintptr_t __attribute__ ((always_inline))
_dl_setup_pointer_guard (void *dl_random, uintptr_t stack_chk_guard)
{
+#ifdef __CHERI_PURE_CAPABILITY__
+ /* Pointer mangling is not supported on capability architectures. */
+ return 0;
+#else
uintptr_t ret;
memcpy (&ret, (char *) dl_random + sizeof (ret), sizeof (ret));
return ret;
+#endif
}