1// Test that llvm-readobj dumps version info tags correctly.
2
3RUN: llvm-readobj -dynamic-table -V %p/Inputs/verdef.elf-x86-64 | FileCheck %s
4
5CHECK: 0x000000006FFFFFF0 VERSYM               0x24C
6CHECK: 0x000000006FFFFFFC VERDEF               0x25C
7CHECK: 0x000000006FFFFFFD VERDEFNUM            3
8
9CHECK: Version symbols {
10CHECK-NEXT:   Section Name: .gnu.version (20)
11CHECK-NEXT:   Address: 0x24C
12CHECK-NEXT:   Offset: 0x24C
13CHECK-NEXT:   Link: 1
14CHECK-NEXT:   Symbols [
15CHECK-NEXT:     Symbol {
16CHECK-NEXT:       Version: 0
17CHECK-NEXT:       Name: @
18CHECK-NEXT:     }
19CHECK-NEXT:     Symbol {
20CHECK-NEXT:       Version: 1
21CHECK-NEXT:       Name: _end@
22CHECK-NEXT:     }
23CHECK-NEXT:     Symbol {
24CHECK-NEXT:       Version: 1
25CHECK-NEXT:       Name: _edata@
26CHECK-NEXT:     }
27CHECK-NEXT:     Symbol {
28CHECK-NEXT:       Version: 3
29CHECK-NEXT:       Name: goo@@VERSION2
30CHECK-NEXT:     }
31CHECK-NEXT:     Symbol {
32CHECK-NEXT:       Version: 1
33CHECK-NEXT:       Name: __bss_start@
34CHECK-NEXT:     }
35CHECK-NEXT:     Symbol {
36CHECK-NEXT:       Version: 2
37CHECK-NEXT:       Name: foo@@VERSION1
38CHECK-NEXT:     }
39CHECK-NEXT:     Symbol {
40CHECK-NEXT:       Version: 2
41CHECK-NEXT:       Name: VERSION1@@VERSION1
42CHECK-NEXT:     }
43CHECK-NEXT:     Symbol {
44CHECK-NEXT:       Version: 3
45CHECK-NEXT:       Name: VERSION2@@VERSION2
46CHECK-NEXT:     }
47CHECK-NEXT:   ]
48CHECK-NEXT: }
49
50CHECK: Version definition {
51CHECK-NEXT:   Section Name: .gnu.version_d (70)
52CHECK-NEXT:   Address: 0x25C
53CHECK-NEXT:   Offset: 0x25C
54CHECK-NEXT:   Link: 2
55CHECK-NEXT:   Entries [
56CHECK-NEXT:     Entry {
57CHECK-NEXT:       Offset: 0x0
58CHECK-NEXT:       Rev: 1
59CHECK-NEXT:       Flags: 1
60CHECK-NEXT:       Index: 1
61CHECK-NEXT:       Cnt: 1
62CHECK-NEXT:       Name: blah
63CHECK-NEXT:     }
64CHECK-NEXT:     Entry {
65CHECK-NEXT:       Offset: 0x1C
66CHECK-NEXT:       Rev: 1
67CHECK-NEXT:       Flags: 0
68CHECK-NEXT:       Index: 2
69CHECK-NEXT:       Cnt: 1
70CHECK-NEXT:       Name: VERSION1
71CHECK-NEXT:     }
72CHECK-NEXT:     Entry {
73CHECK-NEXT:       Offset: 0x38
74CHECK-NEXT:       Rev: 1
75CHECK-NEXT:       Flags: 0
76CHECK-NEXT:       Index: 3
77CHECK-NEXT:       Cnt: 2
78CHECK-NEXT:       Name: VERSION2
79CHECK-NEXT:     }
80CHECK-NEXT:   ]
81CHECK-NEXT: }
82