Commit | Line | Data |
---|---|---|
823143c6 L |
1 | #define _GNU_SOURCE |
2 | #include <dlfcn.h> | |
3 | #include <stdio.h> | |
4 | ||
5 | extern int __start___verbose[]; | |
6 | int bar (void) | |
7 | { | |
8 | static int my_var __attribute__ ((section("__verbose"), used)) = 6; | |
9 | int *ptr; | |
10 | ptr = (int*) dlsym (RTLD_DEFAULT, "__start___verbose"); | |
11 | if (ptr != NULL || __start___verbose[0] != 6) | |
12 | return -1; | |
13 | return 0; | |
14 | } | |
15 | ||
16 | int | |
17 | main () | |
18 | { | |
19 | if (bar () == 0) | |
20 | printf ("PASS\n"); | |
21 | return 0; | |
22 | } |