1 /* glibc test for TLS in ld.so. */
8 # include "tls-macros.h"
11 /* Two common 'int' variables in TLS. */
17 #define TEST_FUNCTION do_test ()
26 /* Set the variable using the local exec model. */
27 puts ("set bar to 1 (LE)");
32 /* Get variables using initial exec model. */
33 fputs ("get sum of foo and bar (IE)", stdout
);
36 printf (" = %d\n", *ap
+ *bp
);
37 result
|= *ap
+ *bp
!= 1;
40 printf ("foo = %d\n", *ap
);
45 printf ("bar = %d\n", *bp
);
50 /* Get variables using local dynamic model. */
51 fputs ("get sum of foo and bar (LD)", stdout
);
54 printf (" = %d\n", *ap
+ *bp
);
55 result
|= *ap
+ *bp
!= 1;
58 printf ("foo = %d\n", *ap
);
63 printf ("bar = %d\n", *bp
);
68 /* Get variables using generic dynamic model. */
69 fputs ("get sum of foo and bar (GD)", stdout
);
72 printf (" = %d\n", *ap
+ *bp
);
73 result
|= *ap
+ *bp
!= 1;
76 printf ("foo = %d\n", *ap
);
81 printf ("bar = %d\n", *bp
);
92 #include "../test-skeleton.c"