1#include <dlfcn.h>
2#include <stdio.h>
3
4extern int test (void);
5
6int
7test (void)
8{
9 (void) dlopen (file: "reldepmod4.so", RTLD_LAZY | RTLD_GLOBAL);
10 if (dlsym (RTLD_DEFAULT, name: "call_me") != NULL)
11 {
12 puts (s: "found \"call_me\"");
13 return 0;
14 }
15 puts (s: "didn't find \"call_me\"");
16 return 1;
17}
18

source code of glibc/elf/globalmod1.c