This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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: [gold RFC] Do not generate dynamic reloc for unresolved TLS symbol


On Wed, Jan 28, 2015 at 03:57:54PM -0800, Cary Coutant wrote:
> created. This patch allows the IE-to-LE optimization for an undefined symbol
> when building an executable,

Thinking out loud here.  That looks like a contradiction to me.  If
the symbol is undefined, how can it be local-exec?

Oh, is this the undefined weak case?  Hmm, seems to me that undefined
weaks don't play well with TLS symbols..  Even for initial-exec you
won't have its address resolve to zero as you do with non-TLS symbols,
because tp is always added.  So
  if (foo)
    {
      /* Do something when foo is defined.  */
    }
will "Do something" even when foo is undefined.

-- 
Alan Modra
Australia Development Lab, IBM


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