]>
Commit | Line | Data |
---|---|---|
d26dfc60 MG |
1 | // BZ 12453 |
2 | #include <stdio.h> | |
3 | #include <dlfcn.h> | |
4 | ||
5 | ||
6 | static int | |
7 | do_test (void) | |
8 | { | |
9 | void* dl = dlopen ("tst-tls19mod1.so", RTLD_LAZY | RTLD_GLOBAL); | |
10 | if (dl == NULL) | |
11 | { | |
12 | printf ("Error loading tst-tls19mod1.so: %s\n", dlerror ()); | |
13 | return 1; | |
14 | } | |
15 | ||
16 | int (*fn) (void) = dlsym (dl, "foo"); | |
17 | if (fn == NULL) | |
18 | { | |
19 | printf("Error obtaining symbol foo\n"); | |
20 | return 1; | |
21 | } | |
22 | ||
23 | return fn (); | |
24 | } | |
25 | ||
36fe25fd | 26 | #include <support/test-driver.c> |