[lld] [lld][ARM] Fix assertion when mixing ARM and Thumb objects (PR #101985)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 5 10:18:28 PDT 2024


================
@@ -0,0 +1,44 @@
+# REQUIRES: arm
+
+# RUN: rm -rf %t && split-file %s %t
+# RUN: llvm-mc -filetype=obj -arm-add-build-attributes -triple=armv7a-none-linux-gnueabi %t/a.s -o %t1.o
+# RUN: llvm-mc -filetype=obj -arm-add-build-attributes -triple=armv7a-none-linux-gnueabi %t/b.s -o %t2.o
+# RUN: ld.lld -shared %t1.o %t2.o -o %t.so
+# RUN: llvm-objdump -d %t.so | FileCheck %s
+
+# Check that, when the input is a mixture of objects which can and cannot use
+# the ARM ISA, we use the default ARM PLT sequences.
+
+# CHECK:      000101d0 <.plt>:
+# CHECK-NEXT: 101d0: e52de004      str     lr, [sp, #-0x4]!
----------------
MaskRay wrote:

The leading addresses are not significant and are omitted for new tests

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


More information about the llvm-commits mailing list