mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-26 20:51:11 +00:00
24 lines
371 B
C
24 lines
371 B
C
|
#include <dlfcn.h>
|
||
|
#include <stdio.h>
|
||
|
#include <unistd.h>
|
||
|
|
||
|
static void *h;
|
||
|
|
||
|
static void __attribute__((constructor))
|
||
|
mod3init (void)
|
||
|
{
|
||
|
h = dlopen ("unload6mod1.so", RTLD_LAZY);
|
||
|
if (h == NULL)
|
||
|
{
|
||
|
puts ("dlopen unload6mod1.so failed");
|
||
|
fflush (stdout);
|
||
|
_exit (1);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
static void __attribute__((destructor))
|
||
|
mod3fini (void)
|
||
|
{
|
||
|
dlclose (h);
|
||
|
}
|