brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 24fb80f Raw
42 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 --shared %t.o -o %t24// RUN: llvm-objdump --no-print-imm-hex -d --no-show-raw-insn %t2 | FileCheck %s5 6/// Test case that for an OutputSection larger than the ThunkSectionSpacing7/// --fix-cortex-a8 will cause the size of the ThunkSection to be rounded up to8/// the nearest 4KiB9 .thumb10 11 .section .text.01, "ax", %progbits12 .balign 409613 .globl _start14 .type _start, %function15_start:16  /// state change thunk required17  b.w arm_func18thumb_target:19  .space 4096 - 1020  /// erratum patch needed21  nop.w22  b.w thumb_target23 24/// Expect thunk and patch to be inserted here25// CHECK:  00012004 <__ThumbV7PILongThunk_arm_func>:26// CHECK-NEXT: 12004: movw    r12, #408827// CHECK-NEXT:        movt    r12, #25628// CHECK-NEXT:        add     r12, pc29// CHECK-NEXT:        bx      r1230// CHECK:  00013004 <__CortexA8657417_11FFE>:31// CHECK-NEXT: 13004: b.w     0x11004 <thumb_target>32 .section .text.0233 /// Take us over thunk section spacing34 .space 16 * 1024 * 102435 36 .section .text.03, "ax", %progbits37 .arm38 .balign 439 .type arm_func, %function40arm_func:41  bx lr42