| 1 | #include <dlfcn.h> |
|---|---|
| 2 | #include <stdio.h> |
| 3 | |
| 4 | int |
| 5 | foo (int i) |
| 6 | { |
| 7 | void *h = dlopen (file: "unload6mod2.so", RTLD_LAZY); |
| 8 | if (h == NULL) |
| 9 | { |
| 10 | puts (s: "dlopen unload6mod2.so failed"); |
| 11 | return 1; |
| 12 | } |
| 13 | |
| 14 | dlclose (handle: h); |
| 15 | return i + 8; |
| 16 | } |
| 17 |
