1 ## Check that BOLT can correctly use relocations to symbolize instruction
2 ## operands when an instruction can have up to two relocations associated
5 # REQUIRES: system-linux
7 # RUN: llvm-mc -filetype=obj -triple x86_64-unknown-linux %s -o %t.o
8 # RUN: ld.lld %t.o -o %t.exe -q --Tdata=0x80000
9 # RUN: llvm-bolt %t.exe --relocs -o /dev/null --print-only=_start --print-disasm \
10 # RUN: | FileCheck %s --check-prefix=CHECK-BOLT
11 # RUN: llvm-objdump -d --print-imm-hex %t.exe \
12 # RUN: | FileCheck %s --check-prefix=CHECK-OBJDUMP
21 .type _start,@function
25 ## VAR value is 0x80000. Using relocations, llvm-bolt should correctly
26 ## symbolize the instruction operands.
28 movq $
0x80000, 0x80000
29 # CHECK-BOLT: movq $0x80000, 0x80000
30 # CHECK-OBJDUMP: movq $0x80000, 0x80000
33 # CHECK-BOLT: movq $VAR, 0x80000
34 # CHECK-OBJDUMP: movq $0x80000, 0x80000
37 # CHECK-BOLT-NEXT: movq $0x80000, VAR
38 # CHECK-OBJDUMP-NEXT: movq $0x80000, 0x80000
41 # CHECK-BOLT-NEXT: movq $VAR, VAR
42 # CHECK-OBJDUMP-NEXT: movq $0x80000, 0x80000
45 .size _start, .-_start