mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-08 17:42:12 +03:00
2.5-18.1
This commit is contained in:
23
elf/unload6mod2.c
Normal file
23
elf/unload6mod2.c
Normal file
@@ -0,0 +1,23 @@
|
||||
#include <dlfcn.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
static void *h;
|
||||
|
||||
static void __attribute__((constructor))
|
||||
mod2init (void)
|
||||
{
|
||||
h = dlopen ("unload6mod3.so", RTLD_LAZY);
|
||||
if (h == NULL)
|
||||
{
|
||||
puts ("dlopen unload6mod3.so failed");
|
||||
fflush (stdout);
|
||||
_exit (1);
|
||||
}
|
||||
}
|
||||
|
||||
static void __attribute__((destructor))
|
||||
mod2fini (void)
|
||||
{
|
||||
dlclose (h);
|
||||
}
|
Reference in New Issue
Block a user