]> git.saurik.com Git - apple/ld64.git/blame - ld64-134.9/unit-tests/test-cases/dead_strip-archive-weak-override/main.c
ld64-134.9.tar.gz
[apple/ld64.git] / ld64-134.9 / unit-tests / test-cases / dead_strip-archive-weak-override / main.c
CommitLineData
b1f7435d
A
1
2extern void loadme();
3
4
5void 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
17int main()
18{
19 foo();
20 loadme();
21 foo();
22 return 0;
23}
24
25