39 lines · plain
1// REQUIRES: arm2// RUN: llvm-mc --triple=armv7a-linux-gnueabihf -arm-add-build-attributes -filetype=obj -o %t.o %s3// RUN: ld.lld %t.o --defsym sym=0x13001 -o %t 2>&1 | FileCheck %s --check-prefix=WARN4// RUN: llvm-objdump --no-show-raw-insn -d %t | FileCheck %s5 6/// A similar test to arm-thumb-interwork-notfunc.s this time exercising the7/// case where a symbol does not have type STT_FUNC but it does have the bottom8/// bit set. We use absolute symbols to represent assembler labels as the9/// minimum alignment of a label in code is 2.10.syntax unified11.global sym12.global _start13.type _start, %function14.text15.balign 0x100016_start:17arm_caller:18.arm19 b sym20 bl sym21// WARN: branch and link relocation: R_ARM_CALL to non STT_FUNC symbol: sym interworking not performed; consider using directive '.type sym, %function' to give symbol type STT_FUNC if interworking between ARM and Thumb is required22 blx sym23.thumb24thumb_caller:25 b sym26 bl sym27 blx sym28// WARN: branch and link relocation: R_ARM_THM_CALL to non STT_FUNC symbol: sym interworking not performed; consider using directive '.type sym, %function' to give symbol type STT_FUNC if interworking between ARM and Thumb is required29 30// CHECK: 00021000 <arm_caller>:31// CHECK-NEXT: 21000: b 0x1300032// CHECK-NEXT: 21004: bl 0x1300033// CHECK-NEXT: 21008: blx 0x1300034 35// CHECK: 0002100c <thumb_caller>:36// CHECK-NEXT: 2100c: b.w 0x1300037// CHECK-NEXT: 21010: bl 0x1300038// CHECK-NEXT: 21014: blx 0x1300439