1// REQUIRES: arm 2// RUN: llvm-mc %s --arm-add-build-attributes --triple=armv7a-linux-gnueabihf --filetype=obj -o %t.o 3// RUN: ld.lld %t.o -o %t 4// RUN: llvm-objdump -d --start-address=0x2200b4 --stop-address=0x2200be %t | FileCheck %s 5 6// RUN: llvm-mc %s --arm-add-build-attributes --triple=armv7aeb-linux-gnueabihf --filetype=obj -mcpu=cortex-a8 -o %t.o 7// RUN: ld.lld %t.o -o %t 8// RUN: llvm-objdump -d --start-address=0x2200b4 --stop-address=0x2200be %t | FileCheck %s 9// RUN: ld.lld --be8 %t.o -o %t 10// RUN: llvm-objdump -d --start-address=0x2200b4 --stop-address=0x2200be %t | FileCheck %s 11 12 /// Create a conditional branch too far away from a precreated thunk 13 /// section. This will need a thunk section created within range. 14 .syntax unified 15 .thumb 16 17 .section .text.0, "ax", %progbits 18 .space 2 * 1024 * 1024 19 .globl _start 20 .type _start, %function 21_start: 22 /// Range of +/- 1 Megabyte, new ThunkSection will need creating after 23 /// .text.1 24 beq.w target 25 .section .text.1, "ax", %progbits 26 bx lr 27 28// CHECK: <_start>: 29// CHECK-NEXT: 2200b4: f000 8000 beq.w 0x2200b8 <__Thumbv7ABSLongThunk_target> 30// CHECK: <__Thumbv7ABSLongThunk_target>: 31// CHECK-NEXT: 2200b8: f000 9001 b.w 0xe200be <target> 32// CHECK: 2200bc: 4770 bx lr 33 34 .section .text.2, "ax", %progbits 35 .space 12 * 1024 * 1024 36 .globl target 37 .type target, %function 38target: bx lr 39