From: Kyle McMartin Date: Fri, 20 Jun 2014 10:14:09 +0000 (+0100) Subject: Similarly to the AArch64 patch, set DF_STATIC_TLS for consistency with X-Git-Tag: hjl/linux/release/2.24.51.0.4~1^2~15^2~100 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=eea6dad2;p=thirdparty%2Fbinutils-gdb.git 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. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index c56b48d609c..b7f235bed6d 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2014-06-20 Kyle McMartin + + * 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 * elf32-arm.c (elf32_arm_allocate_plt_entry): Increment diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index ca64c7bf1ae..1c6965eb117 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++;