* [PATCH][ARM] set DF_STATIC_TLS when emitting IE relocs
@ 2014-05-12 17:19 Kyle McMartin
2014-06-17 11:07 ` Nicholas Clifton
0 siblings, 1 reply; 7+ messages in thread
From: Kyle McMartin @ 2014-05-12 17:19 UTC (permalink / raw)
To: binutils
Similarly to the AArch64 patch, set DF_STATIC_TLS for consistency with
other architectures when we emit IE relocs in a shared library.
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.
---
bfd/elf32-arm.c | 3 +++
1 file changed, 3 insertions(+)
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++;
--
1.9.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH][ARM] set DF_STATIC_TLS when emitting IE relocs
2014-05-12 17:19 [PATCH][ARM] set DF_STATIC_TLS when emitting IE relocs Kyle McMartin
@ 2014-06-17 11:07 ` Nicholas Clifton
2014-06-22 5:04 ` Hans-Peter Nilsson
0 siblings, 1 reply; 7+ messages in thread
From: Nicholas Clifton @ 2014-06-17 11:07 UTC (permalink / raw)
To: Kyle McMartin, binutils
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH][ARM] set DF_STATIC_TLS when emitting IE relocs
2014-06-17 11:07 ` Nicholas Clifton
@ 2014-06-22 5:04 ` Hans-Peter Nilsson
2014-06-22 13:09 ` Kyle McMartin
2014-06-24 20:00 ` [PATCH][ARM] ld/arm: adjust offsets in tls-gdierelax2.d Kyle McMartin
0 siblings, 2 replies; 7+ messages in thread
From: Hans-Peter Nilsson @ 2014-06-22 5:04 UTC (permalink / raw)
To: kmcmarti; +Cc: binutils
> 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).
brgds, H-P
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH][ARM] set DF_STATIC_TLS when emitting IE relocs
2014-06-22 5:04 ` Hans-Peter Nilsson
@ 2014-06-22 13:09 ` Kyle McMartin
2014-06-24 20:00 ` [PATCH][ARM] ld/arm: adjust offsets in tls-gdierelax2.d Kyle McMartin
1 sibling, 0 replies; 7+ messages in thread
From: Kyle McMartin @ 2014-06-22 13:09 UTC (permalink / raw)
To: Hans-Peter Nilsson; +Cc: binutils
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH][ARM] ld/arm: adjust offsets in tls-gdierelax2.d
2014-06-22 5:04 ` Hans-Peter Nilsson
2014-06-22 13:09 ` Kyle McMartin
@ 2014-06-24 20:00 ` Kyle McMartin
2014-06-25 9:25 ` Nicholas Clifton
1 sibling, 1 reply; 7+ messages in thread
From: Kyle McMartin @ 2014-06-24 20:00 UTC (permalink / raw)
To: binutils; +Cc: Hans-Peter Nilsson
Addition of DF_STATIC_TLS in eea6dad2 results in the addition of
flags to the dynamic section, which in turn changes these addresses.
Fix them up to match their new positions.
ld/testsuite/Changelog:
2014-06-24 Kyle McMartin <kyle@redhat.com>
* ld-arm/tls-gdierelax2.d: Fix expected offsets.
--- a/ld/testsuite/ld-arm/tls-gdierelax2.d
+++ b/ld/testsuite/ld-arm/tls-gdierelax2.d
@@ -11,13 +11,13 @@ Disassembly of section .text:
[0-9a-f]+: e59f0004 ldr r0, \[pc, #4\] ; .*
[0-9a-f]+: e79f0000 ldr r0, \[pc, r0\]
[0-9a-f]+: e1a00000 nop ; .*
- [0-9a-f]+: 00008098 .word 0x00008098
- [0-9a-f]+: 0000809c .word 0x0000809c
+ [0-9a-f]+: 000080a0 .word 0x000080a0
+ [0-9a-f]+: 000080a4 .word 0x000080a4
[0-9a-f]+ <bar>:
[0-9a-f]+: 4801 ldr r0, \[pc, #4\] ; .*
[0-9a-f]+: 4478 add r0, pc
[0-9a-f]+: 6800 ldr r0, \[r0, #0\]
[0-9a-f]+: 46c0 nop ; .*
- [0-9a-f]+: 0000808a .word 0x0000808a
- [0-9a-f]+: 0000808c .word 0x0000808c
+ [0-9a-f]+: 00008092 .word 0x00008092
+ [0-9a-f]+: 00008094 .word 0x00008094
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH][ARM] ld/arm: adjust offsets in tls-gdierelax2.d
2014-06-24 20:00 ` [PATCH][ARM] ld/arm: adjust offsets in tls-gdierelax2.d Kyle McMartin
@ 2014-06-25 9:25 ` Nicholas Clifton
2014-06-25 15:17 ` Kyle McMartin
0 siblings, 1 reply; 7+ messages in thread
From: Nicholas Clifton @ 2014-06-25 9:25 UTC (permalink / raw)
To: Kyle McMartin, binutils; +Cc: Hans-Peter Nilsson
Hi Kyle,
> ld/testsuite/Changelog:
>
> 2014-06-24 Kyle McMartin <kyle@redhat.com>
>
> * ld-arm/tls-gdierelax2.d: Fix expected offsets.
Approved - please apply.
Cheers
Nick
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH][ARM] ld/arm: adjust offsets in tls-gdierelax2.d
2014-06-25 9:25 ` Nicholas Clifton
@ 2014-06-25 15:17 ` Kyle McMartin
0 siblings, 0 replies; 7+ messages in thread
From: Kyle McMartin @ 2014-06-25 15:17 UTC (permalink / raw)
To: Nicholas Clifton; +Cc: binutils, Hans-Peter Nilsson
On Wed, Jun 25, 2014 at 10:24:55AM +0100, Nicholas Clifton wrote:
> Hi Kyle,
>
> >ld/testsuite/Changelog:
> >
> >2014-06-24 Kyle McMartin <kyle@redhat.com>
> >
> > * ld-arm/tls-gdierelax2.d: Fix expected offsets.
>
> Approved - please apply.
>
Thanks, applied... hopefully I didn't muck it up.
--Kyle
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-06-25 15:17 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-12 17:19 [PATCH][ARM] set DF_STATIC_TLS when emitting IE relocs Kyle McMartin
2014-06-17 11:07 ` Nicholas Clifton
2014-06-22 5:04 ` Hans-Peter Nilsson
2014-06-22 13:09 ` Kyle McMartin
2014-06-24 20:00 ` [PATCH][ARM] ld/arm: adjust offsets in tls-gdierelax2.d Kyle McMartin
2014-06-25 9:25 ` Nicholas Clifton
2014-06-25 15:17 ` Kyle McMartin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).