[PATCH] D159082: [ELF][RISCV] Implement --emit-relocs with relaxation
Job Noorman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 6 00:45:42 PDT 2023
jobnoorman added a comment.
In D159082#4638968 <https://reviews.llvm.org/D159082#4638968>, @MaskRay wrote:
> I think I like R_RISCV_ALIGN better as it is simpler and conveys more information.
> Changing to R_RISCV_NONE may not be necessarily their intention. It's just a default behavior in GNU ld when a relocation is nullified.
>
> Ultimately, I think a user processing these relocations need to know these relocations cannot be applied again.
>
> `--emit-relocs` copied relocations do not have the SHF_ALLOC flag, so they are easily recognizable.
I think I agree: since the output of `--emit-relocs` is not supposed to be processed by linkers, there doesn't seem to be a need to follow the psABI to the letter. In fact, we might not be doing that anyway: relocation pairs like `R_RISCV_JAL`+`R_RISCV_RELAX` are not defined as valid relaxations but can be produced by `--emit-relocs --relax`.
I will revert the patch to the previous version. Do you agree @jrtc27?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D159082/new/
https://reviews.llvm.org/D159082
More information about the llvm-commits
mailing list