aboutsummaryrefslogtreecommitdiff
path: root/elf
diff options
context:
space:
mode:
authorSzabolcs Nagy <szabolcs.nagy@arm.com>2022-10-18 15:10:03 +0100
committerSzabolcs Nagy <szabolcs.nagy@arm.com>2022-10-20 18:16:55 +0100
commit78412dcc6a173726a3db78c8a0626aec2f1dd42a (patch)
tree63ad8aaa1add56354e56bb80a369aafeefffab1d /elf
parent4ad4ea848b335d803bcf4754a1cea78f697eaec5 (diff)
downloadglibc-78412dcc6a173726a3db78c8a0626aec2f1dd42a.zip
glibc-78412dcc6a173726a3db78c8a0626aec2f1dd42a.tar.gz
glibc-78412dcc6a173726a3db78c8a0626aec2f1dd42a.tar.bz2
cheri: Update the static tls requirement of the libc
Larger requirement because pointers are bigger.
Diffstat (limited to 'elf')
-rw-r--r--elf/dl-tls.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/elf/dl-tls.c b/elf/dl-tls.c
index 093cddd..1b90bf1 100644
--- a/elf/dl-tls.c
+++ b/elf/dl-tls.c
@@ -62,7 +62,11 @@
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