34 lines · plain
1# REQUIRES: ppc2# RUN: llvm-mc -filetype=obj -triple=powerpc64le-unknown-linux %s -o %t.o3# RUN: ld.lld -shared %t.o -o %t.so4# RUN: llvm-readobj -r %t.so --syms | FileCheck %s5 6# RUN: llvm-mc -filetype=obj -triple=powerpc64-unknown-linux %s -o %t.o7# RUN: ld.lld -shared %t.o -o %t.so8# RUN: llvm-readobj -r %t.so --syms | FileCheck %s9 10## Test that we create R_PPC64_RELATIVE for R_PPC64_ADDR64 to non-preemptable11## symbols and R_PPC64_TOC in writable sections.12 13# CHECK: .rela.dyn {14# CHECK-NEXT: 0x303C8 R_PPC64_RELATIVE - 0x303C115## TOC base (0x283b0) + 0x8000 + 1 ---------^16# CHECK-NEXT: 0x303D0 R_PPC64_RELATIVE - 0x303C917# CHECK-NEXT: 0x303D8 R_PPC64_ADDR64 external 0x118# CHECK-NEXT: 0x303E0 R_PPC64_ADDR64 global 0x119# CHECK-NEXT: }20# CHECK-LABEL: Symbols [21# CHECK: Symbol {22# CHECK: Name: .TOC. ({{.+}})23# CHECK-NEXT: Value: 0x283C024 25.data26.globl global27global:28local:29 30.quad .TOC.@tocbase + 131.quad local + 132.quad external + 133.quad global + 134