[PATCH] Use STT_TLS for all TLS symbols (even SHN_UNDEF)

kaz Kojima kkojima@rr.iij4u.or.jp
Mon Nov 18 17:12:00 GMT 2002


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?

Regards,
	kaz



More information about the Binutils mailing list