[llvm] [LoongArch] Support R_LARCH_{ADD, SUB}_ULEB128 for .uleb128 and force relocs when sym is not in section (PR #76433)

Jinyang He via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 6 00:58:39 PST 2024


MQ-mengqing wrote:

> Assemblers and linkers can enjoy simplification from having `R_LARCH_SET_ULEB128` defined the same as `R_RISCV_SET_ULEB128`.

If LoongArch not guarantee that ADD and SUB appear in pairs, I think LoongArch can enjoy this simplification by only creating ADD relocation type. In further, for `.byte`, `.2byte`, `.4byte`, `.8byte` and `.uleb128` we can just create ADD{8,16,32,64,ULEB128} in assembly stage with GNU assembler ensuring those directive create zero padding.

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


More information about the llvm-commits mailing list