Add support for thread-local storage variables

This commit is contained in:
Thomas Preud'homme
2013-10-29 22:10:02 +08:00
parent 3b07a15fd1
commit 1c4afd1350
5 changed files with 54 additions and 14 deletions

View File

@ -444,7 +444,10 @@ ST_FUNC void put_extern_sym2(Sym *sym, Section *section,
} else if ((sym->type.t & VT_BTYPE) == VT_VOID) {
sym_type = STT_NOTYPE;
} else {
sym_type = STT_OBJECT;
if (section && section->sh_flags & SHF_TLS)
sym_type = STT_TLS;
else
sym_type = STT_OBJECT;
}
if (sym->type.t & VT_STATIC)