]> granicus.if.org Git - musl/commitdiff
fix bug dlsym bug that slipped in during dynamic linker cleanup
authorRich Felker <dalias@aerifal.cx>
Tue, 7 Aug 2012 23:10:51 +0000 (19:10 -0400)
committerRich Felker <dalias@aerifal.cx>
Tue, 7 Aug 2012 23:10:51 +0000 (19:10 -0400)
src/ldso/dynlink.c

index 31ef68474b339da9e018f76750755da4ddb1193d..f55c6f104c0a55de65ddad3318281d922904926b 100644 (file)
@@ -803,7 +803,7 @@ static void *do_dlsym(struct dso *p, const char *s, void *ra)
        if (sym && sym->st_value && (1<<(sym->st_info&0xf) & OK_TYPES))
                return p->base + sym->st_value;
        if (p->deps) for (i=0; p->deps[i]; i++) {
-               sym = lookup(s, h, p);
+               sym = lookup(s, h, p->deps[i]);
                if (sym && sym->st_value && (1<<(sym->st_info&0xf) & OK_TYPES))
                        return p->deps[i]->base + sym->st_value;
        }