diff options
author | Ulrich Drepper <drepper@redhat.com> | 2008-01-17 20:20:00 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2008-01-17 20:20:00 +0000 |
commit | 4c533566c2bb94162bcc1f66c5cf9db609e20803 (patch) | |
tree | eb3d31e6a55056dc285e43b4700dccded4b88771 /elf/tst-tlsmod16b.c | |
parent | [BZ #5628] (diff) | |
download | glibc-4c533566c2bb94162bcc1f66c5cf9db609e20803.tar.gz glibc-4c533566c2bb94162bcc1f66c5cf9db609e20803.tar.bz2 glibc-4c533566c2bb94162bcc1f66c5cf9db609e20803.zip |
* 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 'elf/tst-tlsmod16b.c')
-rw-r--r-- | elf/tst-tlsmod16b.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/elf/tst-tlsmod16b.c b/elf/tst-tlsmod16b.c new file mode 100644 index 0000000000..308e6bae92 --- /dev/null +++ b/elf/tst-tlsmod16b.c @@ -0,0 +1,13 @@ +#include <tls.h> + +#if defined HAVE___THREAD && defined HAVE_TLS_MODEL_ATTRIBUTE +extern __thread int tlsvar __attribute__((tls_model("initial-exec"))); +#else +extern int tlsvar; +#endif + +void * +in_dso (void) +{ + return &tlsvar; +} |