12 test_in_mod1 (void *mainp
)
18 /* Find function `main'. */
19 p
= dlsym (RTLD_DEFAULT
, "main");
22 printf ("%s: main not found\n", __FILE__
);
27 printf ("%s: wrong address returned for main\n", __FILE__
);
31 printf ("%s: main correctly found\n", __FILE__
);
33 ifp
= dlsym (RTLD_DEFAULT
, "found_in_mod1");
34 if ((void *) ifp
== NULL
)
36 printf ("%s: found_in_mod1 not found\n", __FILE__
);
41 printf ("%s: wrong address returned for found_in_mod1\n", __FILE__
);
45 printf ("%s: found_in_mod1 correctly found\n", __FILE__
);
47 ifp
= dlsym (RTLD_DEFAULT
, "found_in_mod2");
48 if ((void *) ifp
== NULL
)
50 printf ("%s: found_in_mod2 not found\n", __FILE__
);
55 printf ("%s: wrong address returned for found_in_mod2\n", __FILE__
);
59 printf ("%s: found_in_mod2 correctly found\n", __FILE__
);