Am Fri, 23 Mar 2012 13:05:55 +0100 schrieb "Martin Nowak" <d...@dawgfoto.de>:
> On Fri, 23 Mar 2012 11:02:44 +0100, Johannes Pfau > <nos...@example.com> wrote: > > > For FreeBSD, this is easy again, dtv[1] contains the size of the > > dtv. But that's probably nonstandard. > > Yeah, seems to be non-standard. > There might also be issues with outdated dtv's. Which means we'd have to check the generation counter. And if the counter mismatches, we'd need the C runtime to update it. I'm not sure if we can access tls_dtv_generation on FreeBSD, but updating the counter is easy: every call to __tls_get_addr works, so we could just use module id 1 offset 0. AFAIK the TLS memory for the application module is always allocated anyway. I'll probably try this at some point, but I have to set up a FreeBSD VM first.