]> git.saurik.com Git - apple/ld64.git/blame - unit-tests/test-cases/lto-live_support_section/foo.c
ld64-351.8.tar.gz
[apple/ld64.git] / unit-tests / test-cases / lto-live_support_section / foo.c
CommitLineData
82b4b32b
A
1
2int my_global = 0;
3
4__attribute__ ((section ("__DATA,__asan_globals,regular")))
5struct { void *ptr; } global_metadata = { .ptr = &my_global };
6
7__attribute__ ((used, section ("__DATA,__asan_liveness,regular,live_support")))
8struct { void *a, *b; } liveness_binder = { .a = &global_metadata, .b = &my_global };
9
10int unused_global = 0;
11
12__attribute__ ((section ("__DATA,__asan_globals,regular")))
13struct { void *ptr; } unused_global_metadata = { .ptr = &unused_global };
14
15__attribute__ ((used, section ("__DATA,__asan_liveness,regular,live_support")))
16struct { void *a, *b; } unused_liveness_binder = { .a = &unused_global_metadata, .b = &unused_global };
17
18
19int main(int argc, char *argv[])
20{
21 return my_global;
22}