1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-08 17:42:12 +03:00
* elf/Makefile: Add rules to build and run initfirst test.
	* elf/initfirst.c: New file.
	* elf/firstobj.c: New file.
This commit is contained in:
Ulrich Drepper
2001-02-02 06:54:15 +00:00
parent 5d9167133c
commit b71e7ce864
9 changed files with 233 additions and 5 deletions

22
elf/initfirst.c Normal file
View File

@@ -0,0 +1,22 @@
#include <dlfcn.h>
#include <stdio.h>
int
main (void)
{
void *h = dlopen ("firstobj.so", RTLD_LAZY);
void *f;
if (! h)
{
printf ("cannot find firstobj.so: %s\n", dlerror ());
return 1;
}
f = dlsym (h, "foo");
if (! f)
{
printf ("cannot find symbol foo: %s\n", dlerror ());
return 2;
}
((void (*) (void)) f) ();
return 0;
}