1 ## This file tests the ability of llvm-readobj to display the symbol table for a
2 ## 32-bit XCOFF object file.
4 # RUN: yaml2obj %s -o %t
5 # RUN: llvm-readobj --symbols %t | FileCheck --check-prefix=SYMBOL32 %s
13 ## The C_FILE symbol with File auxiliary entries.
22 FileNameOrString: "test"
23 FileStringType: XFT_FN
25 FileNameOrString: "foo"
26 FileStringType: XFT_CT
28 FileNameOrString: "bar"
29 FileStringType: XFT_CV
30 ## The C_STAT symbol with a SECT auxiliary entry.
42 ## The C_HIDEXT symbol with a CSECT auxiliary entry.
47 StorageClass: C_HIDEXT
53 SymbolAlignmentAndType: 7
54 StorageMappingClass: XMC_PR
58 ## The C_EXT symbol with a CSECT auxiliary entry.
69 SymbolAlignmentAndType: 3
70 StorageMappingClass: XMC_PR
74 ## The C_WEAKEXT symbol with a CSECT auxiliary entry.
79 StorageClass: C_WEAKEXT
85 SymbolAlignmentAndType: 1
86 StorageMappingClass: XMC_PR
90 ## The C_WEAKEXT symbol with a Function auxiliary entry and a CSECT auxiliary entry.
95 StorageClass: C_WEAKEXT
99 OffsetToExceptionTbl: 2
101 SymIdxOfNextBeyond: 4
104 ParameterHashIndex: 11
106 SymbolAlignmentAndType: 33
107 StorageMappingClass: XMC_PR
111 ## The C_DWARF symbol with a SECT auxiliary entry.
114 StorageClass: C_DWARF
115 NumberOfAuxEntries: 1
118 LengthOfSectionPortion: 2
120 ## The C_BLOCK symbol with a Block auxiliary entry.
122 StorageClass: C_BLOCK
123 NumberOfAuxEntries: 1
128 ## The C_FCN symbol with a Block auxiliary entry.
131 NumberOfAuxEntries: 1
137 # SYMBOL32: Symbols [
138 # SYMBOL32-NEXT: Symbol {
139 # SYMBOL32-NEXT: Index: 0
140 # SYMBOL32-NEXT: Name: .file
141 # SYMBOL32-NEXT: Value (SymbolTableIndex): 0x0
142 # SYMBOL32-NEXT: Section: N_DEBUG
143 # SYMBOL32-NEXT: Source Language ID: TB_C (0x0)
144 # SYMBOL32-NEXT: CPU Version ID: 0x0
145 # SYMBOL32-NEXT: StorageClass: C_FILE (0x67)
146 # SYMBOL32-NEXT: NumberOfAuxEntries: 3
147 # SYMBOL32-NEXT: File Auxiliary Entry {
148 # SYMBOL32-NEXT: Index: 1
149 # SYMBOL32-NEXT: Name: test
150 # SYMBOL32-NEXT: Type: XFT_FN (0x0)
152 # SYMBOL32-NEXT: File Auxiliary Entry {
153 # SYMBOL32-NEXT: Index: 2
154 # SYMBOL32-NEXT: Name: foo
155 # SYMBOL32-NEXT: Type: XFT_CT (0x1)
157 # SYMBOL32-NEXT: File Auxiliary Entry {
158 # SYMBOL32-NEXT: Index: 3
159 # SYMBOL32-NEXT: Name: bar
160 # SYMBOL32-NEXT: Type: XFT_CV (0x2)
163 # SYMBOL32-NEXT: Symbol {
164 # SYMBOL32-NEXT: Index: 4
165 # SYMBOL32-NEXT: Name: .text
166 # SYMBOL32-NEXT: Value (RelocatableAddress): 0x0
167 # SYMBOL32-NEXT: Section: .text
168 # SYMBOL32-NEXT: Type: 0x0
169 # SYMBOL32-NEXT: StorageClass: C_STAT (0x3)
170 # SYMBOL32-NEXT: NumberOfAuxEntries: 1
171 # SYMBOL32-NEXT: Sect Auxiliary Entry For Stat {
172 # SYMBOL32-NEXT: Index: 5
173 # SYMBOL32-NEXT: SectionLength: 256
174 # SYMBOL32-NEXT: NumberOfRelocEnt: 4
175 # SYMBOL32-NEXT: NumberOfLineNum: 4
178 # SYMBOL32-NEXT: Symbol {
179 # SYMBOL32-NEXT: Index: 6
180 # SYMBOL32-NEXT: Name: .fun
181 # SYMBOL32-NEXT: Value (RelocatableAddress): 0x0
182 # SYMBOL32-NEXT: Section: .text
183 # SYMBOL32-NEXT: Type: 0x0
184 # SYMBOL32-NEXT: StorageClass: C_HIDEXT (0x6B)
185 # SYMBOL32-NEXT: NumberOfAuxEntries: 1
186 # SYMBOL32-NEXT: CSECT Auxiliary Entry {
187 # SYMBOL32-NEXT: Index: 7
188 # SYMBOL32-NEXT: SectionLen: 256
189 # SYMBOL32-NEXT: ParameterHashIndex: 0x2
190 # SYMBOL32-NEXT: TypeChkSectNum: 0x3
191 # SYMBOL32-NEXT: SymbolAlignmentLog2: 0
192 # SYMBOL32-NEXT: SymbolType: 0x7
193 # SYMBOL32-NEXT: StorageMappingClass: XMC_PR (0x0)
194 # SYMBOL32-NEXT: StabInfoIndex: 0x5
195 # SYMBOL32-NEXT: StabSectNum: 0x6
198 # SYMBOL32-NEXT: Symbol {
199 # SYMBOL32-NEXT: Index: 8
200 # SYMBOL32-NEXT: Name: .fun1
201 # SYMBOL32-NEXT: Value (RelocatableAddress): 0x0
202 # SYMBOL32-NEXT: Section: .text
203 # SYMBOL32-NEXT: Type: 0x20
204 # SYMBOL32-NEXT: StorageClass: C_EXT (0x2)
205 # SYMBOL32-NEXT: NumberOfAuxEntries: 1
206 # SYMBOL32-NEXT: CSECT Auxiliary Entry {
207 # SYMBOL32-NEXT: Index: 9
208 # SYMBOL32-NEXT: SectionLen: 256
209 # SYMBOL32-NEXT: ParameterHashIndex: 0x1
210 # SYMBOL32-NEXT: TypeChkSectNum: 0x2
211 # SYMBOL32-NEXT: SymbolAlignmentLog2: 0
212 # SYMBOL32-NEXT: SymbolType: XTY_CM (0x3)
213 # SYMBOL32-NEXT: StorageMappingClass: XMC_PR (0x0)
214 # SYMBOL32-NEXT: StabInfoIndex: 0x4
215 # SYMBOL32-NEXT: StabSectNum: 0x5
218 # SYMBOL32-NEXT: Symbol {
219 # SYMBOL32-NEXT: Index: 10
220 # SYMBOL32-NEXT: Name: .fun2
221 # SYMBOL32-NEXT: Value (RelocatableAddress): 0x0
222 # SYMBOL32-NEXT: Section: .text
223 # SYMBOL32-NEXT: Type: 0x20
224 # SYMBOL32-NEXT: StorageClass: C_WEAKEXT (0x6F)
225 # SYMBOL32-NEXT: NumberOfAuxEntries: 1
226 # SYMBOL32-NEXT: CSECT Auxiliary Entry {
227 # SYMBOL32-NEXT: Index: 11
228 # SYMBOL32-NEXT: SectionLen: 256
229 # SYMBOL32-NEXT: ParameterHashIndex: 0x8
230 # SYMBOL32-NEXT: TypeChkSectNum: 0x9
231 # SYMBOL32-NEXT: SymbolAlignmentLog2: 0
232 # SYMBOL32-NEXT: SymbolType: XTY_SD (0x1)
233 # SYMBOL32-NEXT: StorageMappingClass: XMC_PR (0x0)
234 # SYMBOL32-NEXT: StabInfoIndex: 0x2
235 # SYMBOL32-NEXT: StabSectNum: 0x3
238 # SYMBOL32-NEXT: Symbol {
239 # SYMBOL32-NEXT: Index: 12
240 # SYMBOL32-NEXT: Name: .fun3
241 # SYMBOL32-NEXT: Value (RelocatableAddress): 0x0
242 # SYMBOL32-NEXT: Section: N_DEBUG
243 # SYMBOL32-NEXT: Type: 0x20
244 # SYMBOL32-NEXT: StorageClass: C_WEAKEXT (0x6F)
245 # SYMBOL32-NEXT: NumberOfAuxEntries: 2
246 # SYMBOL32-NEXT: Function Auxiliary Entry {
247 # SYMBOL32-NEXT: Index: 13
248 # SYMBOL32-NEXT: OffsetToExceptionTable: 0x2
249 # SYMBOL32-NEXT: SizeOfFunction: 0x3
250 # SYMBOL32-NEXT: PointerToLineNum: 0x5
251 # SYMBOL32-NEXT: SymbolIndexOfNextBeyond: 4
253 # SYMBOL32-NEXT: CSECT Auxiliary Entry {
254 # SYMBOL32-NEXT: Index: 14
255 # SYMBOL32-NEXT: SectionLen: 256
256 # SYMBOL32-NEXT: ParameterHashIndex: 0xB
257 # SYMBOL32-NEXT: TypeChkSectNum: 0x16
258 # SYMBOL32-NEXT: SymbolAlignmentLog2: 4
259 # SYMBOL32-NEXT: SymbolType: XTY_SD (0x1)
260 # SYMBOL32-NEXT: StorageMappingClass: XMC_PR (0x0)
261 # SYMBOL32-NEXT: StabInfoIndex: 0x2C
262 # SYMBOL32-NEXT: StabSectNum: 0x37
265 # SYMBOL32-NEXT: Symbol {
266 # SYMBOL32-NEXT: Index: 15
267 # SYMBOL32-NEXT: Name: .fun4
268 # SYMBOL32-NEXT: Value (OffsetInDWARF): 0x0
269 # SYMBOL32-NEXT: Section: N_DEBUG
270 # SYMBOL32-NEXT: Type: 0x0
271 # SYMBOL32-NEXT: StorageClass: C_DWARF (0x70)
272 # SYMBOL32-NEXT: NumberOfAuxEntries: 1
273 # SYMBOL32-NEXT: Sect Auxiliary Entry For DWARF {
274 # SYMBOL32-NEXT: Index: 16
275 # SYMBOL32-NEXT: LengthOfSectionPortion: 0x2
276 # SYMBOL32-NEXT: NumberOfRelocEntries: 3
279 # SYMBOL32-NEXT: Symbol {
280 # SYMBOL32-NEXT: Index: 17
281 # SYMBOL32-NEXT: Name: .fun5
282 # SYMBOL32-NEXT: Value (RelocatableAddress): 0x0
283 # SYMBOL32-NEXT: Section: N_UNDEF
284 # SYMBOL32-NEXT: Type: 0x0
285 # SYMBOL32-NEXT: StorageClass: C_BLOCK (0x64)
286 # SYMBOL32-NEXT: NumberOfAuxEntries: 1
287 # SYMBOL32-NEXT: Block Auxiliary Entry {
288 # SYMBOL32-NEXT: Index: 18
289 # SYMBOL32-NEXT: LineNumber (High 2 Bytes): 0x2
290 # SYMBOL32-NEXT: LineNumber (Low 2 Bytes): 0x3
293 # SYMBOL32-NEXT: Symbol {
294 # SYMBOL32-NEXT: Index: 19
295 # SYMBOL32-NEXT: Name: .fun6
296 # SYMBOL32-NEXT: Value (RelocatableAddress): 0x0
297 # SYMBOL32-NEXT: Section: N_UNDEF
298 # SYMBOL32-NEXT: Type: 0x0
299 # SYMBOL32-NEXT: StorageClass: C_FCN (0x65)
300 # SYMBOL32-NEXT: NumberOfAuxEntries: 1
301 # SYMBOL32-NEXT: Block Auxiliary Entry {
302 # SYMBOL32-NEXT: Index: 20
303 # SYMBOL32-NEXT: LineNumber (High 2 Bytes): 0x2
304 # SYMBOL32-NEXT: LineNumber (Low 2 Bytes): 0x3