diff options
author | Roland McGrath <roland@gnu.org> | 2002-08-05 18:56:03 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2002-08-05 18:56:03 +0000 |
commit | 08da062122aef3020fd4bf258984102d38bfc12d (patch) | |
tree | 328d6483bf27978d2eb8331199f8f2803b156bd4 /elf | |
parent | 1614dd9fe02b2ed6ada1f2879cc917934949cc62 (diff) | |
download | glibc-08da062122aef3020fd4bf258984102d38bfc12d.zip glibc-08da062122aef3020fd4bf258984102d38bfc12d.tar.gz glibc-08da062122aef3020fd4bf258984102d38bfc12d.tar.bz2 |
2002-08-05 Roland McGrath <roland@redhat.com>
* sysdeps/generic/ldsodefs.h (struct rtld_global): Replace member
`bool _dl_initial_dtv_malloced' with `void *_dl_initial_dtv'.
* elf/rtld.c (dl_main): Set it to the new dtv for the main thread.
* sysdeps/generic/dl-tls.c (__tls_get_addr): When reallocating the
dtv, check if it matches _dl_initial_dtv; if so, malloc and copy the
old data, abandoning the original memory allocated by rtld at startup,
instead of calling realloc normally.
Diffstat (limited to 'elf')
-rw-r--r-- | elf/rtld.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1091,6 +1091,10 @@ of this helper program; chances are you did not intend to run this program.\n\ if (tcbp == NULL) _dl_fatal_printf ("\ cannot allocate TLS data structures for initial thread"); + + /* Store for detection of the special case by __tls_get_addr + so it knows not to pass this dtv to the normal realloc. */ + _dl_initial_dtv = GET_DTV (tcbp); } #endif |