remove redundant code in do_dlsym function

commit 637dd2d383 introduced the checks
for RTLD_DEFAULT and RTLD_NEXT here, claiming they fixed a regression,
but the above conditional block clearly already covered these cases,
and removing the checks produces no difference in the generated code.
This commit is contained in:
Rich Felker 2015-04-21 13:07:06 -04:00
parent 4bf10ebf66
commit 97b72d22ad
1 changed files with 1 additions and 1 deletions

View File

@ -1500,7 +1500,7 @@ 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 (p != RTLD_DEFAULT && p != RTLD_NEXT && invalid_dso_handle(p))
if (invalid_dso_handle(p))
return 0;
if (p->ghashtab) {
gh = gnu_hash(s);