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: Version symbols {
81 # LLVM-NEXT: Section Name: .gnu.version
82 # LLVM-NEXT: Address: 0x0
83 # LLVM-NEXT: Offset: 0x280
85 # LLVM-NEXT: Symbols [
87 # LLVM-NEXT: Version: 0
91 # LLVM-NEXT: Version: 2
92 # LLVM-NEXT: Name: sym1@@VERSION1
95 # LLVM-NEXT: Version: 3
96 # LLVM-NEXT: Name: sym2@@VERSION2
99 # LLVM-NEXT: Version: 4
100 # LLVM-NEXT: Name: sym3@v1
102 # LLVM-NEXT: Symbol {
103 # LLVM-NEXT: Version: 5
104 # LLVM-NEXT: Name: sym4@v2
106 # LLVM-NEXT: Symbol {
107 # LLVM-NEXT: Version: 6
108 # LLVM-NEXT: Name: sym5@v3
112 # LLVM-NEXT: SHT_GNU_verdef {
113 # LLVM-NEXT: Definition {
114 # LLVM-NEXT: Version: 1
115 # LLVM-NEXT: Flags: 0x0
116 # LLVM-NEXT: Index: 2
117 # LLVM-NEXT: Hash: 175630257
118 # LLVM-NEXT: Name: VERSION1
120 # LLVM-NEXT: Definition {
121 # LLVM-NEXT: Version: 1
122 # LLVM-NEXT: Flags: 0x0
123 # LLVM-NEXT: Index: 3
124 # LLVM-NEXT: Hash: 175630258
125 # LLVM-NEXT: Name: VERSION2
126 # LLVM-NEXT: Predecessor: VERSION1
128 # LLVM-NEXT: Definition {
129 # LLVM-NEXT: Version: 1
130 # LLVM-NEXT: Flags: 0x0
131 # LLVM-NEXT: Index: 3
132 # LLVM-NEXT: Hash: 175630258
133 # LLVM-NEXT: Name: VERSION2
134 # LLVM-NEXT: Predecessor: VERSION1
137 # LLVM-NEXT: SHT_GNU_verneed {
138 # LLVM-NEXT: Dependency {
139 # LLVM-NEXT: Version: 1
140 # LLVM-NEXT: Count: 2
141 # LLVM-NEXT: FileName: verneed1.so.0
142 # LLVM-NEXT: Entries [
144 # LLVM-NEXT: Hash: 1938
145 # LLVM-NEXT: Flags: 0x0
146 # LLVM-NEXT: Index: 4
147 # LLVM-NEXT: Name: v1
150 # LLVM-NEXT: Hash: 1939
151 # LLVM-NEXT: Flags: 0x0
152 # LLVM-NEXT: Index: 5
153 # LLVM-NEXT: Name: v2
157 # LLVM-NEXT: Dependency {
158 # LLVM-NEXT: Version: 1
159 # LLVM-NEXT: Count: 1
160 # LLVM-NEXT: FileName: verneed2.so.0
161 # LLVM-NEXT: Entries [
163 # LLVM-NEXT: Hash: 1937
164 # LLVM-NEXT: Flags: 0x0
165 # LLVM-NEXT: Index: 6
166 # LLVM-NEXT: Name: v3
172 # GNU: Version symbols section '.gnu.version' contains 6 entries:
173 # GNU-NEXT: Addr: 0000000000000000 Offset: 0x000280 Link: 7 (.dynsym)
174 # GNU-NEXT: 000: 0 (*local*) 2 (VERSION1) 3 (VERSION2) 4 (v1)
175 # GNU-NEXT: 004: 5 (v2) 6 (v3)
177 # GNU-NEXT: Version definition section '.gnu.version_d' contains 3 entries:
178 # GNU-NEXT: Addr: 0000000000000000 Offset: 0x00028c Link: 8 (.dynstr)
179 # GNU-NEXT: 0x0000: Rev: 1 Flags: none Index: 2 Cnt: 1 Name: VERSION1
180 # GNU-NEXT: 0x001c: Rev: 1 Flags: none Index: 3 Cnt: 2 Name: VERSION2
181 # GNU-NEXT: 0x0038: Parent 1: VERSION1
182 # GNU-NEXT: 0x001c: Rev: 1 Flags: none Index: 3 Cnt: 2 Name: VERSION2
183 # GNU-NEXT: 0x0038: Parent 1: VERSION1
185 # GNU-NEXT: Version needs section '.gnu.version_r' contains 2 entries:
186 # GNU-NEXT: Addr: 0000000000000000 Offset: 0x0002cc Link: 8 (.dynstr)
187 # GNU-NEXT: 0x0000: Version: 1 File: verneed1.so.0 Cnt: 2
188 # GNU-NEXT: 0x0010: Name: v1 Flags: none Version: 4
189 # GNU-NEXT: 0x0020: Name: v2 Flags: none Version: 5
190 # GNU-NEXT: 0x0030: Version: 1 File: verneed2.so.0 Cnt: 1
191 # GNU-NEXT: 0x0040: Name: v3 Flags: none Version: 6