32 lines · plain
1# REQUIRES: ppc2 3# RUN: llvm-mc -filetype=obj -triple=powerpc64le-linux %s -o %t.o4# RUN: ld.lld %t.o -z separate-code -o %t.ppc64le5# RUN: llvm-readelf -Sl %t.ppc64le | FileCheck %s6# RUN: od -Ax -t x1 -N16 -j0x1fff0 %t.ppc64le | FileCheck %s -check-prefix=LE7 8# RUN: llvm-mc -filetype=obj -triple=powerpc64-linux %s -o %t.o9# RUN: ld.lld %t.o -z separate-code -o %t.ppc6410# RUN: llvm-readelf -Sl %t.ppc64 | FileCheck %s11# RUN: od -Ax -t x1 -N16 -j0x1fff0 %t.ppc64 | FileCheck %s -check-prefix=BE12 13# CHECK: [Nr] Name Type Address Off Size ES Flg Lk Inf Al14# CHECK-NEXT: [ 0] NULL 0000000000000000 000000 000000 00 0 0 015# CHECK-NEXT: [ 1] .text PROGBITS 0000000010010000 010000 000004 00 AX 0 0 416## TODO Remove empty .branch_lt17# CHECK-NEXT: [ 2] .branch_lt PROGBITS 0000000010020000 020000 000000 00 WA 0 0 818# CHECK-NEXT: [ 3] .comment PROGBITS 0000000000000000 020000 000008 01 MS 0 0 119 20# CHECK: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align21# CHECK-NEXT: PHDR 0x000040 0x0000000010000040 0x0000000010000040 0x000118 0x000118 R 0x822# CHECK-NEXT: LOAD 0x000000 0x0000000010000000 0x0000000010000000 0x000158 0x000158 R 0x1000023# CHECK-NEXT: LOAD 0x010000 0x0000000010010000 0x0000000010010000 0x010000 0x010000 R E 0x1000024 25## Check that executable page is filled with traps at its end.26# LE: 01fff0 08 00 e0 7f 08 00 e0 7f 08 00 e0 7f 08 00 e0 7f27# BE: 01fff0 7f e0 00 08 7f e0 00 08 7f e0 00 08 7f e0 00 0828 29.globl _start30_start:31 nop32