Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / ELF / arm-thunk-section-too-large.s
blobc6c058085968d3c6da66e0432d3a9eca9171844d
1 // REQUIRES: arm
2 // RUN: llvm-mc %s -triple=armv7a-linux-gnueabihf -arm-add-build-attributes -filetype=obj -o %t.o
3 // RUN: not ld.lld %t.o -o /dev/null 2>&1 | FileCheck %s
5 // RUN: llvm-mc %s -triple=armv7aeb-linux-gnueabihf -arm-add-build-attributes -filetype=obj -mcpu=cortex-a8 -o %t.o
6 // RUN: not ld.lld %t.o -o /dev/null 2>&1 | FileCheck %s
7 // RUN: not ld.lld --be8 %t.o -o /dev/null 2>&1 | FileCheck %s
9 // CHECK: InputSection too large for range extension thunk
10 .syntax unified
11 .thumb
12 .text
13 .globl _start
14 .type _start, %function
15 _start:
16 .space 2 * 1024 * 1024
17 // conditional branch has range of 1 Mb expect error as we can't place
18 // a thunk in range of the branch.
19 beq target
20 .space 2 * 1024 * 1024
22 .section .text.2, "ax", %progbits
23 .globl target
24 .type target, %function
25 target: bx lr