• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Source file compiled:
2##include <iostream>
3# #include <typeinfo>
4#template <class A>
5#void foo(A variable) {
6#  std::cout << "foo is " << typeid(A).name() << "\n";
7#}
8#int main () {
9#  char x = 'x';
10#  int y = 1;
11#  foo(x);
12#  foo(y);
13#  return 0;
14#}
15
16RUN: llvm-readobj -g %p/Inputs/elf-groups.x86_64 \
17RUN:   | FileCheck %s
18RUN: llvm-readobj -g -elf-output-style=GNU %p/Inputs/elf-groups.x86_64 \
19RUN:   | FileCheck --check-prefix="GNU" %s
20CHECK:         Groups {
21CHECK-NEXT:      Group {
22CHECK-NEXT:        Name: .group (92)
23CHECK-NEXT:        Index: 1
24CHECK-NEXT:        Link: 23
25CHECK-NEXT:        Info: 17
26CHECK-NEXT:        Type: COMDAT (0x1)
27CHECK-NEXT:        Signature: _Z3fooIcEvT_
28CHECK-NEXT:        Section(s) in group [
29CHECK-NEXT:          .text._Z3fooIcEvT_ (10)
30CHECK-NEXT:          .rela.text._Z3fooIcEvT_ (11)
31CHECK-NEXT:        ]
32CHECK-NEXT:      }
33CHECK-NEXT:      Group {
34CHECK-NEXT:        Name: .group (92)
35CHECK-NEXT:        Index: 2
36CHECK-NEXT:        Link: 23
37CHECK-NEXT:        Info: 18
38CHECK-NEXT:        Type: COMDAT (0x1)
39CHECK-NEXT:        Signature: _Z3fooIiEvT_
40CHECK-NEXT:        Section(s) in group [
41CHECK-NEXT:          .text._Z3fooIiEvT_ (12)
42CHECK-NEXT:          .rela.text._Z3fooIiEvT_ (13)
43CHECK-NEXT:        ]
44CHECK-NEXT:      }
45
46GNU:COMDAT group section [    1] `.group' [_Z3fooIcEvT_] contains 2 sections:
47GNU-NEXT:   [Index]    Name
48GNU-NEXT:   [   10]   .text._Z3fooIcEvT_
49GNU-NEXT:   [   11]   .rela.text._Z3fooIcEvT_
50GNU:COMDAT group section [    2] `.group' [_Z3fooIiEvT_] contains 2 sections:
51GNU-NEXT:   [Index]    Name
52GNU-NEXT:   [   12]   .text._Z3fooIiEvT_
53GNU-NEXT:   [   13]   .rela.text._Z3fooIiEvT_
54GNU:COMDAT group section [    3] `.group' [_ZNKSt9type_info4nameEv] contains 1 sections:
55GNU-NEXT:   [Index]    Name
56GNU-NEXT:   [   14]   .text._ZNKSt9type_info4nameEv
57