repo.or.cz
/
libc-test.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
add test for strftime
[libc-test.git]
/
src
/
functional
/
tls_align_dso.c
blob
9ca759e2577b4d4694734cc8b087f2d8dd6fcfaa
1
__thread
char
c1
=
1
;
2
__thread
char
xchar
=
2
;
3
__thread
char
c2
=
3
;
4
__thread
short
xshort
=
4
;
5
__thread
char
c3
=
5
;
6
__thread
int
xint
=
6
;
7
__thread
char
c4
=
7
;
8
__thread
long long
xllong
=
8
;
9
10
struct
{
11
char
*
name
;
12
unsigned
size
;
13
unsigned
align
;
14
unsigned long
addr
;
15
}
t
[
4
];
16
17
#define entry(i,x) \
18
t[i].name = #x; \
19
t[i].size = sizeof x; \
20
t[i].align = __alignof__(x); \
21
t[i].addr = (unsigned long)&x;
22
23
__attribute__
((
constructor
))
static void
init
(
void
)
24
{
25
entry
(
0
,
xchar
)
26
entry
(
1
,
xshort
)
27
entry
(
2
,
xint
)
28
entry
(
3
,
xllong
)
29
}
30