1 /* glibc test for TLS in ld.so. */
4 #include "tls-macros.h"
7 /* One define int variable, two externs. */
13 extern int in_dso (void);
23 /* Set the variable using the local exec model. */
24 puts ("set baz to 3 (LE)");
29 /* Get variables using initial exec model. */
30 puts ("set variables foo and bar (IE)");
37 /* Get variables using local dynamic model. */
38 fputs ("get sum of foo, bar (GD) and baz (LD)", stdout
);
42 printf (" = %d\n", *ap
+ *bp
+ *cp
);
43 result
|= *ap
+ *bp
+ *cp
!= 6;
46 printf ("foo = %d\n", *ap
);
51 printf ("bar = %d\n", *bp
);
56 printf ("baz = %d\n", *cp
);
67 #include <support/test-driver.c>