1 ## Under some circumstances, GNU tools strip/objcopy change REL to RELA. https://sourceware.org/bugzilla/show_bug.cgi?id=28035
2 ## Test that LLD can handle call graph profile data relocated with RELA relocations.
5 # RUN: yaml2obj %s -o %t.o
6 # RUN: ld.lld %t.o -o %t
7 # RUN: llvm-nm --no-sort %t | FileCheck %s
8 # RUN: ld.lld --no-call-graph-profile-sort %t.o -o %t
9 # RUN: llvm-nm --no-sort %t | FileCheck %s --check-prefix=NO-CG
11 # CHECK: 0000000000201124 t D
12 # CHECK: 0000000000201122 t C
13 # CHECK: 0000000000201128 t B
14 # CHECK: 0000000000201120 t A
15 # CHECK: 0000000000201126 T _start
17 # NO-CG: 0000000000201120 t D
18 # NO-CG: 0000000000201122 t C
19 # NO-CG: 0000000000201124 t B
20 # NO-CG: 0000000000201126 t A
21 # NO-CG: 0000000000201128 T _start
32 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
36 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
40 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
44 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
48 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
50 - Name: .llvm.call-graph-profile
51 Type: SHT_LLVM_CALL_GRAPH_PROFILE
52 Flags: [ SHF_EXCLUDE ]
62 - Name: .rela.llvm.call-graph-profile
64 Info: .llvm.call-graph-profile
117 Section: .text._start