1# RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -t -sd -elf-cg-profile | FileCheck %s 2 3 .section .test,"aw",@progbits 4a: .word b 5 6 .cg_profile a, b, 32 7 .cg_profile freq, a, 11 8 .cg_profile late, late2, 20 9 .cg_profile .L.local, b, 42 10 11 .globl late 12late: 13late2: .word 0 14late3: 15.L.local: 16 17# CHECK: Name: .llvm.call-graph-profile 18# CHECK-NEXT: Type: SHT_LLVM_CALL_GRAPH_PROFILE (0x6FFF4C02) 19# CHECK-NEXT: Flags [ (0x80000000) 20# CHECK-NEXT: SHF_EXCLUDE (0x80000000) 21# CHECK-NEXT: ] 22# CHECK-NEXT: Address: 23# CHECK-NEXT: Offset: 24# CHECK-NEXT: Size: 64 25# CHECK-NEXT: Link: 6 26# CHECK-NEXT: Info: 0 27# CHECK-NEXT: AddressAlignment: 1 28# CHECK-NEXT: EntrySize: 16 29# CHECK-NEXT: SectionData ( 30# CHECK-NEXT: 0000: 01000000 05000000 20000000 00000000 31# CHECK-NEXT: 0010: 06000000 01000000 0B000000 00000000 32# CHECK-NEXT: 0020: 07000000 02000000 14000000 00000000 33# CHECK-NEXT: 0030: 04000000 05000000 2A000000 00000000 34# CHECK-NEXT: ) 35 36# CHECK: Symbols [ 37# CHECK: Name: a 38# CHECK-NEXT: Value: 39# CHECK-NEXT: Size: 40# CHECK-NEXT: Binding: Local 41# CHECK-NEXT: Type: 42# CHECK-NEXT: Other: 43# CHECK-NEXT: Section: .test 44# CHECK: Name: late2 45# CHECK-NEXT: Value: 46# CHECK-NEXT: Size: 47# CHECK-NEXT: Binding: Local 48# CHECK-NEXT: Type: 49# CHECK-NEXT: Other: 50# CHECK-NEXT: Section: .test 51# CHECK: Name: late3 52# CHECK-NEXT: Value: 53# CHECK-NEXT: Size: 54# CHECK-NEXT: Binding: Local 55# CHECK-NEXT: Type: 56# CHECK-NEXT: Other: 57# CHECK-NEXT: Section: .test 58# CHECK: Name: b 59# CHECK-NEXT: Value: 60# CHECK-NEXT: Size: 61# CHECK-NEXT: Binding: Global 62# CHECK-NEXT: Type: 63# CHECK-NEXT: Other: 64# CHECK-NEXT: Section: Undefined 65# CHECK: Name: freq 66# CHECK-NEXT: Value: 67# CHECK-NEXT: Size: 68# CHECK-NEXT: Binding: Weak 69# CHECK-NEXT: Type: 70# CHECK-NEXT: Other: 71# CHECK-NEXT: Section: Undefined 72# CHECK: Name: late 73# CHECK-NEXT: Value: 74# CHECK-NEXT: Size: 75# CHECK-NEXT: Binding: Global 76# CHECK-NEXT: Type: 77# CHECK-NEXT: Other: 78# CHECK-NEXT: Section: .test 79# CHECK: CGProfile [ 80# CHECK-NEXT: CGProfileEntry { 81# CHECK-NEXT: From: a 82# CHECK-NEXT: To: b 83# CHECK-NEXT: Weight: 32 84# CHECK-NEXT: } 85# CHECK-NEXT: CGProfileEntry { 86# CHECK-NEXT: From: freq 87# CHECK-NEXT: To: a 88# CHECK-NEXT: Weight: 11 89# CHECK-NEXT: } 90# CHECK-NEXT: CGProfileEntry { 91# CHECK-NEXT: From: late 92# CHECK-NEXT: To: late2 93# CHECK-NEXT: Weight: 20 94# CHECK-NEXT: } 95# CHECK-NEXT: CGProfileEntry { 96# CHECK-NEXT: From: 97# CHECK-NEXT: To: b 98# CHECK-NEXT: Weight: 42 99# CHECK-NEXT: } 100# CHECK-NEXT: ]