]>
Commit | Line | Data |
---|---|---|
b1f7435d A |
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 |