brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.8 KiB · 4f370dd Raw
96 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=powerpc %s -o %t.o8# RUN: ld.lld -T %t.script %t.o -o %t9# RUN: llvm-readelf -r %t | FileCheck --check-prefix=SEC %s10# RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck --check-prefixes=CHECK,PD %s11# RUN: llvm-nm --no-sort %t | FileCheck --check-prefix=NM %s12 13# RUN: ld.lld -T %t.script -pie %t.o -o %t14# RUN: llvm-readelf -r %t | FileCheck --check-prefix=SEC %s15# RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck --check-prefixes=CHECK,PI %s16# RUN: llvm-nm --no-sort %t | FileCheck --check-prefix=NM %s17 18# SEC: There are no relocations in this file.19 20# CHECK:      <_start>:21# CHECK-NEXT:     2000: bl 0x201822# CHECK-NEXT:           bl 0x201823# CHECK-NEXT:           bl 0x201824# CHECK-NEXT:           bl 0x200200825# PD-NEXT:              bl 0x202826# PI-NEXT:              bl 0x203827 28## high = 0x02002008 = 65536*512+820029# PD:         <__LongThunk_high>:30# PD-NEXT:        2018: lis 12, 51231# PD-NEXT:              addi 12, 12, 820032# PD-NEXT:              mtctr 1233# PD-NEXT:              bctr34 35## .text_high+16 = 0x02002010 = 65536*512+820836# PD:         <__LongThunk_>:37# PD-NEXT:        2028: lis 12, 51238# PD-NEXT:              addi 12, 12, 820839# PD-NEXT:              mtctr 1240# PD-NEXT:              bctr41 42## high-0x2028 = 0x02002008-0x2020 = 65536*512-2443# PI:         <__LongThunk_high>:44# PI-NEXT:        2018: mflr 045# PI-NEXT:              bcl 20, 31, 0x202046# PI-NEXT:        2020: mflr 1247# PI-NEXT:              addis 12, 12, 51248# PI-NEXT:              addi 12, 12, -2449# PI-NEXT:              mtlr 050# PI-NEXT:              mtctr 1251# PI-NEXT:              bctr52 53## .text_high+16-0x2048 = 0x02002010-0x2048 = 65536*512-4854# PI:         <__LongThunk_>:55# PI-NEXT:        2038: mflr 056# PI-NEXT:              bcl 20, 31, 0x204057# PI-NEXT:        2040: mflr 1258# PI-NEXT:              addis 12, 12, 51259# PI-NEXT:              addi 12, 12, -4860# PI-NEXT:              mtlr 061# PI-NEXT:              mtctr 1262# PI-NEXT:              bctr63 64.section .text_low, "ax", %progbits65.globl _start66_start:67bl high@local     # Need a thunk68bl high@local     # Need a thunk69bl high+32768@plt # Need a thunk70bl high71bl .text_high+16  # Need a thunk72blr73 74# PD:         02002008 <high>:75# PD-NEXT:              bl 0x200876# PD-NEXT:              bl 0x200201077# PD:         <__LongThunk_>:78# PD-NEXT:     2002010: lis 12, 079# PD-NEXT:              addi 12, 12, 820080# PD-NEXT:              mtctr 1281# PD-NEXT:              bctr82 83.section .text_high, "ax", %progbits84nop85nop86.globl high87high:88bl .text_low+889bl .text_low+8    # Need a thunk90 91# NM:      t __LongThunk_high92# NM-NEXT: t __LongThunk_93# NM-NEXT: t __LongThunk_94# NM-NEXT: T _start95# NM-NEXT: T high96