• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# REQUIRES: x86
2
3# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
4# RUN: echo "A B 5" > %t.call_graph
5# RUN: echo "B C 50" >> %t.call_graph
6# RUN: echo "C D 40" >> %t.call_graph
7# RUN: echo "D B 10" >> %t.call_graph
8# RUN: ld.lld -e A %t --call-graph-ordering-file %t.call_graph -o %t2 --print-symbol-order=%t3
9# RUN: FileCheck %s --input-file %t3
10
11# CHECK: B
12# CHECK-NEXT: C
13# CHECK-NEXT: D
14# CHECK-NEXT: A
15
16.section    .text.A,"ax",@progbits
17.globl  A
18A:
19 nop
20
21.section    .text.B,"ax",@progbits
22.globl  B
23B:
24 nop
25
26.section    .text.C,"ax",@progbits
27.globl  C
28C:
29 nop
30
31.section    .text.D,"ax",@progbits
32.globl  D
33D:
34 nop
35
36
37
38