[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / ELF / arm-thumb-interwork-abs.s
blob8010cc3625b24dab924a8bcc0adacffea8bc5397
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
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:
17 arm_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
24 thumb_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
30 // CHECK: 00021000 <arm_caller>:
31 // CHECK-NEXT: 21000: b 0x13000
32 // CHECK-NEXT: 21004: bl 0x13000
33 // CHECK-NEXT: 21008: blx 0x13000
35 // CHECK: 0002100c <thumb_caller>:
36 // CHECK-NEXT: 2100c: b.w 0x13000
37 // CHECK-NEXT: 21010: bl 0x13000
38 // CHECK-NEXT: 21014: blx 0x13004