1# RUN: llvm-mc -triple=powerpc64le-unknown-unknown -filetype=obj %s 2>&1 | \ 2# RUN: FileCheck %s -check-prefix=MC 3# RUN: llvm-mc -triple=powerpc64le-unknown-unknown -filetype=obj %s | \ 4# RUN: llvm-readobj -r - | FileCheck %s -check-prefix=READOBJ 5 6# RUN: llvm-mc -triple=powerpc64-unknown-unknown -filetype=obj %s 2>&1 | \ 7# RUN: FileCheck %s -check-prefix=MC 8# RUN: llvm-mc -triple=powerpc64-unknown-unknown -filetype=obj %s | \ 9# RUN: llvm-readobj -r - | FileCheck %s -check-prefix=READOBJ 10 11# This test checks that on Power PC we can correctly convert @pcrel and 12# @got@pcrel into R_PPC64_PCREL34 and R_PPC64_GOT_PCREL34. 13 14# MC-NOT: error: invalid variant 15 16# READOBJ: 0x0 R_PPC64_PCREL34 locvalue 0x0 17# READOBJ-NEXT: 0x20 R_PPC64_GOT_PCREL34 evalue 0x0 18 19 .text 20 .abiversion 2 21 .globl local # -- Begin function local 22 .p2align 4 23 .type local,@function 24local: # @local 25.Llocal$local: 26.Lfunc_begin0: 27# %bb.0: # %entry 28 plwa 3, locvalue@PCREL(0), 1 29 blr 30 .long 0 31 .quad 0 32.Lfunc_end0: 33 .size local, .Lfunc_end0-.Lfunc_begin0 34 # -- End function 35 .globl external # -- Begin function external 36 .p2align 4 37 .type external,@function 38external: # @external 39.Lexternal$local: 40.Lfunc_begin1: 41# %bb.0: # %entry 42 pld 3, evalue@got@pcrel(0), 1 43 lwa 3, 0(3) 44 blr 45 .long 0 46 .quad 0 47.Lfunc_end1: 48 .size external, .Lfunc_end1-.Lfunc_begin1 49 # -- End function 50 .type locvalue,@object # @locvalue 51 .section .bss,"aw",@nobits 52 .globl locvalue 53 .p2align 2 54locvalue: 55.Llocvalue$local: 56 .long 0 # 0x0 57 .size locvalue, 4 58 59