• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# REQUIRES: ppc
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 | FileCheck %s
5
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 | FileCheck %s
9
10## Test that we create R_PPC64_RELATIVE for R_PPC64_ADDR64 to non-preemptable
11## symbols and R_PPC64_TOC in writable sections.
12
13## FIXME the addend for offset 0x20000 should be TOC base+0x8000+1, not 0x80001.
14# CHECK:      .rela.dyn {
15# CHECK-NEXT:   0x303B8 R_PPC64_RELATIVE - 0x8001
16# CHECK-NEXT:   0x303C0 R_PPC64_RELATIVE - 0x303B9
17# CHECK-NEXT:   0x303C8 R_PPC64_ADDR64 external 0x1
18# CHECK-NEXT:   0x303D0 R_PPC64_ADDR64 global 0x1
19# CHECK-NEXT: }
20
21.data
22.globl global
23global:
24local:
25
26.quad .TOC.@tocbase + 1
27.quad local + 1
28.quad external + 1
29.quad global + 1
30