1# REQUIRES: system-linux 2 3# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-linux %s -o %t.o 4# RUN: ld.lld %t.o -o %t.exe -q 5# RUN: llvm-bolt %t.exe --relocs -o %t.out --check-encoding 2>&1 | FileCheck %s 6 7 .text 8 .globl _start 9 .type _start, %function 10_start: 11 .cfi_startproc 12 13## Check that llvm-bolt uses non-symbolizing disassembler while validating 14## instruction encodings. If symbol "foo" below is symbolized, the encoded 15## instruction would have a different sequence of bytes from the input 16## sequence, as "foo" will not have any address assigned at that point. 17 18 movq foo(%rip), %rax 19# CHECK-NOT: mismatching LLVM encoding detected 20 21 ret 22 .cfi_endproc 23 .size _start, .-_start 24 25 .globl foo 26 .type foo, %function 27foo: 28 .cfi_startproc 29 ret 30 .cfi_endproc 31 .size foo, .-foo 32