1# REQUIRES: ppc 2# RUN: split-file %s %t 3# RUN: llvm-mc -filetype=obj -triple=ppc64le %t/asm -o %t.o 4# RUN: not ld.lld --script %t/lds %t.o -o %t1 2>&1 | FileCheck %s 5# RUN: ld.lld --script %t/lds %t.o -o %t1 --noinhibit-exec 6# RUN: rm %t.o %t1 7# RUN: llvm-mc -filetype=obj -triple=ppc64le -defsym HIDDEN=1 %t/asm -o %t.o 8# RUN: not ld.lld -shared --script %t/lds %t.o -o %t1 2>&1 | FileCheck %s 9# RUN: ld.lld -shared --script %t/lds %t.o -o %t1 --noinhibit-exec 10# RUN: rm %t.o %t1 11 12# RUN: llvm-mc -filetype=obj -triple=ppc64 %t/asm -o %t.o 13# RUN: not ld.lld --script %t/lds %t.o -o %t1 2>&1 | FileCheck %s 14# RUN: ld.lld --script %t/lds %t.o -o %t1 --noinhibit-exec 15# RUN: rm %t.o %t1 16# RUN: llvm-mc -filetype=obj -triple=ppc64 -defsym HIDDEN=1 %t/asm -o %t.o 17# RUN: not ld.lld -shared --script %t/lds %t.o -o %t1 2>&1 | FileCheck %s 18# RUN: ld.lld -shared --script %t/lds %t.o -o %t1 --noinhibit-exec 19# RUN: rm %t.o %t1 20 21# CHECK: error: PC-relative long branch stub offset is out of range: 8589934592 is not in [-8589934592, 8589934591]; references high 22# CHECK-NEXT: >>> defined in {{.*}}.o 23 24//--- asm 25.section .text_low, "ax", %progbits 26.globl _start 27_start: 28 bl high@notoc 29 blr 30 31.section .text_high, "ax", %progbits 32.ifdef HIDDEN 33.hidden high 34.endif 35.globl high 36high: 37 blr 38 39//--- lds 40PHDRS { 41 low PT_LOAD FLAGS(0x1 | 0x4); 42 high PT_LOAD FLAGS(0x1 | 0x4); 43} 44SECTIONS { 45 .text_low 0x2000 : { *(.text_low) } :low 46 .text_high 0x200002010 : { *(.text_high) } :high 47} 48