[lld] [lld][ELF] Support relax R_LARCH_ALIGN (PR #78692)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 4 00:44:49 PST 2024
MaskRay wrote:
> > > I'd suggest make some tests to see if `--gc-section` works with relaxation. In the BFD linker we found `--gc-section` is somehow broken now with relaxation :(
> >
> >
> > With lld's structure, a `--gc-sections` test is not necessary. I'd add one test like `lld/test/ELF/riscv-relax-emit-relocs.s`
>
> But `--emit-relocs` doesn't work because R_LARCH_RELAX is ignored by `return R_NONE;` in `LoongArch::getRelExpr`.
Just test the current behavior, so that a future change supporting `R_LARCH_RELAX` can demonstrate the effect.
https://github.com/llvm/llvm-project/pull/78692
More information about the llvm-commits
mailing list