提交 e01ac675 编写于 作者: R Rich Felker

when resolving symbols with only weak defs, use first def, not last def

上级 dd92a09e
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册