[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / ELF / ppc64-relocs.s
blob0b0be487521e4099dcd5ef0fc9821e69697cb100
1 # REQUIRES: ppc
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
13 .text
14 .global _start
15 _start:
16 .Lfoo:
17 li 0,1
18 li 3,42
21 .section .toc,"aw",@progbits
22 .L1:
23 .quad 22, 37, 89, 47
25 .section .R_PPC64_TOC16_LO_DS,"ax",@progbits
26 ld 1, .L1@toc@l(2)
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
32 addi 1, 2, .L1@toc@l
34 # CHECK-LABEL: Disassembly of section .R_PPC64_TOC16_LO:
35 # CHECK: addi 1, 2, -32760
37 .section .R_PPC64_TOC16_HI,"ax",@progbits
38 addis 1, 2, .L1@toc@h
40 # CHECK-LABEL: Disassembly of section .R_PPC64_TOC16_HI:
41 # CHECK: addis 1, 2, -1
43 .section .R_PPC64_TOC,"a",@progbits
44 .quad .TOC.@tocbase
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