PR ld/14189
authorNick Clifton <nickc@redhat.com>
Fri, 29 Jun 2012 15:20:30 +0000 (15:20 +0000)
committerNick Clifton <nickc@redhat.com>
Fri, 29 Jun 2012 15:20:30 +0000 (15:20 +0000)
* elf32-arm.c (elf32_arm_check_relocs): Do not increment refcount
for locally bound symbols.

bfd/ChangeLog
bfd/elf32-arm.c

index 6df990270b1f9a17152c82783c7a932fdbcceee7..1afd7e42ee00f5d165d4a1f0cd1484c6c7dca4d6 100644 (file)
@@ -1,3 +1,9 @@
+2012-06-29  Nick Clifton  <nickc@redhat.com>
+
+       PR ld/14189
+       * elf32-arm.c (elf32_arm_check_relocs): Do not increment refcount
+       for locally bound symbols.
+
 2012-06-29  Alan Modra  <amodra@gmail.com>
 
        * section.c (bfd_get_linker_section): New function.
index 7083422309f3987e2184db8468a70fc8b4f6614b..bc1f19532cde4d5a48f7c88430ccdf8a7931cd3a 100644 (file)
@@ -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++;