about summary refs log tree commit diff
path: root/sysdeps/powerpc/mod-tlsopt-powerpc.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/powerpc/mod-tlsopt-powerpc.c')
-rw-r--r--sysdeps/powerpc/mod-tlsopt-powerpc.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sysdeps/powerpc/mod-tlsopt-powerpc.c b/sysdeps/powerpc/mod-tlsopt-powerpc.c
index 51cc502f28..d941024963 100644
--- a/sysdeps/powerpc/mod-tlsopt-powerpc.c
+++ b/sysdeps/powerpc/mod-tlsopt-powerpc.c
@@ -1,11 +1,9 @@
 /* shared library to test for __tls_get_addr optimization.  */
 #include <stdio.h>
 
-#include "../../elf/tls-macros.h"
 #include "dl-tls.h"
 
-/* common 'int' variable in TLS.  */
-COMMON_INT_DEF(foo);
+__thread int foo __attribute__ ((tls_model("global-dynamic")));
 
 
 int
@@ -14,7 +12,7 @@ tls_get_addr_opt_test (void)
   int result = 0;
 
   /* Get variable using general dynamic model.  */
-  int *ap = TLS_GD (foo);
+  int *ap = &foo;
   if (*ap != 0)
     {
       printf ("foo = %d\n", *ap);