2018-06-27 06:20:04 +08:00
|
|
|
// REQUIRES: arm
|
2018-08-20 17:19:30 +08:00
|
|
|
// RUN: llvm-mc -arm-add-build-attributes -filetype=obj -triple=arm-none-linux-gnueabi %s -o %t
|
2018-07-03 01:48:23 +08:00
|
|
|
// RUN: ld.lld %t -o /dev/null 2>&1 | FileCheck %s
|
2017-11-28 21:51:48 +08:00
|
|
|
|
|
|
|
// On Arm v4t there is no blx instruction so all interworking must go via
|
|
|
|
// a thunk. At present we don't support v4t so we give a warning for unsupported
|
|
|
|
// features.
|
|
|
|
|
2018-10-26 02:07:55 +08:00
|
|
|
// CHECK: warning: lld uses blx instruction, no object with architecture supporting feature detected
|
2017-11-28 21:51:48 +08:00
|
|
|
|
|
|
|
.text
|
|
|
|
.syntax unified
|
|
|
|
.cpu arm7tdmi
|
|
|
|
.arm
|
|
|
|
.globl _start
|
|
|
|
.type _start,%function
|
|
|
|
.p2align 2
|
|
|
|
_start:
|
|
|
|
bl thumbfunc
|
|
|
|
bx lr
|
|
|
|
|
|
|
|
.thumb
|
|
|
|
.section .text.2, "ax", %progbits
|
|
|
|
.globl thumbfunc
|
|
|
|
.type thumbfunc,%function
|
|
|
|
thumbfunc:
|
|
|
|
bx lr
|