RISC-V: Reduce effective linker relaxation passses
authorTsukasa OI <research_trasio@irq.a4lg.com>
Fri, 10 Feb 2023 09:27:28 +0000 (09:27 +0000)
committerTsukasa OI <research_trasio@irq.a4lg.com>
Fri, 10 Feb 2023 11:01:51 +0000 (11:01 +0000)
commit779b2502783107368c03421597b095c648f47a3a
tree7d0d8087226280ef0af9c99f5ebc358527576014
parent80aa6647b1678fe84b5af5595ad939b48febf6a0
RISC-V: Reduce effective linker relaxation passses

Commit 43025f01a0c9 ("RISC-V: Improve link time complexity.") reduced the
time complexity of the linker relaxation but some code portions did not
reflect this change.

This commit fixes a comment describing each relaxation pass and reduces
actual number of passes for the RISC-V linker relaxation from 3 to 2.
Though it does not change the functionality, it marginally improves the
performance while linking large programs (with many relocations).

bfd/ChangeLog:

* elfnn-riscv.c (_bfd_riscv_relax_section): Fix a comment to
reflect current roles of each relaxation pass.

ld/ChangeLog:

* emultempl/riscvelf.em: Reduce the number of linker relaxation
passes from 3 to 2.
bfd/elfnn-riscv.c
ld/emultempl/riscvelf.em