Is D right for me?
Jacob Carlborg
doob at me.com
Fri Oct 15 02:09:05 PDT 2010
On 2010-10-14 23:11, Walter Bright wrote:
> Jacob Carlborg wrote:
>> As I said, the static TLS data is put in the object file like any
>> other data.
>
> No, it isn't. It has to go into segregated sections so it can be
> distinguished from regular static data. Fixup records are different for
> them, and some special code sequences are used to access them.
I don't know if we misunderstand each other here but I was trying to say
that the TLS data is put in the object like any other data, just in a
different section with a different flag. That is at least how I
understand it from reading: http://www.akkadia.org/drepper/tls.pdf
>> I can see that the linker could/would be a problem. Of course the
>> compiler needs to be updated but there should be any problems updating
>> dmd. I guess you're referring to gcc. I also have to say that I
>> haven't fully understood what the linker does in this case, with the
>> TLS data.
>
> On Linux, the linker understands the special TLS sections, and the
> special relocation fixups to reference them. It also patches the
> specific TLS access code sequences emitted by the compiler differently
> depending on whether the result is to go into an executable or a shared
> library.
Ok, thanks for the explanation.
> On OSX, none of this happens.
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list