54 lines · plain
1# REQUIRES: ppc2# RUN: echo 'SECTIONS { \3# RUN: .text_low 0x2000: { *(.text_low) } \4# RUN: .text_high 0x2002000 : { *(.text_high) } \5# RUN: }' > %t.script6 7# RUN: llvm-mc -filetype=obj -triple=ppc64le %s -o %t.o8# RUN: ld.lld -T %t.script %t.o -o %t9# RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s10 11# RUN: llvm-mc -filetype=obj -triple=ppc64le -defsym HIDDEN=1 %s -o %t.o12# RUN: ld.lld -shared -T %t.script %t.o -o %t.so13# RUN: llvm-objdump -d --no-show-raw-insn %t.so | FileCheck %s14 15# RUN: llvm-mc -filetype=obj -triple=ppc64 %s -o %t.o16# RUN: ld.lld -T %t.script %t.o -o %t17# RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s18 19# RUN: llvm-mc -filetype=obj -triple=ppc64 -defsym HIDDEN=1 %s -o %t.o20# RUN: ld.lld -shared -T %t.script %t.o -o %t.so21# RUN: llvm-objdump -d --no-show-raw-insn %t.so | FileCheck %s22# RUN: llvm-readelf --dynamic %t.so | FileCheck --check-prefix=READELF %s23 24# CHECK-LABEL: <_start>:25# CHECK-NEXT: 2000: bl 0x201026# CHECK-NEXT: blr27# CHECK-NEXT: trap28# CHECK-NEXT: trap29 30## Callee address - program counter = 0x2002000 - 0x2010 = 3355441631# CHECK-LABEL: <__gep_setup_high>:32# CHECK-NEXT: 2010: paddi 12, 0, 33554416, 133# CHECK-NEXT: mtctr 1234# CHECK-NEXT: bctr35 36# CHECK-LABEL: <high>:37# CHECK-NEXT: 2002000: blr38 39# READELF: (PPC64_OPT) 0x240 41.section .text_low, "ax", %progbits42.globl _start43_start:44 bl high@notoc45 blr46 47.section .text_high, "ax", %progbits48.ifdef HIDDEN49.hidden high50.endif51.globl high52high:53 blr54