[llvm] Do not replace dead constant references in metadata with undef
[llvm-project.git] / lld / test / ELF / arm-thunk-section-too-large.s
blob62b59de51a0d8af3afb65dba85e9902da8c6b18a
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 // CHECK: InputSection too large for range extension thunk
6 .syntax unified
7 .thumb
8 .text
9 .globl _start
10 .type _start, %function
11 _start:
12 .space 2 * 1024 * 1024
13 // conditional branch has range of 1 Mb expect error as we can't place
14 // a thunk in range of the branch.
15 beq target
16 .space 2 * 1024 * 1024
18 .section .text.2, "ax", %progbits
19 .globl target
20 .type target, %function
21 target: bx lr