1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-08 17:42:12 +03:00
* elf/Makefile (tests): Add resolvfail.  Add rules to build the
	program.
	* elf/resolvfail.c: New file.
This commit is contained in:
Ulrich Drepper
1999-08-01 21:43:03 +00:00
parent 4f2793d41f
commit ff5fad1641
5 changed files with 48 additions and 1 deletions

25
elf/resolvfail.c Normal file
View File

@@ -0,0 +1,25 @@
#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;
}