1 /* glibc test for TLS in ld.so. */
6 #include "tls-macros.h"
9 /* Two 'int' variables in TLS. */
14 #define TEST_FUNCTION do_test ()
22 /* Set the variable using the local exec model. */
23 puts ("set bar to 1 (LE)");
28 /* Get variables using initial exec model. */
29 fputs ("get sum of foo and bar (IE)", stdout
);
32 printf (" = %d\n", *ap
+ *bp
);
33 result
|= *ap
+ *bp
!= 1;
36 printf ("foo = %d\n", *ap
);
41 printf ("bar = %d\n", *bp
);
46 /* Get variables using local dynamic model. */
47 fputs ("get sum of foo and bar (LD)", stdout
);
50 printf (" = %d\n", *ap
+ *bp
);
51 result
|= *ap
+ *bp
!= 1;
54 printf ("foo = %d\n", *ap
);
59 printf ("bar = %d\n", *bp
);
64 /* Get variables using generic dynamic model. */
65 fputs ("get sum of foo and bar (GD)", stdout
);
68 printf (" = %d\n", *ap
+ *bp
);
69 result
|= *ap
+ *bp
!= 1;
72 printf ("foo = %d\n", *ap
);
77 printf ("bar = %d\n", *bp
);
85 #include "../test-skeleton.c"