[PATCH] D134164: [RelocationResolver] Add R_RISCV_SET8
Liao Chunyu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 20 20:18:16 PDT 2022
liaolucy added a subscriber: alexfanqi.
liaolucy added a comment.
In D134164#3800198 <https://reviews.llvm.org/D134164#3800198>, @MaskRay wrote:
> Is there a test using this relocation type? We don't add unneeded ones.
Sorry, I can't find a .ll file to emit R_RISCV_SET8. Any suggestions?
https://github.com/llvm/llvm-project/blob/main/llvm/test/DebugInfo/RISCV/relax-debug-frame.ll emits R_RISCV_SET6, If R_RISCV_SET6 is not included in RelocationResolver.cpp, llvm-dwarfdump has the following error. I guess R_RISCV_SET8 may have a similar error.
warning: failed to compute relocation: R_RISCV_SET6, Invalid data was encountered while parsing the file
In addition, this question comes from Julia(like: https://github.com/JuliaLang/julia/issues/35460) @alexfanqi is helping to find testcases.
================
Comment at: llvm/lib/Object/RelocationResolver.cpp:468
+ case ELF::R_RISCV_SET8:
+ return (A & 0x00) | ((S + RA) & 0xFF);
case ELF::R_RISCV_SUB6:
----------------
tschuett wrote:
> Is the `0x00` a typo or for symmetry?
Thanks, updated
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134164/new/
https://reviews.llvm.org/D134164
More information about the llvm-commits
mailing list