This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH][ARM] set DF_STATIC_TLS when emitting IE relocs
- From: Kyle McMartin <kmcmarti at redhat dot com>
- To: binutils at sourceware dot org
- Date: Mon, 12 May 2014 13:19:20 -0400
- Subject: [PATCH][ARM] set DF_STATIC_TLS when emitting IE relocs
- Authentication-results: sourceware.org; auth=none
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