This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Fix 16846, LTO mismatched TLS reference
- From: Alan Modra <amodra at gmail dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>, Binutils <binutils at sourceware dot org>
- Date: Thu, 17 Apr 2014 13:07:29 +0930
- Subject: Re: Fix 16846, LTO mismatched TLS reference
- Authentication-results: sourceware.org; auth=none
- References: <20140416094446 dot GZ13391 at bubble dot grove dot modra dot org> <CAMe9rOqhR1gcZKURkMFWB4YUu+TBrUxMdAfB8Qg9TX3hJ4MLGQ at mail dot gmail dot com> <20140417001819 dot GC13391 at bubble dot grove dot modra dot org>
On Thu, Apr 17, 2014 at 09:48:19AM +0930, Alan Modra wrote:
> On Wed, Apr 16, 2014 at 08:16:28AM -0700, H.J. Lu wrote:
> > On Wed, Apr 16, 2014 at 2:44 AM, Alan Modra <amodra@gmail.com> wrote:
> > > I think this is all we need to fix pr16848. HJ, do you see anything
> > > more we should do here? I'm wondering why we have type_change_ok
> > > when oldbfd is the plugin.
> >
> > It is because there is no symbol type in plugin.
>
> That is precisely why you should *not* need to set type_change_ok!
> If the old symbol is STT_NOTYPE, then it will not cause a warning
> that "type of symbol ... changed". The following seems to be good,
> but I wanted to ask you first since this is your code..
Oops, sorry. The TLS checking is yours, the part I'm questioning was
a patch of mine in 2011.
https://sourceware.org/ml/binutils/2011-06/msg00238.html
So I'm committing this to fix my mistake.
> PR 16846
> * elflink.c (_bfd_elf_merge_symbol): Ignore TLS mismatch when
> current bfd is a plugin. Don't always set type_change_ok
> when old bfd is a plugin.
--
Alan Modra
Australia Development Lab, IBM