| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-require-effective-target fpic } */ |
| 3 |
/* { dg-options "-fpic" } */ |
| 4 |
|
| 5 |
struct link_map |
| 6 |
{ |
| 7 |
struct link_map *l_next; |
| 8 |
}; |
| 9 |
struct rtld_global |
| 10 |
{ |
| 11 |
struct link_map *_ns_loaded; |
| 12 |
char buf[4096]; |
| 13 |
struct link_map _dl_rtld_map; |
| 14 |
}; |
| 15 |
extern struct rtld_global _rtld_global; |
| 16 |
static int _dlfo_main __attribute__ ((section (".data.rel.ro"), used)); |
| 17 |
void |
| 18 |
_dlfo_process_initial (int ns) |
| 19 |
{ |
| 20 |
for (struct link_map *l = _rtld_global._ns_loaded; l != ((void *)0); |
| 21 |
l = l->l_next) |
| 22 |
if (l == &_rtld_global._dl_rtld_map) |
| 23 |
asm (""); |
| 24 |
} |