[llvm-branch-commits] ELF: Introduce R_AARCH64_PATCHINST relocation type. (PR #133534)

Fangrui Song via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sat Aug 9 11:04:37 PDT 2025


================
@@ -0,0 +1,7 @@
+// RUN: llvm-mc -triple aarch64-elf -filetype=obj %s -o - | llvm-objdump -r - | FileCheck %s
+
+// Test that PATCHINST appears after JUMP26.
+// CHECK:      R_AARCH64_JUMP26
+// CHECK-NEXT: R_AARCH64_PATCHINST
+.reloc ., R_AARCH64_PATCHINST, ds
+b f1
----------------
MaskRay wrote:

Improve the test to test that with more than one fragments and more than one PATCHINST, the relocations are still ordered.
```
.reloc ., R_AARCH64_PATCHINST, ds
b f1
.balign 8
.reloc ., R_AARCH64_PATCHINST, ds
b f2
```

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


More information about the llvm-branch-commits mailing list