diff options
Diffstat (limited to 'elf/tst-tlsmod13.c')
-rw-r--r-- | elf/tst-tlsmod13.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/elf/tst-tlsmod13.c b/elf/tst-tlsmod13.c new file mode 100644 index 0000000000..beca89f6fe --- /dev/null +++ b/elf/tst-tlsmod13.c @@ -0,0 +1,14 @@ +#include <tls.h> + +#if defined USE_TLS && defined HAVE___THREAD \ + && defined HAVE_TLS_MODEL_ATTRIBUTE +__thread int a[2] __attribute__ ((tls_model ("initial-exec"))); +#else +int a[2]; +#endif + +int +foo (void) +{ + return a[0]; +} |