From 4d5105c8f1ff1ac4bae592d6c221e5737614bbad Mon Sep 17 00:00:00 2001 From: Joe Soroka Date: Tue, 1 Feb 2011 00:37:53 -0800 Subject: support weak attribute on variables --- libtcc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libtcc.c') diff --git a/libtcc.c b/libtcc.c index 483670a..58a5ca0 100644 --- a/libtcc.c +++ b/libtcc.c @@ -429,7 +429,7 @@ ST_FUNC void put_extern_sym2(Sym *sym, Section *section, if (sym->type.t & VT_STATIC) sym_bind = STB_LOCAL; else { - if (sym_type == STT_FUNC && sym->type.ref && FUNC_WEAK(sym->type.ref->r)) + if (sym->type.t & VT_WEAK) sym_bind = STB_WEAK; else sym_bind = STB_GLOBAL; -- cgit v1.3.1