diff options
author | Julian Brown <julian@codesourcery.com> | 2013-02-28 10:31:34 +0000 |
---|---|---|
committer | Julian Brown <julian@codesourcery.com> | 2013-02-28 10:31:34 +0000 |
commit | 3064e1ff79ecbe3d6f09667ae09065e347b5605b (patch) | |
tree | f21cdabeac8f35ce18ca2c10b1d78d239983e385 /bfd | |
parent | dfe07582357cc33c46ebf6a02f0e52599bade48c (diff) | |
download | gdb-3064e1ff79ecbe3d6f09667ae09065e347b5605b.zip gdb-3064e1ff79ecbe3d6f09667ae09065e347b5605b.tar.gz gdb-3064e1ff79ecbe3d6f09667ae09065e347b5605b.tar.bz2 |
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')
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elf32-arm.c | 18 |
2 files changed, 16 insertions, 7 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 27746f2..93ad3cc 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2013-02-28 Nathan Sidwell <nathan@codesourcery.com> + + * elf32-arm.c (elf32_arm_size_dynamic_sections): Don't call + elf32_arm_allocate_dynrelocs for source reloc for non-dynamic link. + 2013-02-27 DJ Delorie <dj@redhat.com> * reloc.c (BFD_RELOC_RL78_CODE): Add. diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index cf5bc6d..aba1814 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 |