39 lines · plain
1// REQUIRES: arm2// RUN: llvm-mc %s --arm-add-build-attributes --triple=armv7a-linux-gnueabihf --filetype=obj -o %t.o3// RUN: ld.lld %t.o -o %t4// RUN: llvm-objdump -d --start-address=0x2200b4 --stop-address=0x2200be %t | FileCheck %s5 6// RUN: llvm-mc %s --arm-add-build-attributes --triple=armv7aeb-linux-gnueabihf --filetype=obj -mcpu=cortex-a8 -o %t.o7// RUN: ld.lld %t.o -o %t8// RUN: llvm-objdump -d --start-address=0x2200b4 --stop-address=0x2200be %t | FileCheck %s9// RUN: ld.lld --be8 %t.o -o %t10// RUN: llvm-objdump -d --start-address=0x2200b4 --stop-address=0x2200be %t | FileCheck %s11 12 /// Create a conditional branch too far away from a precreated thunk13 /// section. This will need a thunk section created within range.14 .syntax unified15 .thumb16 17 .section .text.0, "ax", %progbits18 .space 2 * 1024 * 102419 .globl _start20 .type _start, %function21_start:22 /// Range of +/- 1 Megabyte, new ThunkSection will need creating after23 /// .text.124 beq.w target25 .section .text.1, "ax", %progbits26 bx lr27 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 lr33 34 .section .text.2, "ax", %progbits35 .space 12 * 1024 * 102436 .globl target37 .type target, %function38target: bx lr39