1 /* glibc test for TLS in ld.so. */
4 #include "tls-macros.h"
7 /* Two common 'int' variables in TLS. */
19 /* Set the variable using the local exec model. */
20 puts ("set bar to 1 (LE)");
25 /* Get variables using initial exec model. */
26 fputs ("get sum of foo and bar (IE)", stdout);
29 printf (" = %d\n", *ap + *bp);
30 result |= *ap + *bp != 1;
33 printf ("foo = %d\n", *ap);
38 printf ("bar = %d\n", *bp);
43 /* Get variables using local dynamic model. */
44 fputs ("get sum of foo and bar (LD)", stdout);
47 printf (" = %d\n", *ap + *bp);
48 result |= *ap + *bp != 1;
51 printf ("foo = %d\n", *ap);
56 printf ("bar = %d\n", *bp);
61 /* Get variables using generic dynamic model. */
62 fputs ("get sum of foo and bar (GD)", stdout);
65 printf (" = %d\n", *ap + *bp);
66 result |= *ap + *bp != 1;
69 printf ("foo = %d\n", *ap);
74 printf ("bar = %d\n", *bp);
82 #include <support/test-driver.c>