62 lines · plain
1## This reproduces a bug with instrumentation crashes on internal call2 3# REQUIRES: system-linux,bolt-runtime,target=x86_64{{.*}}4 5# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %s -o %t.o6# Delete our BB symbols so BOLT doesn't mark them as entry points7# RUN: llvm-strip --strip-unneeded %t.o8# RUN: ld.lld %t.o -o %t.exe -q -shared -fini=_fini -init=_init9# RUN: llvm-bolt --instrument %t.exe --relocs -o %t.out10 11 .text12 .globl _start13 .type _start, %function14 .p2align 415_start:16 push %rbp17 mov %rsp,%rbp18 push %r1219 push %rbx20 sub $0x120,%rsp21 mov $0x3,%rbx22.J1:23 cmp $0x0,%rbx24 je .J225 callq .J326 nopl (%rax,%rax,1)27 lea var@GOTPCREL(%rip),%rax28 retq29.J2:30 add $0x120,%rsp31 pop %rbx32 pop %r1233 jmp .J434.J3:35 pop %rax36 add $0x4,%rax37 dec %rbx38 jmp .J139.J4:40 pop %rbp41 retq42 .size _start, .-_start43 44 .globl _fini45 .type _fini, %function46 .p2align 447_fini:48 hlt49 .size _fini, .-_fini50 51 .globl _init52 .type _init, %function53 .p2align 454_init:55 retq56 .size _init, .-_init57 58 .data59 .globl var60var:61 .quad 0xdeadbeef62