]> git.ipfire.org Git - thirdparty/glibc.git/blame - elf/tst-tlsmod3.c
Add NT_ARM_PACA_KEYS and NT_ARM_PACG_KEYS from Linux 5.1 to elf.h.
[thirdparty/glibc.git] / elf / tst-tlsmod3.c
CommitLineData
fc093be1
UD
1#include <stdio.h>
2
11bf311e 3#include "tls-macros.h"
ebda6173 4
fc093be1
UD
5extern int in_dso (int n, int *caller_foop);
6
7COMMON_INT_DEF(comm_n);
8
9
10
11
12int
13in_dso2 (void)
14{
e6f52680 15 int *foop;
fc093be1
UD
16 int result = 0;
17 static int n;
e6f52680
RM
18 int *np;
19
20 puts ("foo"); /* Make sure PLT is used before macros. */
046b4069 21 asm ("" ::: "memory");
e6f52680
RM
22
23 foop = TLS_GD (foo);
24 np = TLS_GD (comm_n);
fc093be1
UD
25
26 if (n != *np)
27 {
28 printf ("n = %d != comm_n = %d\n", n, *np);
29 result = 1;
30 }
31
32 result |= in_dso (*foop = 42 + n++, foop);
33
34 *foop = 16;
35
36 return result;
37}