• 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
5# RUN: echo "A B 100" > %t.call_graph
6# RUN: echo "A C 40" >> %t.call_graph
7# RUN: echo "C D 61" >> %t.call_graph
8# RUN: ld.lld -e A %t --call-graph-ordering-file %t.call_graph -o %t.out -icf=all
9# RUN: llvm-readobj --symbols %t.out | FileCheck %s
10# RUN: ld.lld -e A %t --call-graph-ordering-file %t.call_graph -o %t2.out
11# RUN: llvm-readobj --symbols %t2.out | FileCheck %s --check-prefix=NOICF
12
13    .section    .text.D,"ax",@progbits
14    .globl  D
15D:
16    mov $60, %rax
17    retq
18
19    .section    .text.C,"ax",@progbits
20    .globl  C
21C:
22    mov $60, %rax
23    retq
24
25    .section    .text.B,"ax",@progbits
26    .globl  B
27B:
28    mov $2, %rax
29    retq
30
31    .section    .text.A,"ax",@progbits
32    .globl  A
33A:
34    mov $42, %rax
35    retq
36
37# CHECK:          Name: A
38# CHECK-NEXT:     Value: 0x201120
39# CHECK:          Name: B
40# CHECK-NEXT:     Value: 0x201130
41# CHECK:          Name: C
42# CHECK-NEXT:     Value: 0x201128
43# CHECK:          Name: D
44# CHECK-NEXT:     Value: 0x201128
45
46# NOICF:          Name: A
47# NOICF-NEXT:     Value: 0x201120
48# NOICF:          Name: B
49# NOICF-NEXT:     Value: 0x201128
50# NOICF:          Name: C
51# NOICF-NEXT:     Value: 0x201130
52# NOICF:          Name: D
53# NOICF-NEXT:     Value: 0x201138
54