x86: Use pad in pthread_unwind_buf to preserve shadow stack register
[glibc.git] / elf / tst-tlsmod14a.c
blob824c06d1f9abae8e827eba47a7e9af47cb9b8cd6
1 #include <stdint.h>
2 #include <stdio.h>
4 #define AL 4096
5 struct foo
7 int i;
8 } __attribute ((aligned (AL)));
10 static __thread struct foo f;
11 static struct foo g;
14 #ifndef FCT
15 # define FCT in_dso1
16 #endif
19 int
20 FCT (void)
22 puts (__func__);
24 int result = 0;
26 int fail = (((uintptr_t) &f) & (AL - 1)) != 0;
27 printf ("&f = %p %s\n", &f, fail ? "FAIL" : "OK");
28 result |= fail;
30 fail = (((uintptr_t) &g) & (AL - 1)) != 0;
31 printf ("&g = %p %s\n", &g, fail ? "FAIL" : "OK");
32 result |= fail;
34 return result;