1/* This is for tst-tlsalign-extern.c, which see. It's essential for the
2 purpose of the test that these definitions be in a separate translation
3 unit from the code using the variables. */
4
5__thread int tdata1 = 1;
6__thread int tdata2 __attribute__ ((aligned (0x10))) = 2;
7__thread int tdata3 __attribute__ ((aligned (0x1000))) = 4;
8__thread int tbss1;
9__thread int tbss2 __attribute__ ((aligned (0x10)));
10__thread int tbss3 __attribute__ ((aligned (0x1000)));
11
12/* This function is never called. But its presence in this translation
13 unit makes GCC emit the variables above in the order defined (perhaps
14 because it's the order in which they're used here?) rather than
15 reordering them into descending order of alignment requirement--and so
16 keeps it more similar to the tst-tlsalign-static.c case--just in case
17 that affects the bug (though there is no evidence that it does). */
18
19void
20unused (void)
21{
22 tdata1 = -1;
23 tdata2 = -2;
24 tdata3 = -3;
25 tbss1 = -4;
26 tbss2 = -5;
27 tbss3 = -6;
28}
29

source code of glibc/elf/tst-tlsalign-vars.c