binutils: elf/riscv: Fix relaxation with aliases [PR28021]

* This is a backport of a fix in binutils master and 2.37
  commit: 235f5ef4a6b8fbdcfaea8b629f7c6a9792a789de
* Solves a dobuble-relaxation optimization in binutils under riscv64

Change-Id: I6a2ed520615b5e36bbb0003bf3a6a186c0aaeca1
Reviewed-on: https://review.haiku-os.org/c/buildtools/+/4412
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
Michael Matz 2021-09-01 13:43:37 -05:00 committed by Alex von Gluck IV
parent cc988c8c90
commit 1673cf9c0f

View File

@ -3943,7 +3943,7 @@ riscv_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr, size_t count,
foo becomes an alias for foo@BAR, and hence they need the same
treatment. */
if (link_info->wrap_hash != NULL
|| sym_hash->versioned == versioned_hidden)
|| sym_hash->versioned != unversioned)
{
struct elf_link_hash_entry **cur_sym_hashes;