This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [PATCH] Use STT_TLS for all TLS symbols (even SHN_UNDEF)
On Tue, Nov 19, 2002 at 09:47:51AM +0900, kaz Kojima wrote:
> Jakub Jelinek <jakub@redhat.com> wrote:
> > I think all the undefined symbols mentioned in TLS relocations should
> > have STT_TLS type, so that ld.so can easily detect attempts to resolve
> > TLS undef symbol to non-TLS symbol or vice versa (instead of having to
> > track which relocation was used and if it is TLS reloc or not).
> > Seems like this is what Sun assembler/linker does too.
> > If you agree with this, I'll change IA-64/Alpha too (and hope Kaz will
> > change SH).
>
> With this change, my new gas for x86 complains like
>
> /tmp/ccgvoVqe.s:180: Error: Accessing `foo' as thread-local object
> /tmp/ccgvoVqe.s:180: Error: Accessing `foo' as thread-local object
>
> when compiling libc/elf/tst-tlsmod1.c with enabling tls. Doesn't
> it happen to you?
Have you changed SH gas to call SET_THREAD_LOCAL on all the symbols used
by TLS relocations?
Jakub