From 9dc21009a47300f62b2a1fd9fec2270a21bd7c3d Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Mon, 17 May 2021 09:59:14 +0200 Subject: elf: Move static TLS size and alignment into _rtld_global_ro This helps to clarify that the caching of these fields in libpthread (in __static_tls_size, __static_tls_align_m1) is unnecessary. Reviewed-by: Adhemerval Zanella --- sysdeps/generic/ldsodefs.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'sysdeps') diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h index c288f3a..e383aa1 100644 --- a/sysdeps/generic/ldsodefs.h +++ b/sysdeps/generic/ldsodefs.h @@ -437,12 +437,8 @@ struct rtld_global } *_dl_tls_dtv_slotinfo_list; /* Number of modules in the static TLS block. */ EXTERN size_t _dl_tls_static_nelem; - /* Size of the static TLS block. */ - EXTERN size_t _dl_tls_static_size; /* Size actually allocated in the static TLS block. */ EXTERN size_t _dl_tls_static_used; - /* Alignment requirement of the static TLS block. */ - EXTERN size_t _dl_tls_static_align; /* Remaining amount of static TLS that may be used for optimizing dynamic TLS access (e.g. with TLSDESC). */ EXTERN size_t _dl_tls_static_optional; @@ -610,6 +606,12 @@ struct rtld_global_ro binaries, don't honor for PIEs). */ EXTERN ElfW(Addr) _dl_use_load_bias; + /* Size of the static TLS block. */ + EXTERN size_t _dl_tls_static_size; + + /* Alignment requirement of the static TLS block. */ + EXTERN size_t _dl_tls_static_align; + /* Size of surplus space in the static TLS area for dynamically loaded modules with IE-model TLS or for TLSDESC optimization. See comments in elf/dl-tls.c where it is initialized. */ -- cgit v1.1