]> git.saurik.com Git - apple/ld64.git/blob - unit-tests/test-cases/dead_strip-archive-weak-override/main.c
ld64-409.12.tar.gz
[apple/ld64.git] / unit-tests / test-cases / dead_strip-archive-weak-override / main.c
1
2 extern void loadme();
3
4
5 void bad()
6 {
7 }
8
9 // foo is first found be live here
10 // then the use of loadme causes libfoo.a(foo.o)
11 // to be loaded which overrides foo
12 __attribute__((weak)) void foo()
13 {
14 bad();
15 }
16
17 int main()
18 {
19 foo();
20 loadme();
21 foo();
22 return 0;
23 }
24
25