weak function symbols

This commit is contained in:
Manuel Simoni
2010-02-27 17:37:59 +01:00
parent d63ec6f20d
commit 95b9a477b6
6 changed files with 32 additions and 3 deletions

View File

@ -424,8 +424,12 @@ ST_FUNC void put_extern_sym2(Sym *sym, Section *section,
if (sym->type.t & VT_STATIC)
sym_bind = STB_LOCAL;
else
sym_bind = STB_GLOBAL;
else {
if (FUNC_WEAK(sym->type.ref->r))
sym_bind = STB_WEAK;
else
sym_bind = STB_GLOBAL;
}
if (!sym->c) {
name = get_tok_str(sym->v, NULL);