Fangrui Song | b6772b8 | 2018-06-26 22:20:04 | [diff] [blame] | 1 | // REQUIRES: arm |
Peter Smith | d1be026 | 2018-08-20 09:19:30 | [diff] [blame] | 2 | // RUN: llvm-mc -arm-add-build-attributes -filetype=obj -triple=arm-none-linux-gnueabi %s -o %t |
Fangrui Song | 40a9f22 | 2018-07-02 17:48:23 | [diff] [blame] | 3 | // RUN: ld.lld %t -o /dev/null 2>&1 | FileCheck %s |
Peter Smith | 57eb046 | 2017-11-28 13:51:48 | [diff] [blame] | 4 | |
| 5 | // On Arm v4t there is no blx instruction so all interworking must go via |
| 6 | // a thunk. At present we don't support v4t so we give a warning for unsupported |
| 7 | // features. |
| 8 | |
Rui Ueyama | 9db0642 | 2018-10-25 18:07:55 | [diff] [blame] | 9 | // CHECK: warning: lld uses blx instruction, no object with architecture supporting feature detected |
Peter Smith | 57eb046 | 2017-11-28 13:51:48 | [diff] [blame] | 10 | |
| 11 | .text |
| 12 | .syntax unified |
| 13 | .cpu arm7tdmi |
Peter Smith | 57eb046 | 2017-11-28 13:51:48 | [diff] [blame] | 14 | .arm |
| 15 | .globl _start |
| 16 | .type _start,%function |
| 17 | .p2align 2 |
| 18 | _start: |
| 19 | bl thumbfunc |
| 20 | bx lr |
| 21 | |
| 22 | .thumb |
| 23 | .section .text.2, "ax", %progbits |
| 24 | .globl thumbfunc |
| 25 | .type thumbfunc,%function |
| 26 | thumbfunc: |
| 27 | bx lr |