http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55354



--- Comment #21 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-11-21 
09:23:56 UTC ---

(In reply to comment #20)

> What I see is that it also affect code generation (register allocation). Do we

> need to file a bug on that?



If you see a code generation difference even with -ftls-model=local-exec -fPIC

vs. -fPIE, then it must mean you don't have visibility attributes on the

symbols used in the fast path.  For initial-exec, the RA effects should be

minimal, the TLS offset load from got is usually very close to the actual TLS

memory load (or lea), and thus it will just pick up some short lived scratch

register.  Generally in GCC, -fPIE sets flag_pic and not flag_shlib, while

-fPIC sets flag_pic and flag_shlib.  flag_pic is about whether position

independent code needs to be generated, flag_shlib is about whether locally

defined symbols can be interposed (plus it affects TLS model default choice).



> For dynamic libraries that are loaded into a non-instrumented executable (e.g.

> swig so preloaded into python process), we statically link the tsan runtime

> into the so.



And you don't get linker errors from that?  That must be by pure luck.

Reply via email to