RISC-V: About relaxation without internal reloc numbers reserved in psABI
Tatsuyuki Ishi
ishitatsuyuki@gmail.com
Mon Nov 6 04:04:57 GMT 2023
Hi,
I'm currently working on implementing relaxation for the TLS
Descriptor extensions [1]. Previously, relaxation was implemented by
first converting the relocation into an internal relocation number in
_bfd_riscv_relax_section, then overwriting the instruction with the
resolved offset in riscv_elf_relocate_section. However, according to
[2], these numbers are no longer considered reserved in the
specification, and we should move away from using numbers in the
reserved range for internal purposes, at least for any new relaxation
implementation.
If I need to implement a new relaxation now, what is the recommended
approach? Perhaps I could use a relocation number >= 256 for internal
relocation, assuming the relocation number is not cast to uint8_t
(need to confirm this assumption).
I welcome suggestions for alternative solutions as well.
Regards,
Tatsuyuki
[1]: https://inbox.sourceware.org/binutils/20230817180852.121628-2-ishitatsuyuki@gmail.com/
[2]: https://github.com/riscv-non-isa/riscv-elf-psabi-doc/issues/398
More information about the Binutils
mailing list