2 # RUN: llvm-mc -filetype=obj -triple=powerpc64le-unknown-linux %s -o %t.o
3 # RUN: ld.lld -shared %t.o -o %t.so
4 # RUN: llvm-readobj -r %t.so --syms | FileCheck %s
6 # RUN: llvm-mc -filetype=obj -triple=powerpc64-unknown-linux %s -o %t.o
7 # RUN: ld.lld -shared %t.o -o %t.so
8 # RUN: llvm-readobj -r %t.so --syms | FileCheck %s
10 ## Test that we create R_PPC64_RELATIVE for R_PPC64_ADDR64 to non-preemptable
11 ## symbols and R_PPC64_TOC in writable sections.
14 # CHECK-NEXT: 0x303C8 R_PPC64_RELATIVE - 0x303C1
15 ## TOC base (0x283b0) + 0x8000 + 1 ---------^
16 # CHECK-NEXT: 0x303D0 R_PPC64_RELATIVE - 0x303C9
17 # CHECK-NEXT: 0x303D8 R_PPC64_ADDR64 external 0x1
18 # CHECK-NEXT: 0x303E0 R_PPC64_ADDR64 global 0x1
20 # CHECK-LABEL: Symbols [
22 # CHECK: Name: .TOC. ({{.+}})
23 # CHECK-NEXT: Value: 0x283C0
30 .quad .TOC.@tocbase + 1