1 ## Test that llvm-readobj dumps version info tags correctly.
3 # RUN: yaml2obj %s --docnum=1 -o %t1
4 # RUN: llvm-readobj -V %t1 | FileCheck %s --check-prefix=LLVM
5 # RUN: llvm-readelf -V %t1 | FileCheck %s --check-prefix=GNU
11 OSABI: ELFOSABI_FREEBSD
19 AddressAlign: 0x0000000000000002
20 EntSize: 0x0000000000000002
21 Entries: [ 0, 2, 3, 4, 5, 6]
22 - Name: .gnu.version_d
26 AddressAlign: 0x0000000000000004
27 Info: 0x0000000000000003
42 - Name: .gnu.version_r
46 AddressAlign: 0x0000000000000004
47 Info: 0x0000000000000002
80 # LLVM: VersionSymbols [
82 # LLVM-NEXT: Version: 0
86 # LLVM-NEXT: Version: 2
87 # LLVM-NEXT: Name: sym1@@VERSION1
90 # LLVM-NEXT: Version: 3
91 # LLVM-NEXT: Name: sym2@@VERSION2
94 # LLVM-NEXT: Version: 4
95 # LLVM-NEXT: Name: sym3@v1
98 # LLVM-NEXT: Version: 5
99 # LLVM-NEXT: Name: sym4@v2
101 # LLVM-NEXT: Symbol {
102 # LLVM-NEXT: Version: 6
103 # LLVM-NEXT: Name: sym5@v3
106 # LLVM-NEXT: VersionDefinitions [
107 # LLVM-NEXT: Definition {
108 # LLVM-NEXT: Version: 1
109 # LLVM-NEXT: Flags: 0x0
110 # LLVM-NEXT: Index: 2
111 # LLVM-NEXT: Hash: 175630257
112 # LLVM-NEXT: Name: VERSION1
114 # LLVM-NEXT: Definition {
115 # LLVM-NEXT: Version: 1
116 # LLVM-NEXT: Flags: 0x0
117 # LLVM-NEXT: Index: 3
118 # LLVM-NEXT: Hash: 175630258
119 # LLVM-NEXT: Name: VERSION2
120 # LLVM-NEXT: Predecessor: VERSION1
122 # LLVM-NEXT: Definition {
123 # LLVM-NEXT: Version: 1
124 # LLVM-NEXT: Flags: 0x0
125 # LLVM-NEXT: Index: 3
126 # LLVM-NEXT: Hash: 175630258
127 # LLVM-NEXT: Name: VERSION2
128 # LLVM-NEXT: Predecessor: VERSION1
131 # LLVM-NEXT: VersionRequirements [
132 # LLVM-NEXT: Dependency {
133 # LLVM-NEXT: Version: 1
134 # LLVM-NEXT: Count: 2
135 # LLVM-NEXT: FileName: verneed1.so.0
136 # LLVM-NEXT: Entries [
138 # LLVM-NEXT: Hash: 1938
139 # LLVM-NEXT: Flags: 0x0
140 # LLVM-NEXT: Index: 4
141 # LLVM-NEXT: Name: v1
144 # LLVM-NEXT: Hash: 1939
145 # LLVM-NEXT: Flags: 0x0
146 # LLVM-NEXT: Index: 5
147 # LLVM-NEXT: Name: v2
151 # LLVM-NEXT: Dependency {
152 # LLVM-NEXT: Version: 1
153 # LLVM-NEXT: Count: 1
154 # LLVM-NEXT: FileName: verneed2.so.0
155 # LLVM-NEXT: Entries [
157 # LLVM-NEXT: Hash: 1937
158 # LLVM-NEXT: Flags: 0x0
159 # LLVM-NEXT: Index: 6
160 # LLVM-NEXT: Name: v3
166 # GNU: Version symbols section '.gnu.version' contains 6 entries:
167 # GNU-NEXT: Addr: 0000000000000000 Offset: 0x000040 Link: 6 (.dynsym)
168 # GNU-NEXT: 000: 0 (*local*) 2 (VERSION1) 3 (VERSION2) 4 (v1)
169 # GNU-NEXT: 004: 5 (v2) 6 (v3)
171 # GNU-NEXT: Version definition section '.gnu.version_d' contains 3 entries:
172 # GNU-NEXT: Addr: 0000000000000000 Offset: 0x00004c Link: 7 (.dynstr)
173 # GNU-NEXT: 0x0000: Rev: 1 Flags: none Index: 2 Cnt: 1 Name: VERSION1
174 # GNU-NEXT: 0x001c: Rev: 1 Flags: none Index: 3 Cnt: 2 Name: VERSION2
175 # GNU-NEXT: 0x0038: Parent 1: VERSION1
176 # GNU-NEXT: 0x001c: Rev: 1 Flags: none Index: 3 Cnt: 2 Name: VERSION2
177 # GNU-NEXT: 0x0038: Parent 1: VERSION1
179 # GNU-NEXT: Version needs section '.gnu.version_r' contains 2 entries:
180 # GNU-NEXT: Addr: 0000000000000000 Offset: 0x00008c Link: 7 (.dynstr)
181 # GNU-NEXT: 0x0000: Version: 1 File: verneed1.so.0 Cnt: 2
182 # GNU-NEXT: 0x0010: Name: v1 Flags: none Version: 4
183 # GNU-NEXT: 0x0020: Name: v2 Flags: none Version: 5
184 # GNU-NEXT: 0x0030: Version: 1 File: verneed2.so.0 Cnt: 1
185 # GNU-NEXT: 0x0040: Name: v3 Flags: none Version: 6