mirror of
https://github.com/mirror/tinycc.git
synced 2025-02-06 06:40:07 +08:00
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
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 New Issue
Block a user