This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Avoid privatization of TLS variables
- From: Cary Coutant <ccoutant at google dot com>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: Ian Lance Taylor <iant at google dot com>, "H.J. Lu" <hjl dot tools at gmail dot com>, Markus Trippelsdorf <markus at trippelsdorf dot de>, Ian Lance Taylor <ian at airs dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 25 Sep 2014 19:42:29 -0700
- Subject: Re: Avoid privatization of TLS variables
- Authentication-results: sourceware.org; auth=none
- References: <20140920031617 dot GB2325 at kam dot mff dot cuni dot cz> <20140924175326 dot GE29454 at x4> <20140924181836 dot GE6871 at kam dot mff dot cuni dot cz> <CAKOQZ8xMx8bpXGTXN8pd2RC2T9i31brdQTH13ZWiYdooTVq_aw at mail dot gmail dot com> <20140925015835 dot GC26922 at atrey dot karlin dot mff dot cuni dot cz> <CAKOQZ8zwpGfLE02C55iLnDX6rNYAH89nkGFXay2zSTmPidef4w at mail dot gmail dot com> <CAMe9rOqez8GmTu0ZGfyfORJq=fGY8j9J79Ar=LEied=34cgqxw at mail dot gmail dot com> <CAKOQZ8yMkZeaRnmH4Y+coGOFUeK0p5cSuQvsCPDCTn+DHeqw+w at mail dot gmail dot com> <20140925162957 dot GD9303 at kam dot mff dot cuni dot cz> <CAHACq4rseRTNR=i_dYS_TKKEa_UVCA5a0LW+zDDry30fiHCBkg at mail dot gmail dot com> <20140926021714 dot GA5044 at kam dot mff dot cuni dot cz>
> Thank you! Now when I have your attention, perhaps we could discuss the original
> motivation of the change that exposed this bug.
> I was building libreoffice with profile feedback and I run into a message
>
> cannot load any more object with static TLS
>
> that took me a while to track as I did not see where static TLS is comming out.
> Ian pointed out to me that static variables with TLS storage also consume
> static TLS even if they are in dynamic model. This is why I disabled
> localization. Is there better way to handle this?
As I understand it, if you compile with -fpic, you shouldn't see any
static TLS. The compiler should only use the Local Exec model for
static/hidden variables in non-PIC compiles.
> Note that the variable __gcov_indirect_call_counters_ltopriv was added to work around
> https://sourceware.org/bugzilla/show_bug.cgi?id=14342
> that seems to be fixed. I would like to drop the hack (that will also make
> profiling to work with current golds again), but I think I would like to document
> when the bug went away, becuase it is only bit over a year now.
>
> Any idea when it was fixed?
I think it was fixed with this patch:
https://sourceware.org/ml/binutils/2013-06/msg00139.html
I guess I should close that bug.
-cary