X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fldso%2Fdynlink.c;h=7a26e9ed7ba21c6645860ac747138e999d39d2e9;hb=8aeee8db21858becb45a8e9f6b5bc23109638bcb;hp=6c4abbfe4f601f2188db3d64c0f8745fd642992d;hpb=427173b9325d604d30650c16f1774942130aec52;p=musl diff --git a/src/ldso/dynlink.c b/src/ldso/dynlink.c index 6c4abbfe..7a26e9ed 100644 --- a/src/ldso/dynlink.c +++ b/src/ldso/dynlink.c @@ -107,6 +107,7 @@ static void *find_sym(struct dso *dso, const char *s, int need_def) if (sym && (!need_def || sym->st_shndx) && sym->st_value && (1<<(sym->st_info&0xf) & OK_TYPES) && (1<<(sym->st_info>>4) & OK_BINDS)) { + if (def && sym->st_info>>4 == STB_WEAK) continue; def = dso->base + sym->st_value; if (sym->st_info>>4 == STB_GLOBAL) break; }