[lld] [LLD][ARM] Allow R_ARM_SBREL32 relocations in debug info (PR #116956)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 20 09:23:48 PST 2024


================
@@ -1092,7 +1092,7 @@ void InputSection::relocateNonAlloc(Ctx &ctx, uint8_t *buf,
     // R_ABS/R_DTPREL and some other relocations can be used from non-SHF_ALLOC
     // sections.
     if (LLVM_LIKELY(expr == R_ABS) || expr == R_DTPREL || expr == R_GOTPLTREL ||
-        expr == R_RISCV_ADD) {
+        expr == R_RISCV_ADD || expr == R_ARM_SBREL) {
----------------
MaskRay wrote:

(In the future, we should move relocateNonAlloc to be target-specific into Arch/ )

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


More information about the llvm-commits mailing list