On Friday, 6 November 2015 at 17:56:06 UTC, Jacob Carlborg wrote:
On 2015-11-06 18:15, bitwise wrote:

The existing emulated TLS solution can be modified to work with shared libraries pretty easily. At present, I have no intention of trying to
implement native TLS.

I don't see how it can be modified "pretty easily". You don't need native TLS, but as far as I can see you basically need to do, in the runtime, what the dynamic linker is already doing.

Currently, the compiler just calls ___tls_get_addr(void *p) to get the thread local copy of a global. If that function signature is altered to take a pointer to the image as well, the problem is solved.

     Bit


Reply via email to