2 // RUN: llvm-mc -arm-add-build-attributes -filetype=obj -triple=armv7a-none-linux-gnueabi %s -o %t.o
3 // RUN: echo "SECTIONS { \
4 // RUN: .text_armfunc 0x1000 : { *(.text_armfunc) } \
5 // RUN: .text_thumbfunc 0x11010 : { *(.text_thumbfunc) } \
6 // RUN: }" > %tarm_to_thumb.script
7 // RUN: echo "SECTIONS { \
8 // RUN: .text_thumbfunc 0x1000 : { *(.text_thumbfunc) } \
9 // RUN: .text_armfunc 0x1100c : { *(.text_armfunc) } \
10 // RUN: }" > %tthumb_to_arm.script
11 // RUN: ld.lld -shared -Bsymbolic -script %tarm_to_thumb.script %t.o -o %tarm_to_thumb.so
12 // RUN: ld.lld -shared -Bsymbolic -script %tthumb_to_arm.script %t.o -o %tthumb_to_arm.so
13 // RUN: llvm-objdump -triple=armv7a-none-linux-gnueabi -d %tarm_to_thumb.so | FileCheck -check-prefix=ARM-TO-THUMB %s
14 // RUN: llvm-objdump -triple=thumbv7a-none-linux-gnueabi -d %tthumb_to_arm.so | FileCheck -check-prefix=THUMB-TO-ARM %s
19 .section .text_armfunc, "ax", %progbits
25 .section .text_thumbfunc, "ax", %progbits
31 // ARM-TO-THUMB: __ARMV7PILongThunk_thumbfunc:
32 // ARM-TO-THUMB-NEXT: 1004: fd cf 0f e3 movw r12, #65533
33 // ARM-TO-THUMB-NEXT: 1008: 00 c0 40 e3 movt r12, #0
35 // THUMB-TO-ARM: __ThumbV7PILongThunk_armfunc:
36 // THUMB-TO-ARM-NEXT: 1004: 4f f6 fc 7c movw r12, #65532
37 // THUMB-TO-ARM-NEXT: 1008: c0 f2 00 0c movt r12, #0