pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Workaround for NetBSD initial-exec and dlopen is not supported?



On Fri, 11 Sep 2015 14:55:41 +0200
Joerg Sonnenberger <joerg%britannica.bec.de@localhost> wrote:

> > TLDR: use of initial-exec in dlopen'ed shared libraries is not very
> > portable and glibc has some hacks to make it sort of work.
> 
> We have the same class of hacks. The limitation is that we don't support
> non-trivial initializers and we (currently) don't do GC for old values.
> So as long as the zero init is fine and not too many dlopen/dlclose
> cycles are done, it just works.

This explains the problem then. I assume this kind of initializer qualifies
as non-trivial?

__thread void *__glX_tls_Context __attribute__ ((tls_model("initial-exec")))
   = &dummyContext;

Kind regards,
-Tobias


Home | Main Index | Thread Index | Old Index