]>
Commit | Line | Data |
---|---|---|
55e3d2f6 A |
1 | |
2 | extern void foo1(); | |
3 | extern void foo2(); | |
4 | extern void bar1(); | |
5 | extern void bar2(); | |
6 | ||
7 | extern int foo_data1; | |
8 | extern int foo_data2; | |
9 | extern int bar_data1; | |
10 | extern int bar_data2; | |
11 | ||
12 | ||
13 | ||
14 | // make external relocation to foo_data1 and bar_data1 | |
15 | int* pfoo = &foo_data1; | |
16 | int* pbar = &bar_data1; | |
17 | ||
a645023d A |
18 | void* pfoo1; |
19 | void* pbar1; | |
55e3d2f6 A |
20 | |
21 | int main (void) | |
22 | { | |
23 | // make non-lazy reference to foo1 and bar1 | |
a645023d A |
24 | pfoo1 = &foo1; |
25 | pbar1 = &bar1; | |
26 | ||
27 | // make lazy reference to foo2 and bar2 | |
28 | foo2(); | |
29 | bar2(); | |
55e3d2f6 A |
30 | |
31 | // make non-lazy reference to foo_data2 and bar_data2 | |
32 | return *pfoo + *pbar + foo_data2 + bar_data2; | |
33 | } | |
34 |