diff options
Diffstat (limited to 'elf/unload8mod3.c')
-rw-r--r-- | elf/unload8mod3.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/elf/unload8mod3.c b/elf/unload8mod3.c new file mode 100644 index 0000000000..d49e22b24c --- /dev/null +++ b/elf/unload8mod3.c @@ -0,0 +1,27 @@ +#include <dlfcn.h> +#include <stdio.h> +#include <stdlib.h> + +void +mod3_fini2 (void) +{ +} + +void +mod3_fini (void) +{ + mod3_fini2 (); +} + +void +mod3 (void) +{ + void *h = dlopen ("$ORIGIN/unload8mod2.so", RTLD_LAZY); + if (h == NULL) + { + puts ("dlopen unload8mod2.so failed"); + exit (1); + } + + atexit (mod3_fini); +} |