2002-08-04 Roland McGrath <roland@redhat.com>
authorroland <roland>
Mon, 5 Aug 2002 01:20:52 +0000 (01:20 +0000)
committerroland <roland>
Mon, 5 Aug 2002 01:20:52 +0000 (01:20 +0000)
commit228b41e4f854a369623853c87dd205e418746756
tree1ed7532388f59dfeb083dc16a025eecd9c271893
parentd883d3cc8faabb934bfe8d7c57186569108d012b
2002-08-04  Roland McGrath  <roland@redhat.com>

* sysdeps/generic/dl-tls.c (_dl_allocate_tls_storage): New function,
split out of _dl_allocate_tls.
(_dl_allocate_tls_init): Likewise.
(_dl_allocate_tls): Call those.
* sysdeps/generic/ldsodefs.h: Declare them with attribute_hidden.
* elf/rtld.c (dl_main): Call them separately instead of calling
_dl_allocate_tls.  Delay _dl_allocate_tls_init until after relocation
is finished, so that the initializer data has been relocated before we
copy it into the main thread's TLS block.
* sysdeps/generic/dl-tls.c (_dl_allocate_tls): Fix off-by-one error in
loop conditions, prevented the last used module from being initialized.
sysdeps/generic/dl-tls.c