aboutsummaryrefslogtreecommitdiff
path: root/include/link.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2008-01-17 20:20:00 +0000
committerUlrich Drepper <drepper@redhat.com>2008-01-17 20:20:00 +0000
commit4c533566c2bb94162bcc1f66c5cf9db609e20803 (patch)
treeeb3d31e6a55056dc285e43b4700dccded4b88771 /include/link.h
parenta0f6c236e068b4fa2d1116cdf7d31b2c2722ab6c (diff)
downloadglibc-4c533566c2bb94162bcc1f66c5cf9db609e20803.zip
glibc-4c533566c2bb94162bcc1f66c5cf9db609e20803.tar.gz
glibc-4c533566c2bb94162bcc1f66c5cf9db609e20803.tar.bz2
* 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.
Diffstat (limited to 'include/link.h')
-rw-r--r--include/link.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/link.h b/include/link.h
index 16980ef..4b9978a 100644
--- a/include/link.h
+++ b/include/link.h
@@ -279,6 +279,15 @@ struct link_map
#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;
/* Index of the module in the dtv array. */