diff --git a/src/ldso/dynlink.c b/src/ldso/dynlink.c index 93cfb429c76f9f45d271afda2e980d0e42083e62..33ef7e55f05b1dc2dbce05d15f071039cde712b7 100644 --- a/src/ldso/dynlink.c +++ b/src/ldso/dynlink.c @@ -533,7 +533,7 @@ static struct dso *load_library(const char *name) /* Add a shortname only if name arg was not an explicit pathname. */ if (pathname != name) p->shortname = strrchr(p->name, '/')+1; if (p->tls_image) { - if (!__pthread_self_init()) { + if (runtime && !__pthread_self_init()) { free(p); munmap(map, map_len); return 0;