]> git.saurik.com Git - apple/ld64.git/blob - unit-tests/test-cases/unstrippable-symbols/foo.c
ld64-123.2.tar.gz
[apple/ld64.git] / unit-tests / test-cases / unstrippable-symbols / foo.c
1 #include <stddef.h>
2
3 int keep_global = 1;
4 asm(".desc _keep_global, 0x10");
5
6 __attribute__((visibility("hidden"))) int keep_hidden = 1;
7 asm(".desc _keep_hidden, 0x10");
8
9 static int keep_static = 1;
10 asm(".desc _keep_static, 0x10");
11
12
13 int lose_global = 1;
14
15 __attribute__((visibility("hidden"))) int lose_hidden = 1;
16
17 static int lose_static = 1;
18
19
20
21 int get()
22 {
23 return keep_global + keep_hidden + keep_static + lose_global + lose_hidden + lose_static;
24 }