[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / ELF / ppc64-reloc-rel.s
blobe086cad7d63ccb52f33b25f9a41e72504ec314cd
1 # REQUIRES: ppc
3 # RUN: llvm-mc -filetype=obj -triple=powerpc64le %s -o %t.o
4 # RUN: ld.lld %t.o --defsym=foo=rel16+0x8000 -o %t
5 # RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s
6 # RUN: llvm-readobj -r %t.o | FileCheck --check-prefix=REL %s
7 # RUN: llvm-readelf -S %t | FileCheck --check-prefix=SEC %s
8 # RUN: llvm-readelf -x .eh_frame %t | FileCheck --check-prefix=HEX %s
10 .section .R_PPC64_REL14,"ax",@progbits
11 # FIXME This does not produce a relocation
12 beq 1f
14 # CHECK-LABEL: Disassembly of section .R_PPC64_REL14:
15 # CHECK: bt 2, 0x10010198
17 .section .R_PPC64_REL16,"ax",@progbits
18 .globl rel16
19 rel16:
20 li 3, foo-rel16-1@ha # R_PPC64_REL16_HA
21 li 3, foo-rel16@ha
22 li 4, foo-rel16+0x7fff@h # R_PPC64_REL16_HI
23 li 4, foo-rel16+0x8000@h
24 li 5, foo-rel16-1@l # R_PPC64_REL16_LO
25 li 5, foo-rel16@l
26 # CHECK-LABEL: Disassembly of section .R_PPC64_REL16:
27 # CHECK: li 3, 0
28 # CHECK-NEXT: li 3, 1
29 # CHECK-NEXT: li 4, 0
30 # CHECK-NEXT: li 4, 1
31 # CHECK-NEXT: li 5, 32767
32 # CHECK-NEXT: li 5, -32768
34 .section .R_PPC64_REL24,"ax",@progbits
35 b rel16
36 # CHECK-LABEL: Disassembly of section .R_PPC64_REL24:
37 # CHECK: 100101b0: b 0x10010198
39 .section .REL32_AND_REL64,"ax",@progbits
40 .cfi_startproc
41 .cfi_personality 148, rel64
42 nop
43 .cfi_endproc
44 rel64:
45 li 3, 0
46 # REL: .rela.eh_frame {
47 # REL-NEXT: 0x12 R_PPC64_REL64 .REL32_AND_REL64 0x4
48 # REL-NEXT: 0x28 R_PPC64_REL32 .REL32_AND_REL64 0x0
49 # REL-NEXT: }
51 # SEC: .REL32_AND_REL64 PROGBITS 00000000100101b4
53 ## CIE Personality Address: 0x100101b4-(0x10000168+2)+4 = 0x1004e
54 ## FDE PC Begin: 0x100101b4-(0x10000178+8) = 0x10034
55 # HEX: section '.eh_frame':
56 # HEX-NEXT: 0x10000158
57 # HEX-NEXT: 0x10000168 {{....}}4e00 01000000 0000{{....}}
58 # HEX-NEXT: 0x10000178 {{[0-9a-f]+}} {{[0-9a-f]+}} 34000100