This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: TLS on windows
- From: Ross Ridge <rridge at csclub dot uwaterloo dot ca>
- To: gcc at gcc dot gnu dot org
- Date: Thu, 08 Jun 2006 19:05:38 -0400
- Subject: Re: TLS on windows
Ross Ridge wrote:
> Actually, the last one I haven't done yet. I've just been using a linker
> script to do that, but it should be in a library so the TLS directory
> entry isn't created if the executable doesn't use TLS.
Richard Henderson wrote:
> You can also create this in the linker, without a library.
> Not too difficult, since you've got to do that to set the
> bit in the PE header anyway.
Fortunately, the linker already supports setting the TLS directory entry
in the PE header if a symbol named "__tls_used" exists. Section relative
relocations are also already supported (for DWARF, I think), I just
needed to add the syntax to gas.
Ross Ridge