brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · e0be082 Raw
47 lines · plain
1# REQUIRES: ppc2 3# RUN: llvm-mc -filetype=obj -triple=powerpc64-pc-freebsd13.0 %s -o %t.o4# RUN: ld.lld %t.o -o %t5# RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s6 7## .init consists of sections from several object files. Sections other than the8## last one do not have a terminator. Check we do not create a long branch stub9## in the middle.10## We currently use thunk section spacing to ensure the stub is in the end. This11## is not foolproof but good enough to not break in practice.12 13# CHECK: Disassembly of section .init:14# CHECK-EMPTY:15# CHECK-LABEL: <_init>:16# CHECK:         blr17# CHECK-NEXT:    trap18# CHECK-NEXT:    trap19# CHECK-EMPTY:20# CHECK-LABEL: <__long_branch_foo>:21 22.globl foo23foo:24  .space 0x200000025  blr26 27.section .init,"ax",@progbits,unique,028.globl _init29_init:30  stdu 1, -48(1)31  mflr 032  std 0, 64(1)33 34.section .init,"ax",@progbits,unique,135  bl foo36  nop37 38.section .init,"ax",@progbits,unique,239  bl foo40  nop41 42.section .init,"ax",@progbits,unique,343  ld 1, 0(1)44  ld 0, 16(1)45  mtlr 046  blr47