Fix/hack for Linux variants that don't define _dl_loaded.

This commit is contained in:
briano%netscape.com 1999-06-14 20:52:39 +00:00
Родитель d88937e313
Коммит b484471054
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -1126,6 +1126,7 @@ case "$target" in
#include <stdio.h>
#include <link.h>
#include <dlfcn.h>
#ifdef _dl_loaded
void __dump_link_map(void) {
struct link_map *map = _dl_loaded;
while (NULL != map) {printf("0x%08x %s\n", map->l_addr, map->l_name); map = map->l_next;}
@ -1137,6 +1138,10 @@ int main() {
dlopen("/tmp/../tmp/conftest1.so",RTLD_LAZY);
__dump_link_map();
}
#else
/* _dl_loaded isn't defined, so this should be either a libc5 (glibc1) system, or a glibc2 system that doesn't have the multiple load bug (i.e., RH6.0).*/
int main() { printf("./conftest1.so\n"); }
#endif
EOF
cat >> conftest1.C <<\EOF