aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle McMartin <kyle@redhat.com>2014-06-20 11:14:09 +0100
committerNick Clifton <nickc@redhat.com>2014-06-20 11:14:09 +0100
commiteea6dad2b3ae91189caa91145dd133bae0398d21 (patch)
tree3eae84eec79d8bb289225a79ada645bdc09c0bce
parentdb988f621f38b0123334c7e481deb113b9b5b9bf (diff)
downloadgdb-eea6dad2b3ae91189caa91145dd133bae0398d21.zip
gdb-eea6dad2b3ae91189caa91145dd133bae0398d21.tar.gz
gdb-eea6dad2b3ae91189caa91145dd133bae0398d21.tar.bz2
Similarly to the AArch64 patch, set DF_STATIC_TLS for consistency with
other architectures when we emit IE relocs in a shared library. * elf32-arm.c (elf32_arm_check_relocs): Set DF_STATIC_TLS when emitting initial-exec relocs when not linking an executable.
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elf32-arm.c3
2 files changed, 8 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index c56b48d..b7f235b 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2014-06-20 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.
+
2014-06-16 Will Newton <will.newton@linaro.org>
* elf32-arm.c (elf32_arm_allocate_plt_entry): Increment
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index ca64c7b..1c6965e 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -12711,6 +12711,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++;