2002-08-04 Roland McGrath <roland@redhat.com>
authorRoland McGrath <roland@gnu.org>
Mon, 5 Aug 2002 01:20:52 +0000 (01:20 +0000)
committerRoland McGrath <roland@gnu.org>
Mon, 5 Aug 2002 01:20:52 +0000 (01:20 +0000)
commit581dc54b74e8131acbb06f7ebb8887815f1914c8
tree9ae79006a5e1f1ae1714d928ebbae4545b3d45ac
parent855efb5f6ff9bef07b6faee4294e65517c5f7866
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