Skip to content
Permalink
bfc832ccf1
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
23 lines (20 sloc) 371 Bytes
#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);
}