This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH][AARCH64] set DF_STATIC_TLS when emitting IE relocs
- From: Kyle McMartin <kmcmarti at redhat dot com>
- To: Will Newton <will dot newton at linaro dot org>
- Cc: "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Tue, 13 May 2014 10:14:32 -0400
- Subject: Re: [PATCH][AARCH64] set DF_STATIC_TLS when emitting IE relocs
- Authentication-results: sourceware.org; auth=none
- References: <20140512171906 dot GA21081 at redacted dot bos dot redhat dot com> <CANu=DmhEDNSfXxa9=0KYo0vroNFUJfx=hTUXDD0sWTf=bk34+Q at mail dot gmail dot com>
On Tue, May 13, 2014 at 08:49:51AM +0100, Will Newton wrote:
> > --- a/bfd/elfnn-aarch64.c
> > +++ b/bfd/elfnn-aarch64.c
> > @@ -5272,6 +5272,9 @@ elfNN_aarch64_check_relocs (bfd *abfd, struct bfd_link_info *info,
> > if ((got_type & GOT_TLS_IE) && GOT_TLS_GD_ANY_P (got_type))
> > got_type &= ~ (GOT_TLSDESC_GD | GOT_TLS_GD);
> >
> > + if (!info->executable && (got_type & GOT_TLS_IE))
> > + info->flags |= DF_STATIC_TLS;
> > +
> > if (old_got_type != got_type)
> > {
> > if (h != NULL)
>
> This looks ok in principle, but I have a couple of questions.
>
> In the aarch64 version we test the got_type after merging TLS methods
> but in the arm version we test before. Is there a reason for that? Can
> it make any difference? We should probably be consistent in any case.
>
I'll fix this to be consistent between the two. It shouldn't make any
difference because we never clear the TLS_IE flag.
> Is it possible to write a test for this?
>
Yeah, I'll resubmit with a test case as soon as I finish writing a
testcase for another TLS issue in glibc. :/
--Kyle