On Mon, 19 Mar 2012 09:15:08 +0100, Johannes Pfau
wrote:
And how do we get the TLS initialization data? If we placed it into an
array, like DMD does on OSX, we could use dlsym for dlopened libraries,
but what about initially loaded libraries?
That doesn't work because the symbols would coll
On Mon, 19 Mar 2012 10:40:25 +0100, Jacob Carlborg wrote:
As I understand it, in the native ELF implementation, assembly is used
to access the current module id, this is for FreeBSD:
http://people.freebsd.org/~marcel/tls.html
This is how ___tls_get_addr is implemented on FreeBSD ELF i386:
On Mon, 19 Mar 2012 16:57:29 +0100, Johannes Pfau
wrote:
The only way to access all loaded library is dl_iterate_phdr. But I'm
not sure if it provides all necessary information.
Yes it does.
The drawback is that it eagerly allocates the TLS block.
https://github.com/dawgfoto/druntime/blob/