summary refs log tree commit diff
path: root/sysdeps/generic/dl-tls.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-07-23 23:12:01 +0000
committerUlrich Drepper <drepper@redhat.com>2002-07-23 23:12:01 +0000
commit8a30f00fe8ea30054c2df183d34ef3ad8a522cc5 (patch)
tree4b34500fac3e847c4f98bec8ca6c0ab96f7704ba /sysdeps/generic/dl-tls.c
parentfcda29e2604e941cbe9a9eb30c56b8b8fa607836 (diff)
downloadglibc-8a30f00fe8ea30054c2df183d34ef3ad8a522cc5.tar.gz
glibc-8a30f00fe8ea30054c2df183d34ef3ad8a522cc5.tar.xz
glibc-8a30f00fe8ea30054c2df183d34ef3ad8a522cc5.zip
Update.
2002-07-23  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/generic/libc-tls.c: New file.
	* csu/Makefile (routines): Add libc-tls.
	(static-only-routines): Add libc-tls.
	* elf/dl-support.c (_dl_phdr): New variable.
	(_dl_phnum): New variable.
	(_dl_aux_init): Initialize _dl_phdr and _dl_phnum from aux vector.
	* sysdeps/generic/libc-start.c (__libc_start_main): Reorganize code
	for !SHARED.  First look through auxiliary vector.  If TLS always
	call __pthread_initialize_minimal.

	* sysdeps/generic/dl-tls.c (_dl_allocate_tls): Make sure size argument
	in mmap call is never zero.
Diffstat (limited to 'sysdeps/generic/dl-tls.c')
-rw-r--r--sysdeps/generic/dl-tls.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdeps/generic/dl-tls.c b/sysdeps/generic/dl-tls.c
index 0d6fcec0e5..8877023571 100644
--- a/sysdeps/generic/dl-tls.c
+++ b/sysdeps/generic/dl-tls.c
@@ -215,7 +215,7 @@ _dl_allocate_tls (void)
     GL(dl_zerofd) = _dl_sysdep_open_zero_fill ();
 #  define MAP_ANON 0
 # endif
-  result = __mmap (0, GL(dl_tls_static_size), PROT_READ|PROT_WRITE,
+  result = __mmap (0, GL(dl_tls_static_size) ?: 1, PROT_READ|PROT_WRITE,
 		   MAP_ANON|MAP_PRIVATE, _dl_zerofd, 0);
 
   /* We allocate a few more elements in the dtv than are needed for the