aboutsummaryrefslogtreecommitdiff
path: root/test/ELF/arm-thumb-branch-error.s
blob: de6c1bc16c96f03af64c18539d726a416163efb7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// RUN: llvm-mc -filetype=obj -triple=thumbv7a-none-linux-gnueabi %s -o %t
// RUN: llvm-mc -filetype=obj -triple=thumbv7a-none-linux-gnueabi %S/Inputs/far-arm-thumb-abs.s -o %tfar
// RUN: not ld.lld  %t %tfar -o %t2 2>&1 | FileCheck %s
// REQUIRES: arm
 .syntax unified
 .section .text, "ax",%progbits
 .globl _start
 .balign 0x10000
 .type _start,%function
_start:
 // address of too_far symbols are just out of range of ARM branch with
 // 26-bit immediate field and an addend of -8
 bl  too_far1
 b   too_far2
 beq.w too_far3

// CHECK: R_ARM_THM_CALL out of range
// CHECK-NEXT: R_ARM_THM_JUMP24 out of range
// CHECK-NEXT: R_ARM_THM_JUMP19 out of range