1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-08 17:42:12 +03:00
This commit is contained in:
Jakub Jelinek
2007-07-12 18:26:36 +00:00
parent 7d58530341
commit 0ecb606cb6
6215 changed files with 494638 additions and 305010 deletions

30
elf/unload6.c Normal file
View File

@@ -0,0 +1,30 @@
#include <dlfcn.h>
#include <stdio.h>
int
main (void)
{
void *h = dlopen ("unload6mod1.so", RTLD_LAZY);
if (h == NULL)
{
puts ("dlopen unload6mod1.so failed");
return 1;
}
int (*fn) (int);
fn = dlsym (h, "foo");
if (fn == NULL)
{
puts ("dlsym failed");
return 1;
}
int val = fn (16);
if (val != 24)
{
printf ("foo returned %d != 24\n", val);
return 1;
}
return 0;
}