Message ID | 20140512171919.GB21081@redacted.bos.redhat.com |
---|---|
State | New |
Headers | show |
Hi Kyle, > 2014-05-12 Kyle McMartin <kyle@redhat.com> > > * elf32-arm.c (elf32_arm_check_relocs): Set DF_STATIC_TLS when emitting > initial-exec relocs when not linking an executable. Approved - please apply. Cheers Nick
On Sun, Jun 22, 2014 at 07:04:17AM +0200, Hans-Peter Nilsson wrote: > > From: Nicholas Clifton <nickc@redhat.com> > > Date: Tue, 17 Jun 2014 13:07:13 +0200 > > > > 2014-05-12 Kyle McMartin <kyle@redhat.com> > > > > > > * elf32-arm.c (elf32_arm_check_relocs): Set DF_STATIC_TLS when emitting > > > initial-exec relocs when not linking an executable. > > > > Approved - please apply. > > This patch caused my autotester for arm-eabi to complain: > > Running /tmp/hpautotest-binutils/bsrc/src/ld/testsuite/ld-arm/arm-elf.exp ... > FAIL: TLS gnu GD to IE shared relaxation > > Looks like the regexps have to be tweaked. > > I see it fails for arm-linux-gnueabi too, which is a bit > surprising, as I'd have guess that's the target for which you > ran the test-suite (you didn't say). > Hrm, I didn't see this, but the version I likely tested on was quite a bit older than head. Will fix this up. Sorry about that. regards, Kyle
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index 526d4f8..d5dcc83 100644 --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -12705,6 +12705,9 @@ elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *info, default: tls_type = GOT_NORMAL; break; } + if (!info->executable && (tls_type & GOT_TLS_IE)) + info->flags |= DF_STATIC_TLS; + if (h != NULL) { h->got.refcount++;