summaryrefslogtreecommitdiff
path: root/bfd/elf32-arm.c
diff options
context:
space:
mode:
authorJulian Brown <julian@codesourcery.com>2013-02-28 10:31:31 +0000
committerJulian Brown <julian@codesourcery.com>2013-02-28 10:31:31 +0000
commite161f717e0220a82002543b04d80404dac977418 (patch)
treec215c936adc88eb31602f8efa3c4a6ccf7d46d6d /bfd/elf32-arm.c
parent98c2ad16205f3d011f03b37e0c2673bec8cd7d28 (diff)
downloadbinutils-redhat-e161f717e0220a82002543b04d80404dac977418.tar.gz
bfd/
* elf32-arm.c (elf32_arm_size_dynamic_sections): Don't call elf32_arm_allocate_dynrelocs for source reloc for non-dynamic link. ld/testsuite/ * ld-arm/tls-local-static.s: New test. * ld-arm/tls-local-static.d: New. * ld-arm/arm-elf.exp (tls-local-static): Add test.
Diffstat (limited to 'bfd/elf32-arm.c')
-rw-r--r--bfd/elf32-arm.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index cf5bc6db2c..aba1814f85 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -13648,14 +13648,18 @@ elf32_arm_size_dynamic_sections (bfd * output_bfd ATTRIBUTE_UNUSED,
&& (local_iplt == NULL
|| local_iplt->arm.noncall_refcount == 0))
elf32_arm_allocate_irelocs (info, srel, 1);
- else if ((info->shared && !(*local_tls_type & GOT_TLS_GDESC))
- || *local_tls_type & GOT_TLS_GD)
- elf32_arm_allocate_dynrelocs (info, srel, 1);
-
- if (info->shared && *local_tls_type & GOT_TLS_GDESC)
+ else if (info->shared || output_bfd->flags & DYNAMIC)
{
- elf32_arm_allocate_dynrelocs (info, htab->root.srelplt, 1);
- htab->tls_trampoline = -1;
+ if ((info->shared && !(*local_tls_type & GOT_TLS_GDESC))
+ || *local_tls_type & GOT_TLS_GD)
+ elf32_arm_allocate_dynrelocs (info, srel, 1);
+
+ if (info->shared && *local_tls_type & GOT_TLS_GDESC)
+ {
+ elf32_arm_allocate_dynrelocs (info,
+ htab->root.srelplt, 1);
+ htab->tls_trampoline = -1;
+ }
}
}
else