[PATCH] D142880: [RISCV][LLD] Support R_RISCV_SET_ULEB128 and R_RISCV_SUB_ULEB128
Kito Cheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 8 08:36:34 PDT 2023
kito-cheng planned changes to this revision.
kito-cheng added a comment.
I am cooking some better way to resolve this, relocateNonAlloc case is harder to handle than I think.
Some ideas I tried:
- Introduce global variable to record prev relocation, binutils implementation this trick, but I know it's bad idea in lld, so I am not plan to going this way.
- Did ULEB128 relocation at elf::riscvFinalizeRelax, which will cause performance issue, more memory usage...and also kind of layer violation, I have workable patch for this, but I don't think it's acceptable (I won't accept that if I am reviewer too...:P)
- Pass pointer to Relocation rather than reference for TargetInfo::relocate(), so that I can get last relocation *in theory*, but I found it not work since `relocateNoSym` will pass local variable...
- Introduce new API into TargetInfo: TargetInfo::relocatePair(), I am working on this approach now, just need few more time to cook to patch, I guess this should be better than above approach.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142880/new/
https://reviews.llvm.org/D142880
More information about the llvm-commits
mailing list