]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
cheri: Update the static tls requirement of the libc
authorSzabolcs Nagy <szabolcs.nagy@arm.com>
Tue, 18 Oct 2022 14:10:03 +0000 (15:10 +0100)
committerSzabolcs Nagy <szabolcs.nagy@arm.com>
Thu, 20 Oct 2022 17:16:55 +0000 (18:16 +0100)
Larger requirement because pointers are bigger.

elf/dl-tls.c

index 093cdddb7ed8ff53cf721a1290afe7138d22005e..1b90bf17b32296921de34cd62531002e22e673fe 100644 (file)
    observed PT_GNU_TLS sizes across all architectures.  Some
    architectures have lower values due to differences in type sizes
    and link editor capabilities.  */
+#ifdef __CHERI_PURE_CAPABILITY__
+#define LIBC_IE_TLS 256
+#else
 #define LIBC_IE_TLS 144
+#endif
 
 /* Size of initial-exec TLS in libraries other than libc.so.
    This should be large enough to cover runtime libraries of the
@@ -87,7 +91,11 @@ tls_static_surplus (int nns, int opt_tls)
    the computation of dl_tls_static_surplus in
    _dl_tls_static_surplus_init yields the historic value 1664, for
    backwards compatibility.  */
+#ifdef __CHERI_PURE_CAPABILITY__
+#define LEGACY_TLS 0
+#else
 #define LEGACY_TLS (1664 - tls_static_surplus (DEFAULT_NNS, OPTIONAL_TLS))
+#endif
 
 /* Calculate the size of the static TLS surplus, when the given
    number of audit modules are loaded.  Must be called after the