mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-01-30 16:41:05 +08:00
Flag thread local symbols in symbol table
Set STT_TLS in symbol table for symbols declared in thread local storage sections. Note that, for now at least, such symbols must also be declared as GLOBAL.
This commit is contained in:
parent
4adf21c08c
commit
efb515b98e
@ -772,6 +772,14 @@ static void elf_deflabel(char *name, int32_t segment, int64_t offset,
|
||||
}
|
||||
special_used = true;
|
||||
}
|
||||
/*
|
||||
* If TLS segment, mark symbol accordingly.
|
||||
*/
|
||||
if (sects[sym->section - 1]->flags & SHF_TLS) {
|
||||
error(ERR_DEBUG, "marked %s as TLS",name);
|
||||
sym->type &= 0xf0;
|
||||
sym->type |= STT_TLS;
|
||||
}
|
||||
}
|
||||
sym->globnum = nglobs;
|
||||
nglobs++;
|
||||
|
Loading…
Reference in New Issue
Block a user