30 lines · plain
1## Check that --print-only flag works with sections.2 3# REQUIRES: system-linux4 5# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-linux %s -o %t.o6# RUN: ld.lld %t.o -o %t.exe7# RUN: llvm-bolt %t.exe -o %t.out --print-cfg --print-only=unused_code 2>&1 \8# RUN: | FileCheck %s9 10# CHECK: Binary Function "foo"11# CHECK-NOT: Binary Function "_start"12 13 .text14 .globl _start15 .type _start, %function16_start:17 .cfi_startproc18 ret19 .cfi_endproc20 .size _start, .-_start21 22 .section unused_code,"ax",@progbits23 .globl foo24 .type foo, %function25foo:26 .cfi_startproc27 ret28 .cfi_endproc29 .size foo, .-foo30