about summary refs log tree commit diff
path: root/elf/dl-open.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-11-05 03:01:37 +0000
committerRoland McGrath <roland@gnu.org>2002-11-05 03:01:37 +0000
commitc56baa872be4a23813de943f90b1808767eb9430 (patch)
tree737acf138fbfbf32779bd9a9e02c9c8e7d6a6da7 /elf/dl-open.c
parent2f0f157e1c222a91a74d3a14292c28538972fa63 (diff)
downloadglibc-c56baa872be4a23813de943f90b1808767eb9430.tar.gz
glibc-c56baa872be4a23813de943f90b1808767eb9430.tar.xz
glibc-c56baa872be4a23813de943f90b1808767eb9430.zip
2002-11-03 Roland McGrath <roland@redhat.com>
	* sysdeps/generic/ldsodefs.h (struct rtld_global): New member
	`_dl_tls_static_used'.
	* sysdeps/generic/libc-tls.c (_dl_tls_static_used): New variable.
	(__libc_setup_tls): Initialize it.  Let the initial value of
	_dl_tls_static_size indicate some surplus space in the computed value.
	* elf/dl-open.c (_dl_tls_static_size): New variable.
	* sysdeps/generic/dl-tls.c (_dl_determine_tlsoffset): Initialize
	_dl_tls_static_used.  Add some surplus space into _dl_tls_static_size.
	* elf/dl-reloc.c [USE_TLS] (allocate_static_tls): New function.
	(CHECK_STATIC_TLS): Use it.
	* elf/dl-close.c (_dl_close): Adjust _dl_tls_static_used when the
	closed objects occupied a trailing contiguous chunk of static TLS area.
Diffstat (limited to 'elf/dl-open.c')
-rw-r--r--elf/dl-open.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/elf/dl-open.c b/elf/dl-open.c
index 0e74996473..7dd18b7d97 100644
--- a/elf/dl-open.c
+++ b/elf/dl-open.c
@@ -34,6 +34,12 @@
 #include <dl-dst.h>
 
 
+#ifdef SHARED
+/* Giving this initialized value preallocates some surplus bytes in the
+   static TLS area, see __libc_setup_tls (libc-tls.c).  */
+size_t _dl_tls_static_size = 576;
+#endif
+
 extern ElfW(Addr) _dl_sysdep_start (void **start_argptr,
 				    void (*dl_main) (const ElfW(Phdr) *phdr,
 						     ElfW(Word) phnum,