[lld] lld/AArch64: handle more relocation addends (PR #87328)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 9 12:41:07 PDT 2024
================
@@ -1,8 +1,36 @@
## Test certain REL relocation types generated by legacy armasm.
# RUN: yaml2obj %s -o %t.o
-# RUN: not ld.lld %t.o -o /dev/null 2>&1 | FileCheck %s
+# RUN: ld.lld %t.o -o %t
+# RUN: llvm-objdump -s %t | FileCheck %s
-# CHECK-COUNT-17: internal linker error: cannot read addend
+# CHECK: Contents of section .abs:
+# CHECK-NEXT: 2000e8 29002800 00002700 00000000 0000fcff ).(...'.........
+# CHECK-NEXT: 2000f8 ffffffff ffff ......
+# CHECK-NEXT: Contents of section .uabs:
+# CHECK-NEXT: 200100 40ffffff 40ffffff 20ffffff 20ffffff @... at ... ... ...
+# CHECK-NEXT: 200110 00ffffff 00ffffff ........
+# CHECK-NEXT: Contents of section .prel:
+# CHECK-NEXT: 200118 00ffffff fcfeffff f8feffff a0ffffff ................
+# CHECK-NEXT: 200128 0010009f 0010009f ........
+# CHECK-NEXT: Contents of section .branch:
+# CHECK-NEXT: 200130 f0ffffff f0ffffff fdffffff fcffff14 ................
+# CHECK-NEXT: Contents of section .comment:
----------------
MaskRay wrote:
Just check .abs, .uabs, .prel, .branch, and omit unrelated sections (.comment, .strtab, etc)
https://github.com/llvm/llvm-project/pull/87328
More information about the llvm-commits
mailing list