aboutsummaryrefslogtreecommitdiff
path: root/elf
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-08-06 01:00:59 +0000
committerUlrich Drepper <drepper@redhat.com>2002-08-06 01:00:59 +0000
commitf884de5be9f507f635acea32b127d0ba3985d59f (patch)
tree2ca6ada0428cd034665dbf6fec1e4897b9e6d07b /elf
parent84bdcade74b3a57cda9d31f56f9054ccbc2b519f (diff)
downloadglibc-f884de5be9f507f635acea32b127d0ba3985d59f.zip
glibc-f884de5be9f507f635acea32b127d0ba3985d59f.tar.gz
glibc-f884de5be9f507f635acea32b127d0ba3985d59f.tar.bz2
Update.
2002-08-05 Ulrich Drepper <drepper@redhat.com> * elf/rtld.c (_dl_start): Don't use memset. Use same tricks as for the other memset call in this function. * sysdeps/generic/dl-tls.c (_dl_allocate_tls_init): Store dtv pointer at correct index. Clear BSS region now that memalign is used. * include/wchar.h (wcrtomb, wcscmp, wcsftime, wcsspn, wcschr, wcscoll, wcspbrk): Add libc_hidden_proto. * time/strftime.c (my_strftime): Add libc_hidden_def. (strftime): Remove libc_hidden_def. * wcsmbs/wcschr.c (wcschr): Add libc_hidden_def. * wcsmbs/wcspbrk.c (wcspbrk): Likewise. * wcsmbs/wcsspn.c (wcsspn): Likewise. * wcsmbs/wcscmp.c (wcscmp): Likewise. * wcsmbs/wcrtomb.c (wcrtomb): Add libc_hidden_weak. * wcsmbs/wcscoll.c (wcscoll): Likewise. * include/rpc/rpc.h (__rpc_thread_svc_max_pollfd, __rpc_thread_svc_pollfd, __rpc_thread_svc_fdset, __rpc_thread_createerr): Add libc_hidden_proto. * sunrpc/rpc_thread.c (__rpc_thread_svc_max_pollfd, __rpc_thread_svc_pollfd, __rpc_thread_svc_fdset, __rpc_thread_createerr): Add libc_hidden_def. * include/rpc/clnt.h (clnt_sperrno, clnt_spcreateerror, clnt_perror, clnt_sperror, _rpc_dtablesize): Add libc_hidden_proto. * sunrpc/clnt_perr.c (clnt_sperrno, clnt_spcreateerror, clnt_perror, clnt_sperror): Add libc_hidden_def. * sunrpc/rpc_dtable.c (_rpc_dtablesize): Likewise. * include/rpc/des_crypt.h (des_setparity, ecb_crypt, cbc_crypt): Add libc_hidden_proto. * sunrpc/des_crypt.c (ecb_crypt, cbc_crypt): Add libc_hidden_proto. * sunrpc/des_soft.c (des_setparity): Likewise. * include/rpc/auth.h (key_encryptsession_pk, key_decryptsession_pk): Add libc_hidden_proto. * sunrpc/key_call.c (key_encryptsession_pk, key_decryptsession_pk): Add libc_hidden_def.
Diffstat (limited to 'elf')
-rw-r--r--elf/rtld.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/elf/rtld.c b/elf/rtld.c
index f59b8a7..44ff5cb 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -185,6 +185,7 @@ _dl_start (void *arg)
{
void *tlsblock;
size_t max_align = MAX (TLS_INIT_TCB_ALIGN, phdr[cnt].p_align);
+ char *p;
bootstrap_map.l_tls_blocksize = phdr[cnt].p_memsz;
bootstrap_map.l_tls_align = phdr[cnt].p_align;
@@ -231,10 +232,19 @@ _dl_start (void *arg)
# else
# error "Either TLS_TCB_AT_TP or TLS_DTV_AT_TP must be defined"
# endif
- memset (__mempcpy (initdtv[2].pointer, bootstrap_map.l_tls_initimage,
- bootstrap_map.l_tls_initimage_size),
- '\0', (bootstrap_map.l_tls_blocksize
- - bootstrap_map.l_tls_initimage_size));
+ p = __mempcpy (initdtv[2].pointer, bootstrap_map.l_tls_initimage,
+ bootstrap_map.l_tls_initimage_size);
+# ifdef HAVE_BUILTIN_MEMSET
+ __builtin_memset (p, '\0', (bootstrap_map.l_tls_blocksize
+ - bootstrap_map.l_tls_initimage_size));
+# else
+ {
+ size_t remaining = (bootstrap_map.l_tls_blocksize
+ - bootstrap_map.l_tls_initimage_size);
+ while (remaining-- > 0)
+ *p++ = '\0';
+ }
+#endif
/* Install the pointer to the dtv. */