[llvm-shlib] Fix the version naming style of libLLVM for Windows (#85710)
[llvm-project.git] / bolt / test / runtime / instrument-wrong-target.s
blob31cae734a0bffd0f92742f639fd6626eee6dd098
1 # Test that BOLT errs when trying to instrument a binary with a different
2 # architecture than the one BOLT is built for.
4 # REQUIRES: x86_64-linux,bolt-runtime,target=x86_64{{.*}}
6 # RUN: llvm-mc -triple aarch64 -filetype=obj %s -o %t.o
7 # RUN: ld.lld -q -pie -o %t.exe %t.o
8 # RUN: not llvm-bolt --instrument -o %t.out %t.exe 2>&1 | FileCheck %s
10 # CHECK: BOLT-ERROR: linking object with arch x86_64 into context with arch aarch64
12 .text
13 .globl _start
14 .type _start, %function
15 _start:
16 # BOLT errs when instrumenting without relocations; create a dummy one.
17 .reloc 0, R_AARCH64_NONE
18 ret
19 .size _start, .-_start
21 .globl _fini
22 .type _fini, %function
23 # Force DT_FINI to be created (needed for instrumentation).
24 _fini:
25 ret
26 .size _fini, .-_fini