Avoid a crash with weak symbols for "make test"

Patch from the mailing list by Timo VJ Lähde

--
By by ... Detlef
master
Timo VJ Lähde 2010-04-05 01:08:49 +02:00 committed by Detlef Riekenberg
parent d3c432244c
commit 197a6acb30
1 changed files with 1 additions and 1 deletions

View File

@ -425,7 +425,7 @@ ST_FUNC void put_extern_sym2(Sym *sym, Section *section,
if (sym->type.t & VT_STATIC)
sym_bind = STB_LOCAL;
else {
if (FUNC_WEAK(sym->type.ref->r))
if (sym->type.ref && FUNC_WEAK(sym->type.ref->r))
sym_bind = STB_WEAK;
else
sym_bind = STB_GLOBAL;