mirror of
https://sourceware.org/git/glibc.git
synced 2025-09-01 05:02:03 +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:
@@ -278,6 +278,15 @@ struct link_map
|
||||
size_t l_tls_firstbyte_offset;
|
||||
#ifndef NO_TLS_OFFSET
|
||||
# define NO_TLS_OFFSET 0
|
||||
#endif
|
||||
#ifndef FORCED_DYNAMIC_TLS_OFFSET
|
||||
# if NO_TLS_OFFSET == 0
|
||||
# define FORCED_DYNAMIC_TLS_OFFSET 1
|
||||
# elif NO_TLS_OFFSET == -1
|
||||
# define FORCED_DYNAMIC_TLS_OFFSET -2
|
||||
# else
|
||||
# error "FORCED_DYNAMIC_TLS_OFFSET is not defined"
|
||||
# endif
|
||||
#endif
|
||||
/* For objects present at startup time: offset in the static TLS block. */
|
||||
ptrdiff_t l_tls_offset;
|
||||
|
Reference in New Issue
Block a user