Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / MC / X86 / reloc-directive-elf-64.s
blob8f5d8c895e7d764015ab839e8e3e5cce28dafc1a
1 # RUN: llvm-mc -triple=x86_64-pc-linux-musl %s | FileCheck --check-prefix=PRINT %s
3 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux-musl %s -o %t
4 # RUN: llvm-readobj -r %t | FileCheck %s
6 # PRINT: .reloc 2, R_X86_64_NONE, .data
7 # PRINT-NEXT: .reloc 1, R_X86_64_NONE, foo+4
8 # PRINT-NEXT: .reloc 0, R_X86_64_NONE, 8
9 # PRINT-NEXT: .reloc 0, R_X86_64_64, .data+2
10 # PRINT-NEXT: .reloc 0, R_X86_64_GOTPCRELX, foo+3
11 # PRINT-NEXT: .reloc 0, R_X86_64_REX_GOTPCRELX, 5
12 # PRINT: .reloc 0, BFD_RELOC_NONE, 9
13 # PRINT-NEXT: .reloc 0, BFD_RELOC_8, 9
14 # PRINT-NEXT: .reloc 0, BFD_RELOC_16, 9
15 # PRINT-NEXT: .reloc 0, BFD_RELOC_32, 9
16 # PRINT-NEXT: .reloc 0, BFD_RELOC_64, 9
18 # CHECK: 0x2 R_X86_64_NONE .data 0x0
19 # CHECK-NEXT: 0x1 R_X86_64_NONE foo 0x4
20 # CHECK-NEXT: 0x0 R_X86_64_NONE - 0x8
21 # CHECK-NEXT: 0x0 R_X86_64_64 .data 0x2
22 # CHECK-NEXT: 0x0 R_X86_64_GOTPCRELX foo 0x3
23 # CHECK-NEXT: 0x0 R_X86_64_REX_GOTPCRELX - 0x5
24 # CHECK-NEXT: 0x0 R_X86_64_NONE - 0x9
25 # CHECK-NEXT: 0x0 R_X86_64_8 - 0x9
26 # CHECK-NEXT: 0x0 R_X86_64_16 - 0x9
27 # CHECK-NEXT: 0x0 R_X86_64_32 - 0x9
28 # CHECK-NEXT: 0x0 R_X86_64_64 - 0x9
30 .text
31 ret
32 nop
33 nop
34 .reloc 2, R_X86_64_NONE, .data
35 .reloc 1, R_X86_64_NONE, foo+4
36 .reloc 0, R_X86_64_NONE, 8
37 .reloc 0, R_X86_64_64, .data+2
38 .reloc 0, R_X86_64_GOTPCRELX, foo+3
39 .reloc 0, R_X86_64_REX_GOTPCRELX, 5
41 .reloc 0, BFD_RELOC_NONE, 9
42 .reloc 0, BFD_RELOC_8, 9
43 .reloc 0, BFD_RELOC_16, 9
44 .reloc 0, BFD_RELOC_32, 9
45 .reloc 0, BFD_RELOC_64, 9
47 .data
48 .globl foo
49 foo:
50 .word 0
51 .word 0