On Fri, Jul 19, 2013 at 07:55:35PM +0400, Alexander Monakov wrote:
> On Fri, 19 Jul 2013, Jakub Jelinek wrote:
> > Furthermore, on Linux you can dlopen even libraries with initial-exec TLS
> > model in it (as long as they don't use too big TLS sections).
> 
> This is the failure I'm referring to ("cannot load any more object ..."):
> http://repo.or.cz/w/glibc.git/blob/HEAD:/elf/dl-open.c#l525
> 
> > So the short answer is, don't do this, especially if you are using TLS.
> 
> Sure, *I* don't do that.  The problem is, some GCC users do that, and we
> should either fix the documentation, or fix the implementation to match the
> documentation and give them a smoother rope.  I'd do the latter, but I don't
> see if there were any reasons for the current implementation to be the way it
> is, and hence I'm asking on the mailing list.

The change of memory models based on flag_shlib is completely intentional,
it is similar to the linker TLS optimizations but at the compiler level,
so if you want to ad some comment to documentation, that is fine, but
I don't see anything to fix.

        Jakub

Reply via email to