This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Avoid privatization of TLS variables


> On Thu, Sep 25, 2014 at 8:37 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> > On Thu, Sep 25, 2014 at 8:24 AM, Ian Lance Taylor <iant@google.com> wrote:
> >> On Wed, Sep 24, 2014 at 6:58 PM, Jan Hubicka <hubicka@ucw.cz> wrote:
> >>>
> >>>    b:   00 00
> >>>                         9: R_X86_64_TPOFF32     __gcov_indirect_call_counters_ltopriv
> >>
> >> Look at the .o file where __gcov_indirect_call_counters_ltopriv is
> >> defined.  That .o file must have the symbol marked as STT_TLS and it
> >> must be defined in a section with the SHF_TLS flag.  If that is not
> >> true, then that is your problem.
> >
> > SHF_TLS isn't required.
> >
> >     16: 0000000000000008     8 TLS     GLOBAL HIDDEN   COM
> > __gcov_indirect_call_counters_ltopriv
> >     17: 0000000000000008     8 TLS     GLOBAL HIDDEN   COM
> > __gcov_indirect_call_callee_ltopriv
> >
> > are also sufficient.
> 
> I can create a .o file with a hidden common symbol, but I can't
> recreate the problem.  When I try, gold creates a TLS section and TLS
> segment itself.
> 
> How exactly is gold being invoked?

It seems to happen with LTO compilation only, just build mainline tree
and try the original testcase.

Honza
> 
> Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]