Skip to content
Permalink
ff5fad1641
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
25 lines (20 sloc) 378 Bytes
#include <dlfcn.h>
static const char obj[] = "testobj1.so";
int
main (void)
{
void *d = dlopen (obj, RTLD_LAZY);
int n;
if (d == NULL)
{
printf ("cannot load %s: %s\n", obj, dlerror ());
return 1;
}
for (n = 0; n < 10000; ++n)
if (dlsym (d, "does not exist") != NULL)
{
puts ("dlsym() did not fail");
return 1;
}
return 0;
}