]> git.saurik.com Git - apple/ld64.git/blob - unit-tests/test-cases/lto-r/foo.c
ld64-241.9.tar.gz
[apple/ld64.git] / unit-tests / test-cases / lto-r / foo.c
1 static int var_static = 3;
2
3 __attribute__((visibility("hidden")))
4 int var_hidden = 4;
5
6 int var_global = 5;
7
8
9 __attribute__((visibility("hidden"), weak))
10 int var_weak_hidden = 4;
11
12 __attribute__((weak))
13 int var_weak_global = 5;
14
15
16
17
18 static int* foo_static() { return &var_static; }
19
20 __attribute__((visibility("hidden")))
21 int* foo_hidden() { return &var_hidden; }
22
23
24 int* foo_global() { return &var_global; }
25
26
27 __attribute__((visibility("hidden"),weak))
28 int* foo_weak_hidden() { return &var_weak_hidden; }
29
30
31 __attribute__((weak))
32 int* foo_weak_global() { return &var_weak_global; }
33
34
35 __attribute__((visibility("hidden")))
36 void* keep[] = { &foo_static };
37
38