This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH][ARM] set DF_STATIC_TLS when emitting IE relocs


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]