46 lines · plain
1// REQUIRES: arm2// RUN: llvm-mc -filetype=obj -triple=armv7a-linux-gnueabihf --arm-add-build-attributes %s -o %t.o3// RUN: ld.lld --fix-cortex-a8 -verbose %t.o -o /dev/null 2>&1 | FileCheck %s4/// Test that we warn, but don't attempt to patch when it is impossible to5/// redirect the branch as the Section is too large.6 7// CHECK: skipping cortex-a8 657417 erratum sequence, section .text is too large to patch8// CHECK: skipping cortex-a8 657417 erratum sequence, section .text.02 is too large to patch9 10 .syntax unified11 .thumb12/// Case 1: 1 MiB conditional branch range without relocation.13 .text14 .global _start15 .type _start, %function16 .balign 409617 .thumb_func18_start:19 nop.w20 .space 408621 .thumb_func22 .global target23 .type target, %function24target:25/// 32-bit Branch spans 2 4KiB regions, preceded by a 32-bit non branch26/// instruction, a patch will be attempted. Unfortunately the branch27/// cannot reach outside the section so we have to abort the patch.28 nop.w29 beq.w target30 .space 1024 * 102431 32/// Case 2: 16 MiB33 .section .text.01, "ax", %progbits34 .balign 409635 .space 409036 .global target237 .thumb_func38target2:39 .section .text.02, "ax", %progbits40/// 32-bit Branch and link spans 2 4KiB regions, preceded by a 32-bit41/// non branch instruction, a patch will be attempted. Unfortunately the42/// the BL cannot reach outside the section so we have to abort the patch.43 nop.w44 bl target245 .space 16 * 1024 * 102446