diff options
author | Jakub Jelinek <jakub@redhat.com> | 2002-11-28 14:15:55 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2002-11-28 14:15:55 +0000 |
commit | 00f7efb6ccc0e31cece4ef606c7e796b4605a26d (patch) | |
tree | 9e4d578ba06f3185b6991a89ee424937242836aa /gas/symbols.c | |
parent | 381a1ab30c060addb84bcd45ae1fbe1abd8c8f4d (diff) | |
download | gdb-00f7efb6ccc0e31cece4ef606c7e796b4605a26d.zip gdb-00f7efb6ccc0e31cece4ef606c7e796b4605a26d.tar.gz gdb-00f7efb6ccc0e31cece4ef606c7e796b4605a26d.tar.bz2 |
* symbols.c (S_SET_THREAD_LOCAL): New function.
* symbols.h (S_SET_THREAD_LOCAL): New prototype.
* config/tc-i386.c (md_apply_fix3): Call S_SET_THREAD_LOCAL
for TLS relocations.
* config/tc-ia64.c (md_apply_fix3): Likewise.
* config/tc-alpha.c (md_apply_fix3): Likewise.
* ld-i386/tlsnopic.rd: Change NOTYPE to TLS for UND sg* symbols.
Diffstat (limited to 'gas/symbols.c')
-rw-r--r-- | gas/symbols.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gas/symbols.c b/gas/symbols.c index feed359..ccad71b 100644 --- a/gas/symbols.c +++ b/gas/symbols.c @@ -1951,6 +1951,25 @@ S_SET_WEAK (s) } void +S_SET_THREAD_LOCAL (s) + symbolS *s; +{ + if (LOCAL_SYMBOL_CHECK (s)) + s = local_symbol_convert ((struct local_symbol *) s); + if (bfd_is_com_section (s->bsym->section) + && (s->bsym->flags & BSF_THREAD_LOCAL) != 0) + return; + s->bsym->flags |= BSF_THREAD_LOCAL; + if ((s->bsym->flags & BSF_FUNCTION) != 0) + as_bad (_("Accessing function `%s' as thread-local object"), + S_GET_NAME (s)); + else if (! bfd_is_und_section (s->bsym->section) + && (s->bsym->section->flags & SEC_THREAD_LOCAL) == 0) + as_bad (_("Accessing `%s' as thread-local object"), + S_GET_NAME (s)); +} + +void S_SET_NAME (s, name) symbolS *s; char *name; |