summaryrefslogtreecommitdiff
path: root/src/ldso
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2013-01-23 20:21:36 -0500
committerRich Felker <dalias@aerifal.cx>2013-01-23 20:21:36 -0500
commit637dd2d383cc1f63bf02a732f03786857b22c7bd (patch)
treebc094cac204cb8c195d6152a830c87f42ac016c8 /src/ldso
parent41d7c77d6a2e74294807d35062e4cd1d48ab72d3 (diff)
downloadmusl-637dd2d383cc1f63bf02a732f03786857b22c7bd.tar.gz
musl-637dd2d383cc1f63bf02a732f03786857b22c7bd.tar.bz2
musl-637dd2d383cc1f63bf02a732f03786857b22c7bd.tar.xz
musl-637dd2d383cc1f63bf02a732f03786857b22c7bd.zip
fix regression in dlsym: rejection of special RTLD_* handles as invalid
Diffstat (limited to 'src/ldso')
-rw-r--r--src/ldso/dynlink.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ldso/dynlink.c b/src/ldso/dynlink.c
index 6956f414..e73806cd 100644
--- a/src/ldso/dynlink.c
+++ b/src/ldso/dynlink.c
@@ -1119,7 +1119,8 @@ static void *do_dlsym(struct dso *p, const char *s, void *ra)
return __tls_get_addr((size_t []){def.dso->tls_id, def.sym->st_value});
return def.dso->base + def.sym->st_value;
}
- if (invalid_dso_handle(p)) return 0;
+ if (p != RTLD_DEFAULT && p != RTLD_NEXT && invalid_dso_handle(p))
+ return 0;
if (p->ghashtab) {
gh = gnu_hash(s);
sym = gnu_lookup(s, gh, p);