https://sourceware.org/bugzilla/show_bug.cgi?id=22756
--- Comment #7 from Andreas Schwab <sch...@linux-m68k.org> --- This simpler patch instead of #c3 fixes both the original problem and the preceding test case. diff --git c/bfd/elfnn-riscv.c w/bfd/elfnn-riscv.c index 5f66f4f2d9..9c2b48baf5 100644 --- c/bfd/elfnn-riscv.c +++ w/bfd/elfnn-riscv.c @@ -2653,6 +2653,14 @@ riscv_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr, size_t count) for (i = 0; i < symcount; i++) { struct elf_link_hash_entry *sym_hash = sym_hashes[i]; + unsigned j; + + /* Check for symbol aliases, don't adjust the same symbol twice. */ + for (j = 0; j < i; j++) + if (sym_hashes[j] == sym_hash) + break; + if (j < i) + continue; if ((sym_hash->root.type == bfd_link_hash_defined || sym_hash->root.type == bfd_link_hash_defweak) -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils