[PATCH] D149526: [JITLink][RISCV] Implement linker relaxation
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 2 13:00:13 PDT 2023
MaskRay added a comment.
> @MaskRay: I've added you as a reviewer since you're the original author of the LLD algorithm. The algorithm in this patch is mostly the same as yours but I made some minor modifications. The main one is that I got rid of the valueDelta map you use in relax() to keep track of of the deltas of symbols in the previous iteration in order to correctly update symbol values. I believe this is unnecessary and the same can be accomplished by using the original symbol value stored in offset field in its anchor. When making the same change in LLD, all tests still pass.
See 6b1d151fe3dc530195d8802f1ecc247c8235dd3a <https://reviews.llvm.org/rG6b1d151fe3dc530195d8802f1ecc247c8235dd3a> for `lld/ELF/Arch/RISCV.cpp:valueDelta`.
`lld/test/ELF/riscv-relax-call-intra-sec.s` (use `ninja check-lld-elf`) will fail if you reset a symbol value to the original value.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149526/new/
https://reviews.llvm.org/D149526
More information about the llvm-commits
mailing list