49 lines · plain
1# REQUIRES: ppc2# RUN: split-file %s %t3# RUN: llvm-mc -filetype=obj -triple=ppc64le %t/asm -o %t.o4# RUN: not ld.lld --script %t/lds %t.o -o %t1 2>&1 | FileCheck %s5# RUN: ld.lld --script %t/lds %t.o -o %t1 --noinhibit-exec6# RUN: rm %t.o %t17# RUN: llvm-mc -filetype=obj -triple=ppc64le -defsym HIDDEN=1 %t/asm -o %t.o8# RUN: not ld.lld -shared --script %t/lds %t.o -o %t1 2>&1 | FileCheck %s9# RUN: ld.lld -shared --script %t/lds %t.o -o %t1 --noinhibit-exec10# RUN: rm %t.o %t111 12# RUN: llvm-mc -filetype=obj -triple=ppc64 %t/asm -o %t.o13# RUN: not ld.lld --script %t/lds %t.o -o %t1 2>&1 | FileCheck %s14# RUN: ld.lld --script %t/lds %t.o -o %t1 --noinhibit-exec15# RUN: rm %t.o %t116# RUN: llvm-mc -filetype=obj -triple=ppc64 -defsym HIDDEN=1 %t/asm -o %t.o17# RUN: not ld.lld -shared --script %t/lds %t.o -o %t1 2>&1 | FileCheck %s18# RUN: ld.lld -shared --script %t/lds %t.o -o %t1 --noinhibit-exec19# RUN: rm %t.o %t120 21## Note: GNU ld uses sldi 11, 11, 34 and add 12, 11, 12 to support offsets beyond +-2**33.22# CHECK: error: R12 setup stub offset is out of range: 8589934592 is not in [-8589934592, 8589934591]; references 'high'23# CHECK-NEXT: >>> defined in {{.*}}.o24 25//--- asm26.section .text_low, "ax", %progbits27.globl _start28_start:29 bl high@notoc30 blr31 32.section .text_high, "ax", %progbits33.ifdef HIDDEN34.hidden high35.endif36.globl high37high:38 blr39 40//--- lds41PHDRS {42 low PT_LOAD FLAGS(0x1 | 0x4);43 high PT_LOAD FLAGS(0x1 | 0x4);44}45SECTIONS {46 .text_low 0x2000 : { *(.text_low) } :low47 .text_high 0x200002010 : { *(.text_high) } :high48}49