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 ##The C_WEAKEXT symbol with two Function auxiliary entries and a CSECT auxiliary entry.
142 StorageClass: C_WEAKEXT
143 NumberOfAuxEntries: 3
146 OffsetToExceptionTbl: 2
148 SymIdxOfNextBeyond: 4
151 OffsetToExceptionTbl: 8
153 SymIdxOfNextBeyond: 8
156 ParameterHashIndex: 11
158 SymbolAlignmentAndType: 33
159 StorageMappingClass: XMC_PR
164 # SYMBOL32: Symbols [
165 # SYMBOL32-NEXT: Symbol {
166 # SYMBOL32-NEXT: Index: 0
167 # SYMBOL32-NEXT: Name: .file
168 # SYMBOL32-NEXT: Value (SymbolTableIndex): 0x0
169 # SYMBOL32-NEXT: Section: N_DEBUG
170 # SYMBOL32-NEXT: Source Language ID: TB_C (0x0)
171 # SYMBOL32-NEXT: CPU Version ID: 0x0
172 # SYMBOL32-NEXT: StorageClass: C_FILE (0x67)
173 # SYMBOL32-NEXT: NumberOfAuxEntries: 3
174 # SYMBOL32-NEXT: File Auxiliary Entry {
175 # SYMBOL32-NEXT: Index: 1
176 # SYMBOL32-NEXT: Name: test
177 # SYMBOL32-NEXT: Type: XFT_FN (0x0)
179 # SYMBOL32-NEXT: File Auxiliary Entry {
180 # SYMBOL32-NEXT: Index: 2
181 # SYMBOL32-NEXT: Name: foo
182 # SYMBOL32-NEXT: Type: XFT_CT (0x1)
184 # SYMBOL32-NEXT: File Auxiliary Entry {
185 # SYMBOL32-NEXT: Index: 3
186 # SYMBOL32-NEXT: Name: bar
187 # SYMBOL32-NEXT: Type: XFT_CV (0x2)
190 # SYMBOL32-NEXT: Symbol {
191 # SYMBOL32-NEXT: Index: 4
192 # SYMBOL32-NEXT: Name: .text
193 # SYMBOL32-NEXT: Value (RelocatableAddress): 0x0
194 # SYMBOL32-NEXT: Section: .text
195 # SYMBOL32-NEXT: Type: 0x0
196 # SYMBOL32-NEXT: StorageClass: C_STAT (0x3)
197 # SYMBOL32-NEXT: NumberOfAuxEntries: 1
198 # SYMBOL32-NEXT: Sect Auxiliary Entry For Stat {
199 # SYMBOL32-NEXT: Index: 5
200 # SYMBOL32-NEXT: SectionLength: 256
201 # SYMBOL32-NEXT: NumberOfRelocEnt: 4
202 # SYMBOL32-NEXT: NumberOfLineNum: 4
205 # SYMBOL32-NEXT: Symbol {
206 # SYMBOL32-NEXT: Index: 6
207 # SYMBOL32-NEXT: Name: .fun
208 # SYMBOL32-NEXT: Value (RelocatableAddress): 0x0
209 # SYMBOL32-NEXT: Section: .text
210 # SYMBOL32-NEXT: Type: 0x0
211 # SYMBOL32-NEXT: StorageClass: C_HIDEXT (0x6B)
212 # SYMBOL32-NEXT: NumberOfAuxEntries: 1
213 # SYMBOL32-NEXT: CSECT Auxiliary Entry {
214 # SYMBOL32-NEXT: Index: 7
215 # SYMBOL32-NEXT: SectionLen: 256
216 # SYMBOL32-NEXT: ParameterHashIndex: 0x2
217 # SYMBOL32-NEXT: TypeChkSectNum: 0x3
218 # SYMBOL32-NEXT: SymbolAlignmentLog2: 0
219 # SYMBOL32-NEXT: SymbolType: 0x7
220 # SYMBOL32-NEXT: StorageMappingClass: XMC_PR (0x0)
221 # SYMBOL32-NEXT: StabInfoIndex: 0x5
222 # SYMBOL32-NEXT: StabSectNum: 0x6
225 # SYMBOL32-NEXT: Symbol {
226 # SYMBOL32-NEXT: Index: 8
227 # SYMBOL32-NEXT: Name: .fun1
228 # SYMBOL32-NEXT: Value (RelocatableAddress): 0x0
229 # SYMBOL32-NEXT: Section: .text
230 # SYMBOL32-NEXT: Type: 0x20
231 # SYMBOL32-NEXT: StorageClass: C_EXT (0x2)
232 # SYMBOL32-NEXT: NumberOfAuxEntries: 1
233 # SYMBOL32-NEXT: CSECT Auxiliary Entry {
234 # SYMBOL32-NEXT: Index: 9
235 # SYMBOL32-NEXT: SectionLen: 256
236 # SYMBOL32-NEXT: ParameterHashIndex: 0x1
237 # SYMBOL32-NEXT: TypeChkSectNum: 0x2
238 # SYMBOL32-NEXT: SymbolAlignmentLog2: 0
239 # SYMBOL32-NEXT: SymbolType: XTY_CM (0x3)
240 # SYMBOL32-NEXT: StorageMappingClass: XMC_PR (0x0)
241 # SYMBOL32-NEXT: StabInfoIndex: 0x4
242 # SYMBOL32-NEXT: StabSectNum: 0x5
245 # SYMBOL32-NEXT: Symbol {
246 # SYMBOL32-NEXT: Index: 10
247 # SYMBOL32-NEXT: Name: .fun2
248 # SYMBOL32-NEXT: Value (RelocatableAddress): 0x0
249 # SYMBOL32-NEXT: Section: .text
250 # SYMBOL32-NEXT: Type: 0x20
251 # SYMBOL32-NEXT: StorageClass: C_WEAKEXT (0x6F)
252 # SYMBOL32-NEXT: NumberOfAuxEntries: 1
253 # SYMBOL32-NEXT: CSECT Auxiliary Entry {
254 # SYMBOL32-NEXT: Index: 11
255 # SYMBOL32-NEXT: SectionLen: 256
256 # SYMBOL32-NEXT: ParameterHashIndex: 0x8
257 # SYMBOL32-NEXT: TypeChkSectNum: 0x9
258 # SYMBOL32-NEXT: SymbolAlignmentLog2: 0
259 # SYMBOL32-NEXT: SymbolType: XTY_SD (0x1)
260 # SYMBOL32-NEXT: StorageMappingClass: XMC_PR (0x0)
261 # SYMBOL32-NEXT: StabInfoIndex: 0x2
262 # SYMBOL32-NEXT: StabSectNum: 0x3
265 # SYMBOL32-NEXT: Symbol {
266 # SYMBOL32-NEXT: Index: 12
267 # SYMBOL32-NEXT: Name: .fun3
268 # SYMBOL32-NEXT: Value (RelocatableAddress): 0x0
269 # SYMBOL32-NEXT: Section: N_DEBUG
270 # SYMBOL32-NEXT: Type: 0x20
271 # SYMBOL32-NEXT: StorageClass: C_WEAKEXT (0x6F)
272 # SYMBOL32-NEXT: NumberOfAuxEntries: 2
273 # SYMBOL32-NEXT: Function Auxiliary Entry {
274 # SYMBOL32-NEXT: Index: 13
275 # SYMBOL32-NEXT: OffsetToExceptionTable: 0x2
276 # SYMBOL32-NEXT: SizeOfFunction: 0x3
277 # SYMBOL32-NEXT: PointerToLineNum: 0x5
278 # SYMBOL32-NEXT: SymbolIndexOfNextBeyond: 4
280 # SYMBOL32-NEXT: CSECT Auxiliary Entry {
281 # SYMBOL32-NEXT: Index: 14
282 # SYMBOL32-NEXT: SectionLen: 256
283 # SYMBOL32-NEXT: ParameterHashIndex: 0xB
284 # SYMBOL32-NEXT: TypeChkSectNum: 0x16
285 # SYMBOL32-NEXT: SymbolAlignmentLog2: 4
286 # SYMBOL32-NEXT: SymbolType: XTY_SD (0x1)
287 # SYMBOL32-NEXT: StorageMappingClass: XMC_PR (0x0)
288 # SYMBOL32-NEXT: StabInfoIndex: 0x2C
289 # SYMBOL32-NEXT: StabSectNum: 0x37
292 # SYMBOL32-NEXT: Symbol {
293 # SYMBOL32-NEXT: Index: 15
294 # SYMBOL32-NEXT: Name: .fun4
295 # SYMBOL32-NEXT: Value (OffsetInDWARF): 0x0
296 # SYMBOL32-NEXT: Section: N_DEBUG
297 # SYMBOL32-NEXT: Type: 0x0
298 # SYMBOL32-NEXT: StorageClass: C_DWARF (0x70)
299 # SYMBOL32-NEXT: NumberOfAuxEntries: 1
300 # SYMBOL32-NEXT: Sect Auxiliary Entry For DWARF {
301 # SYMBOL32-NEXT: Index: 16
302 # SYMBOL32-NEXT: LengthOfSectionPortion: 0x2
303 # SYMBOL32-NEXT: NumberOfRelocEntries: 3
306 # SYMBOL32-NEXT: Symbol {
307 # SYMBOL32-NEXT: Index: 17
308 # SYMBOL32-NEXT: Name: .fun5
309 # SYMBOL32-NEXT: Value (RelocatableAddress): 0x0
310 # SYMBOL32-NEXT: Section: N_UNDEF
311 # SYMBOL32-NEXT: Type: 0x0
312 # SYMBOL32-NEXT: StorageClass: C_BLOCK (0x64)
313 # SYMBOL32-NEXT: NumberOfAuxEntries: 1
314 # SYMBOL32-NEXT: Block Auxiliary Entry {
315 # SYMBOL32-NEXT: Index: 18
316 # SYMBOL32-NEXT: LineNumber (High 2 Bytes): 0x2
317 # SYMBOL32-NEXT: LineNumber (Low 2 Bytes): 0x3
320 # SYMBOL32-NEXT: Symbol {
321 # SYMBOL32-NEXT: Index: 19
322 # SYMBOL32-NEXT: Name: .fun6
323 # SYMBOL32-NEXT: Value (RelocatableAddress): 0x0
324 # SYMBOL32-NEXT: Section: N_UNDEF
325 # SYMBOL32-NEXT: Type: 0x0
326 # SYMBOL32-NEXT: StorageClass: C_FCN (0x65)
327 # SYMBOL32-NEXT: NumberOfAuxEntries: 1
328 # SYMBOL32-NEXT: Block Auxiliary Entry {
329 # SYMBOL32-NEXT: Index: 20
330 # SYMBOL32-NEXT: LineNumber (High 2 Bytes): 0x2
331 # SYMBOL32-NEXT: LineNumber (Low 2 Bytes): 0x3
334 # SYMBOL32-NEXT: Symbol {
335 # SYMBOL32-NEXT: Index: 21
336 # SYMBOL32-NEXT: Name: .fun7
337 # SYMBOL32-NEXT: Value (RelocatableAddress): 0x0
338 # SYMBOL32-NEXT: Section: .text
339 # SYMBOL32-NEXT: Type: 0x0
340 # SYMBOL32-NEXT: StorageClass: C_WEAKEXT (0x6F)
341 # SYMBOL32-NEXT: NumberOfAuxEntries: 3
342 # SYMBOL32-NEXT: Function Auxiliary Entry {
343 # SYMBOL32-NEXT: Index: 22
344 # SYMBOL32-NEXT: OffsetToExceptionTable: 0x2
345 # SYMBOL32-NEXT: SizeOfFunction: 0x3
346 # SYMBOL32-NEXT: PointerToLineNum: 0x5
347 # SYMBOL32-NEXT: SymbolIndexOfNextBeyond: 4
349 # SYMBOL32-NEXT: Function Auxiliary Entry {
350 # SYMBOL32-NEXT: Index: 23
351 # SYMBOL32-NEXT: OffsetToExceptionTable: 0x8
352 # SYMBOL32-NEXT: SizeOfFunction: 0x5
353 # SYMBOL32-NEXT: PointerToLineNum: 0x5
354 # SYMBOL32-NEXT: SymbolIndexOfNextBeyond: 8
356 # SYMBOL32-NEXT: CSECT Auxiliary Entry {
357 # SYMBOL32-NEXT: Index: 24
358 # SYMBOL32-NEXT: SectionLen: 256
359 # SYMBOL32-NEXT: ParameterHashIndex: 0xB
360 # SYMBOL32-NEXT: TypeChkSectNum: 0x16
361 # SYMBOL32-NEXT: SymbolAlignmentLog2: 4
362 # SYMBOL32-NEXT: SymbolType: XTY_SD (0x1)
363 # SYMBOL32-NEXT: StorageMappingClass: XMC_PR (0x0)
364 # SYMBOL32-NEXT: StabInfoIndex: 0x2C
365 # SYMBOL32-NEXT: StabSectNum: 0x37