mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
* include/link.h (FORCED_DYNAMIC_TLS_OFFSET): Define.
* elf/dl-close.c (_dl_close): Check for it. * elf/dl-reloc.c (CHECK_STATIC_TLS): Likewise. (_dl_allocate_static_tls): Likewise. * elf/dl-tls.c (_dl_allocate_tls_init): Likewise. (__tls_get_addr): Protect from race conditions in setting l_tls_offset to it. * elf/tst-tls16.c: New file. * elf/tst-tlsmod16a.c: New file. * elf/tst-tlsmod16b.c: New file. * elf/Makefile: Add rules to build and run tst-tls16.
This commit is contained in:
@ -531,7 +531,8 @@ _dl_close_worker (struct link_map *map)
|
||||
/* All dynamically loaded modules with TLS are unloaded. */
|
||||
GL(dl_tls_max_dtv_idx) = GL(dl_tls_static_nelem);
|
||||
|
||||
if (imap->l_tls_offset != NO_TLS_OFFSET)
|
||||
if (imap->l_tls_offset != NO_TLS_OFFSET
|
||||
&& imap->l_tls_offset != FORCED_DYNAMIC_TLS_OFFSET)
|
||||
{
|
||||
/* Collect a contiguous chunk built from the objects in
|
||||
this search list, going in either direction. When the
|
||||
|
Reference in New Issue
Block a user