diff options
Diffstat (limited to 'bfd/elfnn-loongarch.c')
-rw-r--r-- | bfd/elfnn-loongarch.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/bfd/elfnn-loongarch.c b/bfd/elfnn-loongarch.c index b0f9b6ec69e..3fb74edb45c 100644 --- a/bfd/elfnn-loongarch.c +++ b/bfd/elfnn-loongarch.c @@ -980,7 +980,7 @@ loongarch_elf_adjust_dynamic_symbol (struct bfd_link_info *info, (although we could actually do it here). */ if (h->type == STT_FUNC || h->type == STT_GNU_IFUNC || h->needs_plt) { - if (h->plt.refcount < 0 + if (h->plt.refcount <= 0 || (h->type != STT_GNU_IFUNC && (SYMBOL_REFERENCES_LOCAL (info, h) || (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT @@ -993,8 +993,6 @@ loongarch_elf_adjust_dynamic_symbol (struct bfd_link_info *info, h->plt.offset = MINUS_ONE; h->needs_plt = 0; } - else - h->needs_plt = 1; return true; } |