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-prefixes=SYMBOL32,NODEMANGLE %s
6 # RUN: llvm-readobj --symbols --no-demangle %t | FileCheck --check-prefixes=SYMBOL32,NODEMANGLE %s
7 # RUN: llvm-readobj --symbols --demangle %t | FileCheck --check-prefixes=SYMBOL32,DEMANGLE %s
15 ## The C_FILE symbol with File auxiliary entries.
24 FileNameOrString: "test"
25 FileStringType: XFT_FN
27 FileNameOrString: "foo"
28 FileStringType: XFT_CT
30 FileNameOrString: "bar"
31 FileStringType: XFT_CV
32 ## The C_STAT symbol with a SECT auxiliary entry.
44 ## The C_HIDEXT symbol with a CSECT auxiliary entry.
49 StorageClass: C_HIDEXT
55 SymbolAlignmentAndType: 7
56 StorageMappingClass: XMC_PR
60 ## The C_EXT symbol with a CSECT auxiliary entry.
71 SymbolAlignmentAndType: 3
72 StorageMappingClass: XMC_PR
76 ## The C_WEAKEXT symbol with a CSECT auxiliary entry.
81 StorageClass: C_WEAKEXT
87 SymbolAlignmentAndType: 1
88 StorageMappingClass: XMC_PR
92 ## The C_WEAKEXT symbol with a Function auxiliary entry and a CSECT auxiliary entry.
97 StorageClass: C_WEAKEXT
101 OffsetToExceptionTbl: 2
103 SymIdxOfNextBeyond: 4
106 ParameterHashIndex: 11
108 SymbolAlignmentAndType: 33
109 StorageMappingClass: XMC_PR
113 ## The C_DWARF symbol with a SECT auxiliary entry.
116 StorageClass: C_DWARF
117 NumberOfAuxEntries: 1
120 LengthOfSectionPortion: 2
122 ## The C_BLOCK symbol with a Block auxiliary entry.
124 StorageClass: C_BLOCK
125 NumberOfAuxEntries: 1
130 ## The C_FCN symbol with a Block auxiliary entry.
133 NumberOfAuxEntries: 1
139 ##The C_WEAKEXT symbol with two Function auxiliary entries and a CSECT auxiliary entry.
144 StorageClass: C_WEAKEXT
145 NumberOfAuxEntries: 3
148 OffsetToExceptionTbl: 2
150 SymIdxOfNextBeyond: 4
153 OffsetToExceptionTbl: 8
155 SymIdxOfNextBeyond: 8
158 ParameterHashIndex: 11
160 SymbolAlignmentAndType: 33
161 StorageMappingClass: XMC_PR
166 # SYMBOL32: Symbols [
167 # SYMBOL32-NEXT: Symbol {
168 # SYMBOL32-NEXT: Index: 0
169 # SYMBOL32-NEXT: Name: .file
170 # SYMBOL32-NEXT: Value (SymbolTableIndex): 0x0
171 # SYMBOL32-NEXT: Section: N_DEBUG
172 # SYMBOL32-NEXT: Source Language ID: TB_C (0x0)
173 # SYMBOL32-NEXT: CPU Version ID: TCPU_INVALID (0x0)
174 # SYMBOL32-NEXT: StorageClass: C_FILE (0x67)
175 # SYMBOL32-NEXT: NumberOfAuxEntries: 3
176 # SYMBOL32-NEXT: File Auxiliary Entry {
177 # SYMBOL32-NEXT: Index: 1
178 # SYMBOL32-NEXT: Name: test
179 # SYMBOL32-NEXT: Type: XFT_FN (0x0)
181 # SYMBOL32-NEXT: File Auxiliary Entry {
182 # SYMBOL32-NEXT: Index: 2
183 # SYMBOL32-NEXT: Name: foo
184 # SYMBOL32-NEXT: Type: XFT_CT (0x1)
186 # SYMBOL32-NEXT: File Auxiliary Entry {
187 # SYMBOL32-NEXT: Index: 3
188 # SYMBOL32-NEXT: Name: bar
189 # SYMBOL32-NEXT: Type: XFT_CV (0x2)
192 # SYMBOL32-NEXT: Symbol {
193 # SYMBOL32-NEXT: Index: 4
194 # SYMBOL32-NEXT: Name: .text
195 # SYMBOL32-NEXT: Value (RelocatableAddress): 0x0
196 # SYMBOL32-NEXT: Section: .text
197 # SYMBOL32-NEXT: Type: 0x0
198 # SYMBOL32-NEXT: StorageClass: C_STAT (0x3)
199 # SYMBOL32-NEXT: NumberOfAuxEntries: 1
200 # SYMBOL32-NEXT: Sect Auxiliary Entry For Stat {
201 # SYMBOL32-NEXT: Index: 5
202 # SYMBOL32-NEXT: SectionLength: 256
203 # SYMBOL32-NEXT: NumberOfRelocEnt: 4
204 # SYMBOL32-NEXT: NumberOfLineNum: 4
207 # SYMBOL32-NEXT: Symbol {
208 # SYMBOL32-NEXT: Index: 6
209 # SYMBOL32-NEXT: Name: .fun
210 # SYMBOL32-NEXT: Value (RelocatableAddress): 0x0
211 # SYMBOL32-NEXT: Section: .text
212 # SYMBOL32-NEXT: Type: 0x0
213 # SYMBOL32-NEXT: StorageClass: C_HIDEXT (0x6B)
214 # SYMBOL32-NEXT: NumberOfAuxEntries: 1
215 # SYMBOL32-NEXT: CSECT Auxiliary Entry {
216 # SYMBOL32-NEXT: Index: 7
217 # SYMBOL32-NEXT: SectionLen: 256
218 # SYMBOL32-NEXT: ParameterHashIndex: 0x2
219 # SYMBOL32-NEXT: TypeChkSectNum: 0x3
220 # SYMBOL32-NEXT: SymbolAlignmentLog2: 0
221 # SYMBOL32-NEXT: SymbolType: 0x7
222 # SYMBOL32-NEXT: StorageMappingClass: XMC_PR (0x0)
223 # SYMBOL32-NEXT: StabInfoIndex: 0x5
224 # SYMBOL32-NEXT: StabSectNum: 0x6
227 # SYMBOL32-NEXT: Symbol {
228 # SYMBOL32-NEXT: Index: 8
229 # NODEMANGLE-NEXT: Name: ._Z5func1i
230 # DEMANGLE-NEXT: Name: .func1(int)
231 # SYMBOL32-NEXT: Value (RelocatableAddress): 0x0
232 # SYMBOL32-NEXT: Section: .text
233 # SYMBOL32-NEXT: Type: 0x20
234 # SYMBOL32-NEXT: StorageClass: C_EXT (0x2)
235 # SYMBOL32-NEXT: NumberOfAuxEntries: 1
236 # SYMBOL32-NEXT: CSECT Auxiliary Entry {
237 # SYMBOL32-NEXT: Index: 9
238 # SYMBOL32-NEXT: SectionLen: 256
239 # SYMBOL32-NEXT: ParameterHashIndex: 0x1
240 # SYMBOL32-NEXT: TypeChkSectNum: 0x2
241 # SYMBOL32-NEXT: SymbolAlignmentLog2: 0
242 # SYMBOL32-NEXT: SymbolType: XTY_CM (0x3)
243 # SYMBOL32-NEXT: StorageMappingClass: XMC_PR (0x0)
244 # SYMBOL32-NEXT: StabInfoIndex: 0x4
245 # SYMBOL32-NEXT: StabSectNum: 0x5
248 # SYMBOL32-NEXT: Symbol {
249 # SYMBOL32-NEXT: Index: 10
250 # SYMBOL32-NEXT: Name: .fun2
251 # SYMBOL32-NEXT: Value (RelocatableAddress): 0x0
252 # SYMBOL32-NEXT: Section: .text
253 # SYMBOL32-NEXT: Type: 0x20
254 # SYMBOL32-NEXT: StorageClass: C_WEAKEXT (0x6F)
255 # SYMBOL32-NEXT: NumberOfAuxEntries: 1
256 # SYMBOL32-NEXT: CSECT Auxiliary Entry {
257 # SYMBOL32-NEXT: Index: 11
258 # SYMBOL32-NEXT: SectionLen: 256
259 # SYMBOL32-NEXT: ParameterHashIndex: 0x8
260 # SYMBOL32-NEXT: TypeChkSectNum: 0x9
261 # SYMBOL32-NEXT: SymbolAlignmentLog2: 0
262 # SYMBOL32-NEXT: SymbolType: XTY_SD (0x1)
263 # SYMBOL32-NEXT: StorageMappingClass: XMC_PR (0x0)
264 # SYMBOL32-NEXT: StabInfoIndex: 0x2
265 # SYMBOL32-NEXT: StabSectNum: 0x3
268 # SYMBOL32-NEXT: Symbol {
269 # SYMBOL32-NEXT: Index: 12
270 # SYMBOL32-NEXT: Name: .fun3
271 # SYMBOL32-NEXT: Value (RelocatableAddress): 0x0
272 # SYMBOL32-NEXT: Section: N_DEBUG
273 # SYMBOL32-NEXT: Type: 0x20
274 # SYMBOL32-NEXT: StorageClass: C_WEAKEXT (0x6F)
275 # SYMBOL32-NEXT: NumberOfAuxEntries: 2
276 # SYMBOL32-NEXT: Function Auxiliary Entry {
277 # SYMBOL32-NEXT: Index: 13
278 # SYMBOL32-NEXT: OffsetToExceptionTable: 0x2
279 # SYMBOL32-NEXT: SizeOfFunction: 0x3
280 # SYMBOL32-NEXT: PointerToLineNum: 0x5
281 # SYMBOL32-NEXT: SymbolIndexOfNextBeyond: 4
283 # SYMBOL32-NEXT: CSECT Auxiliary Entry {
284 # SYMBOL32-NEXT: Index: 14
285 # SYMBOL32-NEXT: SectionLen: 256
286 # SYMBOL32-NEXT: ParameterHashIndex: 0xB
287 # SYMBOL32-NEXT: TypeChkSectNum: 0x16
288 # SYMBOL32-NEXT: SymbolAlignmentLog2: 4
289 # SYMBOL32-NEXT: SymbolType: XTY_SD (0x1)
290 # SYMBOL32-NEXT: StorageMappingClass: XMC_PR (0x0)
291 # SYMBOL32-NEXT: StabInfoIndex: 0x2C
292 # SYMBOL32-NEXT: StabSectNum: 0x37
295 # SYMBOL32-NEXT: Symbol {
296 # SYMBOL32-NEXT: Index: 15
297 # SYMBOL32-NEXT: Name: .fun4
298 # SYMBOL32-NEXT: Value (OffsetInDWARF): 0x0
299 # SYMBOL32-NEXT: Section: N_DEBUG
300 # SYMBOL32-NEXT: Type: 0x0
301 # SYMBOL32-NEXT: StorageClass: C_DWARF (0x70)
302 # SYMBOL32-NEXT: NumberOfAuxEntries: 1
303 # SYMBOL32-NEXT: Sect Auxiliary Entry For DWARF {
304 # SYMBOL32-NEXT: Index: 16
305 # SYMBOL32-NEXT: LengthOfSectionPortion: 0x2
306 # SYMBOL32-NEXT: NumberOfRelocEntries: 3
309 # SYMBOL32-NEXT: Symbol {
310 # SYMBOL32-NEXT: Index: 17
311 # SYMBOL32-NEXT: Name: .fun5
312 # SYMBOL32-NEXT: Value (RelocatableAddress): 0x0
313 # SYMBOL32-NEXT: Section: N_UNDEF
314 # SYMBOL32-NEXT: Type: 0x0
315 # SYMBOL32-NEXT: StorageClass: C_BLOCK (0x64)
316 # SYMBOL32-NEXT: NumberOfAuxEntries: 1
317 # SYMBOL32-NEXT: Block Auxiliary Entry {
318 # SYMBOL32-NEXT: Index: 18
319 # SYMBOL32-NEXT: LineNumber (High 2 Bytes): 0x2
320 # SYMBOL32-NEXT: LineNumber (Low 2 Bytes): 0x3
323 # SYMBOL32-NEXT: Symbol {
324 # SYMBOL32-NEXT: Index: 19
325 # SYMBOL32-NEXT: Name: .fun6
326 # SYMBOL32-NEXT: Value (RelocatableAddress): 0x0
327 # SYMBOL32-NEXT: Section: N_UNDEF
328 # SYMBOL32-NEXT: Type: 0x0
329 # SYMBOL32-NEXT: StorageClass: C_FCN (0x65)
330 # SYMBOL32-NEXT: NumberOfAuxEntries: 1
331 # SYMBOL32-NEXT: Block Auxiliary Entry {
332 # SYMBOL32-NEXT: Index: 20
333 # SYMBOL32-NEXT: LineNumber (High 2 Bytes): 0x2
334 # SYMBOL32-NEXT: LineNumber (Low 2 Bytes): 0x3
337 # SYMBOL32-NEXT: Symbol {
338 # SYMBOL32-NEXT: Index: 21
339 # SYMBOL32-NEXT: Name: .fun7
340 # SYMBOL32-NEXT: Value (RelocatableAddress): 0x0
341 # SYMBOL32-NEXT: Section: .text
342 # SYMBOL32-NEXT: Type: 0x0
343 # SYMBOL32-NEXT: StorageClass: C_WEAKEXT (0x6F)
344 # SYMBOL32-NEXT: NumberOfAuxEntries: 3
345 # SYMBOL32-NEXT: Function Auxiliary Entry {
346 # SYMBOL32-NEXT: Index: 22
347 # SYMBOL32-NEXT: OffsetToExceptionTable: 0x2
348 # SYMBOL32-NEXT: SizeOfFunction: 0x3
349 # SYMBOL32-NEXT: PointerToLineNum: 0x5
350 # SYMBOL32-NEXT: SymbolIndexOfNextBeyond: 4
352 # SYMBOL32-NEXT: Function Auxiliary Entry {
353 # SYMBOL32-NEXT: Index: 23
354 # SYMBOL32-NEXT: OffsetToExceptionTable: 0x8
355 # SYMBOL32-NEXT: SizeOfFunction: 0x5
356 # SYMBOL32-NEXT: PointerToLineNum: 0x5
357 # SYMBOL32-NEXT: SymbolIndexOfNextBeyond: 8
359 # SYMBOL32-NEXT: CSECT Auxiliary Entry {
360 # SYMBOL32-NEXT: Index: 24
361 # SYMBOL32-NEXT: SectionLen: 256
362 # SYMBOL32-NEXT: ParameterHashIndex: 0xB
363 # SYMBOL32-NEXT: TypeChkSectNum: 0x16
364 # SYMBOL32-NEXT: SymbolAlignmentLog2: 4
365 # SYMBOL32-NEXT: SymbolType: XTY_SD (0x1)
366 # SYMBOL32-NEXT: StorageMappingClass: XMC_PR (0x0)
367 # SYMBOL32-NEXT: StabInfoIndex: 0x2C
368 # SYMBOL32-NEXT: StabSectNum: 0x37