[PATCH] D117082: [JITLink][RISCV] Support R_RISCV_SET* and R_RISCV_32_PCREL relocations
Jessica Clarke via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 12 20:31:00 PST 2022
jrtc27 added a comment.
In D117082#3239455 <https://reviews.llvm.org/D117082#3239455>, @fourdim wrote:
> In D117082#3236340 <https://reviews.llvm.org/D117082#3236340>, @jrtc27 wrote:
>
>> You can write tests just fine in assembly. Use `.reloc` if needed. You don't need `.eh_frame` for that.
>
> Sorry for my stupid mistakes.
> I'm planning to upload a new diff, however, I'm still confused about the `.reloc`.
> It appears that it only adds a R_RISCV_SET* relocation in the binary.
> I'm checking lld/test/ELF/riscv-reloc-add.s and D63183 <https://reviews.llvm.org/D63183>, and got no idea on how to set the value.
> Particularly, D63183 <https://reviews.llvm.org/D63183> says,
>
>> Note llvm-mc cannot currently produce R_RISCV_SET* so they are not tested.
>
> And the test case now still does not add R_RISCV_SET* test.
> Would you be so kind to give some hints on how to test it?
That comment likely predates `.reloc` support for RISC-V. You use `.reloc` like:
.reloc 1f, R_RISCV_SET6, foo
1: .byte 0
i.e. it takes the location to relocate, the relocation name and the value to use
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117082/new/
https://reviews.llvm.org/D117082
More information about the llvm-commits
mailing list