[lld] [lld][ELF] Support relax R_LARCH_ALIGN (PR #78692)

Lu Weining via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 4 00:41:01 PST 2024


SixWeining 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`.

https://github.com/llvm/llvm-project/pull/78692


More information about the llvm-commits mailing list