You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It does not only deduplicate multiple relaxation feature detection,
but enable more complex features so that querying the feature availability
will get too slow if we perform it per-relocation (not per-section).
Even if that wouldn't happen any time soon, it will improve the
maintainability around the linker relaxation code.
bfd/ChangeLog:
* elfnn-riscv.c (RISCV_RELAX_RVC, RISCV_RELAX_GP): New.
(relax_func_t): Add new relax_features argument.
(_bfd_riscv_relax_call): Likewise. Move feature detection to
_bfd_riscv_relax_section. Use bool for simplicity.
(_bfd_riscv_relax_lui): Likewise. Move feature detection to
_bfd_riscv_relax_section.
(_bfd_riscv_relax_tls_le): Likewise but features are not used.
(_bfd_riscv_relax_align): Likewise but features are not used.
(_bfd_riscv_relax_pc): Likewise. Move feature detection to
_bfd_riscv_relax_section.
(_bfd_riscv_relax_section): Detect relaxation-related features
and pass the flags to each relaxation function.
0 commit comments