diff options
author | Nelson Chu <nelson@rivosinc.com> | 2022-10-24 18:26:36 +0800 |
---|---|---|
committer | Nelson Chu <nelson@rivosinc.com> | 2022-10-25 09:20:39 +0800 |
commit | 845652b78412a98226c321aade16920d06e552ca (patch) | |
tree | efd6cac9f2a94fc148042e03df670cb5e23147c7 /bfd | |
parent | 43025f01a0c99c939e20e90a6e695741c14a925a (diff) | |
download | gdb-845652b78412a98226c321aade16920d06e552ca.zip gdb-845652b78412a98226c321aade16920d06e552ca.tar.gz gdb-845652b78412a98226c321aade16920d06e552ca.tar.bz2 |
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.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/elfnn-riscv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/elfnn-riscv.c b/bfd/elfnn-riscv.c index e406431..cf85263 100644 --- a/bfd/elfnn-riscv.c +++ b/bfd/elfnn-riscv.c @@ -4586,7 +4586,7 @@ _bfd_riscv_relax_pc (bfd *abfd ATTRIBUTE_UNUSED, bfd_vma symval, bfd_vma max_alignment, bfd_vma reserve_size, - bool *again ATTRIBUTE_UNUSED, + bool *again, riscv_pcgp_relocs *pcgp_relocs, bool undefined_weak) { @@ -4715,6 +4715,7 @@ _bfd_riscv_relax_pc (bfd *abfd ATTRIBUTE_UNUSED, sym_sec, undefined_weak); /* Delete unnecessary AUIPC and reuse the reloc. */ + *again = true; riscv_relax_delete_bytes (abfd, sec, rel->r_offset, 4, link_info, pcgp_relocs, rel); return true; |