summaryrefslogtreecommitdiff
path: root/bfd/elf32-arm.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2012-06-29 15:20:27 +0000
committerNick Clifton <nickc@redhat.com>2012-06-29 15:20:27 +0000
commitf5feacf7d89da984db7916f6967bcbf2eb0c354b (patch)
tree4f38c71bd00f1bfe31eb62983d0649dbf8d1cb05 /bfd/elf32-arm.c
parent5bc1edbc781f87b4d0104ba475db370972be9852 (diff)
downloadbinutils-redhat-f5feacf7d89da984db7916f6967bcbf2eb0c354b.tar.gz
PR ld/14189
* elf32-arm.c (elf32_arm_check_relocs): Do not increment refcount for locally bound symbols.
Diffstat (limited to 'bfd/elf32-arm.c')
-rw-r--r--bfd/elf32-arm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index 7083422309..bc1f19532c 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -12669,7 +12669,8 @@ elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *info,
/* If the symbol is a function that doesn't bind locally,
this relocation will need a PLT entry. */
- root_plt->refcount += 1;
+ if (root_plt->refcount != -1)
+ root_plt->refcount += 1;
if (!call_reloc_p)
arm_plt->noncall_refcount++;