Avoid a crash with weak symbols for "make test"
Patch from the mailing list by Timo VJ Lähde -- By by ... Detlef
This commit is contained in:
parent
d3c432244c
commit
197a6acb30
1 changed files with 1 additions and 1 deletions
2
libtcc.c
2
libtcc.c
|
@ -425,7 +425,7 @@ ST_FUNC void put_extern_sym2(Sym *sym, Section *section,
|
||||||
if (sym->type.t & VT_STATIC)
|
if (sym->type.t & VT_STATIC)
|
||||||
sym_bind = STB_LOCAL;
|
sym_bind = STB_LOCAL;
|
||||||
else {
|
else {
|
||||||
if (FUNC_WEAK(sym->type.ref->r))
|
if (sym->type.ref && FUNC_WEAK(sym->type.ref->r))
|
||||||
sym_bind = STB_WEAK;
|
sym_bind = STB_WEAK;
|
||||||
else
|
else
|
||||||
sym_bind = STB_GLOBAL;
|
sym_bind = STB_GLOBAL;
|
||||||
|
|
Loading…
Reference in a new issue