3 # RUN: llvm-mc -filetype=obj -triple=powerpc64le-unknown-linux %s -o %t.o
4 # RUN: ld.lld --no-toc-optimize %t.o -o %t
5 # RUN: llvm-readelf -x .rodata -x .R_PPC64_TOC -x .eh_frame %t | FileCheck %s --check-prefix=DATALE
6 # RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s
8 # RUN: llvm-mc -filetype=obj -triple=powerpc64-unknown-linux %s -o %t.o
9 # RUN: ld.lld --no-toc-optimize %t.o -o %t
10 # RUN: llvm-readelf -x .rodata -x .R_PPC64_TOC -x .eh_frame %t | FileCheck %s --check-prefix=DATABE
11 # RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s
21 .section .toc,"aw",@progbits
25 .section .R_PPC64_TOC16_LO_DS,"ax",@progbits
28 # CHECK-LABEL: Disassembly of section .R_PPC64_TOC16_LO_DS:
29 # CHECK: ld 1, -32760(2)
31 .section .R_PPC64_TOC16_LO,"ax",@progbits
34 # CHECK-LABEL: Disassembly of section .R_PPC64_TOC16_LO:
35 # CHECK: addi 1, 2, -32760
37 .section .R_PPC64_TOC16_HI,"ax",@progbits
40 # CHECK-LABEL: Disassembly of section .R_PPC64_TOC16_HI:
41 # CHECK: addis 1, 2, -1
43 .section .R_PPC64_TOC,"a",@progbits
46 # SEC: .got PROGBITS 0000000010020208
48 ## tocbase = .got+0x8000 = 0x10028208
49 # DATALE-LABEL: section '.R_PPC64_TOC':
50 # DATALE-NEXT: e8810210 00000000
52 # DATABE-LABEL: section '.R_PPC64_TOC':
53 # DATABE-NEXT: 00000000 100281e8