1 /* glibc test for TLS in ld.so. */
7 # include "tls-macros.h"
10 /* Two 'int' variables in TLS. */
16 #define TEST_FUNCTION do_test ()
25 /* Set the variable using the local exec model. */
26 puts ("set bar to 1 (LE)");
31 /* Get variables using initial exec model. */
32 fputs ("get sum of foo and bar (IE)", stdout
);
35 printf (" = %d\n", *ap
+ *bp
);
36 result
|= *ap
+ *bp
!= 1;
39 printf ("foo = %d\n", *ap
);
44 printf ("bar = %d\n", *bp
);
49 /* Get variables using local dynamic model. */
50 fputs ("get sum of foo and bar (LD)", stdout
);
53 printf (" = %d\n", *ap
+ *bp
);
54 result
|= *ap
+ *bp
!= 1;
57 printf ("foo = %d\n", *ap
);
62 printf ("bar = %d\n", *bp
);
67 /* Get variables using generic dynamic model. */
68 fputs ("get sum of foo and bar (GD)", stdout
);
71 printf (" = %d\n", *ap
+ *bp
);
72 result
|= *ap
+ *bp
!= 1;
75 printf ("foo = %d\n", *ap
);
80 printf ("bar = %d\n", *bp
);
91 #include "../test-skeleton.c"