glibc/elf/reldepmod3.c
Andreas Jaeger 5c80f57cfc Update.
* elf/neededobj1.c: Likewise.
	* elf/neededobj2.c: Likewise.
	* elf/neededobj3.c: Likewise.
	* elf/neededobj4.c: Likewise.
	* elf/nextmod1.c: Likewise.
	* elf/nextmod2.c: Likewise.
2000-12-17 17:50:56 +00:00

21 lines
313 B
C

#include <dlfcn.h>
#include <stdio.h>
#include <stdlib.h>
extern int call_me (void);
int
call_me (void)
{
int (*fp) (void);
fp = dlsym (RTLD_DEFAULT, "foo");
if (fp == NULL)
{
printf ("cannot get address of foo in global scope: %s\n", dlerror ());
exit (1);
}
return fp () - 42;
}