1// REQUIRES: arm 2// RUN: llvm-mc --triple=armv7a-linux-gnueabihf -arm-add-build-attributes -filetype=obj -o %t.o %s 3// RUN: ld.lld %t.o --defsym sym=0x13001 -o %t 2>&1 | FileCheck %s --check-prefix=WARN 4// RUN: llvm-objdump --no-show-raw-insn -d %t | FileCheck %s 5 6/// A similar test to arm-thumb-interwork-notfunc.s this time exercising the 7/// case where a symbol does not have type STT_FUNC but it does have the bottom 8/// bit set. We use absolute symbols to represent assembler labels as the 9/// minimum alignment of a label in code is 2. 10.syntax unified 11.global sym 12.global _start 13.type _start, %function 14.text 15.balign 0x1000 16_start: 17arm_caller: 18.arm 19 b sym 20 bl sym 21// 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 required 22 blx sym 23.thumb 24thumb_caller: 25 b sym 26 bl sym 27 blx sym 28// 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 required 29 30// CHECK: 00021000 <arm_caller>: 31// CHECK-NEXT: 21000: b #-57352 32// CHECK-NEXT: 21004: bl #-57356 33// CHECK-NEXT: 21008: blx #-57360 34 35// CHECK: 0002100c <thumb_caller>: 36// CHECK-NEXT: 2100c: b.w #-57360 37// CHECK-NEXT: 21010: bl #-57364 38// CHECK-NEXT: 21014: blx #-57364 39