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