Properly adjust h->plt.refcount
[deliverable/binutils-gdb.git] / bfd / elf32-i386.c
index fce70b95cfaa80e557a19bf272567840fe741b7a..f76c7a7f404e80bb5ed7b83cdd2a8fc035d53ffe 100644 (file)
@@ -2031,8 +2031,11 @@ elf_i386_adjust_dynamic_symbol (struct bfd_link_info *info,
          if (pc_count || count)
            {
              h->needs_plt = 1;
-             h->plt.refcount += 1;
              h->non_got_ref = 1;
+             if (h->plt.refcount <= 0)
+               h->plt.refcount = 1;
+             else
+               h->plt.refcount += 1;
            }
        }
 
This page took 0.02352 seconds and 4 git commands to generate.