mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-24 04:00:07 +08:00
RISC-V: Should reset `again' flag for _bfd_riscv_relax_pc.
The R_RISCV_DELETE relocations are no longer deleted at another relax pass, so we should reset 'again' flag to true for _bfd_riscv_relax_pc, while the deleted bytes are marked as R_RISCV_DELETE. bfd/ * elfnn-riscv.c (_bfd_riscv_relax_pc): Set `again' to true while the deleted bytes are marked as R_RISCV_DELETE.
This commit is contained in:
@ -4586,7 +4586,7 @@ _bfd_riscv_relax_pc (bfd *abfd ATTRIBUTE_UNUSED,
|
|||||||
bfd_vma symval,
|
bfd_vma symval,
|
||||||
bfd_vma max_alignment,
|
bfd_vma max_alignment,
|
||||||
bfd_vma reserve_size,
|
bfd_vma reserve_size,
|
||||||
bool *again ATTRIBUTE_UNUSED,
|
bool *again,
|
||||||
riscv_pcgp_relocs *pcgp_relocs,
|
riscv_pcgp_relocs *pcgp_relocs,
|
||||||
bool undefined_weak)
|
bool undefined_weak)
|
||||||
{
|
{
|
||||||
@ -4715,6 +4715,7 @@ _bfd_riscv_relax_pc (bfd *abfd ATTRIBUTE_UNUSED,
|
|||||||
sym_sec,
|
sym_sec,
|
||||||
undefined_weak);
|
undefined_weak);
|
||||||
/* Delete unnecessary AUIPC and reuse the reloc. */
|
/* Delete unnecessary AUIPC and reuse the reloc. */
|
||||||
|
*again = true;
|
||||||
riscv_relax_delete_bytes (abfd, sec, rel->r_offset, 4, link_info,
|
riscv_relax_delete_bytes (abfd, sec, rel->r_offset, 4, link_info,
|
||||||
pcgp_relocs, rel);
|
pcgp_relocs, rel);
|
||||||
return true;
|
return true;
|
||||||
|
Reference in New Issue
Block a user