[lld] [LLD][RISCV] Error on PCREL_LO referencing other Section (PR #107558)
Sam Elliott via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 6 03:40:48 PDT 2024
lenary wrote:
Some notes on how I fixed this:
- The function which does the other validation of `PCREL_LO` relocations is `getRISCVPCRelHi20` - but it, and where it is called from (`InputSectionBase::getRelocTargetVA`) do not have access to the input section, for comparison with the section of the symbol referenced by the relocation. Changing this seems quite an invasive change (likely needing to make `getRelocTargetVA` non-static, changing quite a few call sites)
- I've been fairly indecisive about whether this should be an `errorOrWarn`, or a `warn`. Guidance about which is preferred would be helpful.
https://github.com/llvm/llvm-project/pull/107558
More information about the llvm-commits
mailing list