]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
cheri: elf: Adjust Elf64_auxv_t for capabilities
authorSzabolcs Nagy <szabolcs.nagy@arm.com>
Thu, 10 Jun 2021 12:50:17 +0000 (13:50 +0100)
committerSzabolcs Nagy <szabolcs.nagy@arm.com>
Fri, 5 Aug 2022 18:45:19 +0000 (19:45 +0100)
The Elf64_auxv_t needs to be adjusted for the new capability size.

elf/elf.h

index 741383610ec134e52ad2ba83316766c730d435e4..6ced67f7c1cb1907f10c1f448c9d1ba669f503be 100644 (file)
--- a/elf/elf.h
+++ b/elf/elf.h
@@ -1159,6 +1159,14 @@ typedef struct
 
 typedef struct
 {
+#if defined __CHERI_PURE_CAPABILITY__
+  uint64_t a_type;
+  uint64_t __pad;
+  union
+    {
+      __uintcap_t a_val;
+    } a_un;
+#else
   uint64_t a_type;             /* Entry type */
   union
     {
@@ -1167,6 +1175,7 @@ typedef struct
         though, since it does not work when using 32-bit definitions
         on 64-bit platforms and vice versa.  */
     } a_un;
+#endif
 } Elf64_auxv_t;
 
 /* Legal values for a_type (entry type).  */