1 ## Check that we are able to dump auxiliary symbols.
2 ## 1. We can use default values for the fields of auxiliary symbols.
3 ## 2. We can explicitly specify all fields for auxiliary symbols.
5 ## Case1: check the default behaviour in XCOFF32.
6 # RUN: yaml2obj %s --docnum=1 -o %t1
7 # RUN: llvm-readobj --syms %t1 | FileCheck %s --check-prefix=DEFAULT32
10 # DEFAULT32-NEXT: Symbol {
11 # DEFAULT32-NEXT: Index: 0
12 # DEFAULT32-NEXT: Name: aux_fcn_csect
13 # DEFAULT32-NEXT: Value (RelocatableAddress): 0x0
14 # DEFAULT32-NEXT: Section: N_UNDEF
15 # DEFAULT32-NEXT: Type: 0x20
16 # DEFAULT32-NEXT: StorageClass: C_EXT (0x2)
17 # DEFAULT32-NEXT: NumberOfAuxEntries: 2
18 # DEFAULT32-NEXT: Function Auxiliary Entry {
19 # DEFAULT32-NEXT: Index: 1
20 # DEFAULT32-NEXT: OffsetToExceptionTable: 0x0
21 # DEFAULT32-NEXT: SizeOfFunction: 0x0
22 # DEFAULT32-NEXT: PointerToLineNum: 0x0
23 # DEFAULT32-NEXT: SymbolIndexOfNextBeyond: 0
25 # DEFAULT32-NEXT: CSECT Auxiliary Entry {
26 # DEFAULT32-NEXT: Index: 2
27 # DEFAULT32-NEXT: SectionLen: 0
28 # DEFAULT32-NEXT: ParameterHashIndex: 0x0
29 # DEFAULT32-NEXT: TypeChkSectNum: 0x0
30 # DEFAULT32-NEXT: SymbolAlignmentLog2: 0
31 # DEFAULT32-NEXT: SymbolType: XTY_ER (0x0)
32 # DEFAULT32-NEXT: StorageMappingClass: XMC_PR (0x0)
33 # DEFAULT32-NEXT: StabInfoIndex: 0x0
34 # DEFAULT32-NEXT: StabSectNum: 0x0
37 # DEFAULT32-NEXT: Symbol {
38 # DEFAULT32-NEXT: Index: 3
39 # DEFAULT32-NEXT: Name: aux_stat
40 # DEFAULT32-NEXT: Value (RelocatableAddress): 0x0
41 # DEFAULT32-NEXT: Section: N_UNDEF
42 # DEFAULT32-NEXT: Type: 0x0
43 # DEFAULT32-NEXT: StorageClass: C_STAT (0x3)
44 # DEFAULT32-NEXT: NumberOfAuxEntries: 1
45 # DEFAULT32-NEXT: Sect Auxiliary Entry For Stat {
46 # DEFAULT32-NEXT: Index: 4
47 # DEFAULT32-NEXT: SectionLength: 0
48 # DEFAULT32-NEXT: NumberOfRelocEnt: 0
49 # DEFAULT32-NEXT: NumberOfLineNum: 0
52 # DEFAULT32-NEXT: Symbol {
53 # DEFAULT32-NEXT: Index: 5
54 # DEFAULT32-NEXT: Name: aux_sym
55 # DEFAULT32-NEXT: Value (RelocatableAddress): 0x0
56 # DEFAULT32-NEXT: Section: N_UNDEF
57 # DEFAULT32-NEXT: Type: 0x0
58 # DEFAULT32-NEXT: StorageClass: C_BLOCK (0x64)
59 # DEFAULT32-NEXT: NumberOfAuxEntries: 1
60 # DEFAULT32-NEXT: Block Auxiliary Entry {
61 # DEFAULT32-NEXT: Index: 6
62 # DEFAULT32-NEXT: LineNumber (High 2 Bytes): 0x0
63 # DEFAULT32-NEXT: LineNumber (Low 2 Bytes): 0x0
66 # DEFAULT32-NEXT: Symbol {
67 # DEFAULT32-NEXT: Index: 7
68 # DEFAULT32-NEXT: Name: aux_file
69 # DEFAULT32-NEXT: Value (SymbolTableIndex): 0x0
70 # DEFAULT32-NEXT: Section: N_UNDEF
71 # DEFAULT32-NEXT: Source Language ID: TB_C (0x0)
72 # DEFAULT32-NEXT: CPU Version ID: 0x0
73 # DEFAULT32-NEXT: StorageClass: C_FILE (0x67)
74 # DEFAULT32-NEXT: NumberOfAuxEntries: 1
75 # DEFAULT32-NEXT: File Auxiliary Entry {
76 # DEFAULT32-NEXT: Index: 8
77 # DEFAULT32-NEXT: Name:
78 # DEFAULT32-NEXT: Type: XFT_FN (0x0)
81 # DEFAULT32-NEXT: Symbol {
82 # DEFAULT32-NEXT: Index: 9
83 # DEFAULT32-NEXT: Name: aux_sect
84 # DEFAULT32-NEXT: Value (OffsetInDWARF): 0x0
85 # DEFAULT32-NEXT: Section: N_UNDEF
86 # DEFAULT32-NEXT: Type: 0x0
87 # DEFAULT32-NEXT: StorageClass: C_DWARF (0x70)
88 # DEFAULT32-NEXT: NumberOfAuxEntries: 1
89 # DEFAULT32-NEXT: Sect Auxiliary Entry For DWARF {
90 # DEFAULT32-NEXT: Index: 10
91 # DEFAULT32-NEXT: LengthOfSectionPortion: 0x0
92 # DEFAULT32-NEXT: NumberOfRelocEntries: 0
101 - Name: aux_fcn_csect
106 OffsetToExceptionTbl: [[OFFTOEXP=<none>]]
107 SizeOfFunction: [[SIZEOFFUN=<none>]]
108 SymIdxOfNextBeyond: [[SYMIDXOFNEXT=<none>]]
109 PtrToLineNum: [[PTRTOLINE=<none>]]
111 ParameterHashIndex: [[HASHIDX=<none>]]
112 TypeChkSectNum: [[TYPECHKNUM=<none>]]
113 SymbolAlignmentAndType: [[SYMALIGN=<none>]]
114 StorageMappingClass: [[STORMAPCLASS=<none>]]
115 SectionOrLength: [[SECTORLEN=<none>]]
116 StabInfoIndex: [[STABIDX=<none>]]
117 StabSectNum: [[STABNUM=<none>]]
122 SectionLength: [[SECTLEN=<none>]]
123 NumberOfRelocEnt: [[NUMOFREL=<none>]]
124 NumberOfLineNum: [[NUMOFLINE=<none>]]
126 StorageClass: C_BLOCK
129 LineNumHi: [[LINEHI=<none>]]
130 LineNumLo: [[LINELO=<none>]]
135 FileNameOrString: [[FILENAME=<none>]]
136 FileStringType: [[FILETYPE=<none>]]
138 StorageClass: C_DWARF
141 LengthOfSectionPortion: [[LENOFSEC=<none>]]
142 NumberOfRelocEnt: [[NUMOFRELOC=<none>]]
144 ## Case2: check the non-default behaviour in XCOFF32.
145 # RUN: yaml2obj %s --docnum=1 -o %t2 -DOFFTOEXP=2 -DSIZEOFFUN=3 \
146 # RUN: -DSYMIDXOFNEXT=4 -DPTRTOLINE=5 -DHASHIDX=2 -DTYPECHKNUM=3 \
147 # RUN: -DSYMALIGN=4 -DSTORMAPCLASS=XMC_RO -DSECTORLEN=6 -DSTABIDX=7 \
148 # RUN: -DSTABNUM=8 -DSECTLEN=2 -DNUMOFREL=3 -DNUMOFLINE=4 \
149 # RUN: -DLINEHI=2 -DLINELO=3 -DFILENAME='fname' -DFILETYPE=XFT_CD \
150 # RUN: -DLENOFSEC=2 -DNUMOFRELOC=3
151 # RUN: llvm-readobj --syms %t2 | FileCheck %s --check-prefix=NON-DEFAULT32
153 # NON-DEFAULT32: Symbols [
154 # NON-DEFAULT32-NEXT: Symbol {
155 # NON-DEFAULT32-NEXT: Index: 0
156 # NON-DEFAULT32-NEXT: Name: aux_fcn_csect
157 # NON-DEFAULT32-NEXT: Value (RelocatableAddress): 0x0
158 # NON-DEFAULT32-NEXT: Section: N_UNDEF
159 # NON-DEFAULT32-NEXT: Type: 0x20
160 # NON-DEFAULT32-NEXT: StorageClass: C_EXT (0x2)
161 # NON-DEFAULT32-NEXT: NumberOfAuxEntries: 2
162 # NON-DEFAULT32-NEXT: Function Auxiliary Entry {
163 # NON-DEFAULT32-NEXT: Index: 1
164 # NON-DEFAULT32-NEXT: OffsetToExceptionTable: 0x2
165 # NON-DEFAULT32-NEXT: SizeOfFunction: 0x3
166 # NON-DEFAULT32-NEXT: PointerToLineNum: 0x5
167 # NON-DEFAULT32-NEXT: SymbolIndexOfNextBeyond: 4
168 # NON-DEFAULT32-NEXT: }
169 # NON-DEFAULT32-NEXT: CSECT Auxiliary Entry {
170 # NON-DEFAULT32-NEXT: Index: 2
171 # NON-DEFAULT32-NEXT: SectionLen: 6
172 # NON-DEFAULT32-NEXT: ParameterHashIndex: 0x2
173 # NON-DEFAULT32-NEXT: TypeChkSectNum: 0x3
174 # NON-DEFAULT32-NEXT: SymbolAlignmentLog2: 0
175 # NON-DEFAULT32-NEXT: SymbolType: 0x4
176 # NON-DEFAULT32-NEXT: StorageMappingClass: XMC_RO (0x1)
177 # NON-DEFAULT32-NEXT: StabInfoIndex: 0x7
178 # NON-DEFAULT32-NEXT: StabSectNum: 0x8
179 # NON-DEFAULT32-NEXT: }
180 # NON-DEFAULT32-NEXT: }
181 # NON-DEFAULT32-NEXT: Symbol {
182 # NON-DEFAULT32-NEXT: Index: 3
183 # NON-DEFAULT32-NEXT: Name: aux_stat
184 # NON-DEFAULT32-NEXT: Value (RelocatableAddress): 0x0
185 # NON-DEFAULT32-NEXT: Section: N_UNDEF
186 # NON-DEFAULT32-NEXT: Type: 0x0
187 # NON-DEFAULT32-NEXT: StorageClass: C_STAT (0x3)
188 # NON-DEFAULT32-NEXT: NumberOfAuxEntries: 1
189 # NON-DEFAULT32-NEXT: Sect Auxiliary Entry For Stat {
190 # NON-DEFAULT32-NEXT: Index: 4
191 # NON-DEFAULT32-NEXT: SectionLength: 2
192 # NON-DEFAULT32-NEXT: NumberOfRelocEnt: 3
193 # NON-DEFAULT32-NEXT: NumberOfLineNum: 4
194 # NON-DEFAULT32-NEXT: }
195 # NON-DEFAULT32-NEXT: }
196 # NON-DEFAULT32-NEXT: Symbol {
197 # NON-DEFAULT32-NEXT: Index: 5
198 # NON-DEFAULT32-NEXT: Name: aux_sym
199 # NON-DEFAULT32-NEXT: Value (RelocatableAddress): 0x0
200 # NON-DEFAULT32-NEXT: Section: N_UNDEF
201 # NON-DEFAULT32-NEXT: Type: 0x0
202 # NON-DEFAULT32-NEXT: StorageClass: C_BLOCK (0x64)
203 # NON-DEFAULT32-NEXT: NumberOfAuxEntries: 1
204 # NON-DEFAULT32-NEXT: Block Auxiliary Entry {
205 # NON-DEFAULT32-NEXT: Index: 6
206 # NON-DEFAULT32-NEXT: LineNumber (High 2 Bytes): 0x2
207 # NON-DEFAULT32-NEXT: LineNumber (Low 2 Bytes): 0x3
208 # NON-DEFAULT32-NEXT: }
209 # NON-DEFAULT32-NEXT: }
210 # NON-DEFAULT32-NEXT: Symbol {
211 # NON-DEFAULT32-NEXT: Index: 7
212 # NON-DEFAULT32-NEXT: Name: aux_file
213 # NON-DEFAULT32-NEXT: Value (SymbolTableIndex): 0x0
214 # NON-DEFAULT32-NEXT: Section: N_UNDEF
215 # NON-DEFAULT32-NEXT: Source Language ID: TB_C (0x0)
216 # NON-DEFAULT32-NEXT: CPU Version ID: 0x0
217 # NON-DEFAULT32-NEXT: StorageClass: C_FILE (0x67)
218 # NON-DEFAULT32-NEXT: NumberOfAuxEntries: 1
219 # NON-DEFAULT32-NEXT: File Auxiliary Entry {
220 # NON-DEFAULT32-NEXT: Index: 8
221 # NON-DEFAULT32-NEXT: Name: fname
222 # NON-DEFAULT32-NEXT: Type: XFT_CD (0x80)
223 # NON-DEFAULT32-NEXT: }
224 # NON-DEFAULT32-NEXT: }
225 # NON-DEFAULT32-NEXT: Symbol {
226 # NON-DEFAULT32-NEXT: Index: 9
227 # NON-DEFAULT32-NEXT: Name: aux_sect
228 # NON-DEFAULT32-NEXT: Value (OffsetInDWARF): 0x0
229 # NON-DEFAULT32-NEXT: Section: N_UNDEF
230 # NON-DEFAULT32-NEXT: Type: 0x0
231 # NON-DEFAULT32-NEXT: StorageClass: C_DWARF (0x70)
232 # NON-DEFAULT32-NEXT: NumberOfAuxEntries: 1
233 # NON-DEFAULT32-NEXT: Sect Auxiliary Entry For DWARF {
234 # NON-DEFAULT32-NEXT: Index: 10
235 # NON-DEFAULT32-NEXT: LengthOfSectionPortion: 0x2
236 # NON-DEFAULT32-NEXT: NumberOfRelocEntries: 3
237 # NON-DEFAULT32-NEXT: }
238 # NON-DEFAULT32-NEXT: }
239 # NON-DEFAULT32-NEXT: ]
241 ## Case3: check the default behaviour in XCOFF64.
242 # RUN: yaml2obj %s --docnum=2 -o %t3
243 # RUN: llvm-readobj --syms %t3 | FileCheck %s --check-prefix=DEFAULT64
245 # DEFAULT64: Symbols [
246 # DEFAULT64-NEXT: Symbol {
247 # DEFAULT64-NEXT: Index: 0
248 # DEFAULT64-NEXT: Name: aux_except_fcn_csect
249 # DEFAULT64-NEXT: Value (RelocatableAddress): 0x0
250 # DEFAULT64-NEXT: Section: N_UNDEF
251 # DEFAULT64-NEXT: Type: 0x20
252 # DEFAULT64-NEXT: StorageClass: C_EXT (0x2)
253 # DEFAULT64-NEXT: NumberOfAuxEntries: 3
254 # DEFAULT64-NEXT: Exception Auxiliary Entry {
255 # DEFAULT64-NEXT: Index: 1
256 # DEFAULT64-NEXT: OffsetToExceptionTable: 0x0
257 # DEFAULT64-NEXT: SizeOfFunction: 0x0
258 # DEFAULT64-NEXT: SymbolIndexOfNextBeyond: 0
259 # DEFAULT64-NEXT: Auxiliary Type: AUX_EXCEPT (0xFF)
261 # DEFAULT64-NEXT: Function Auxiliary Entry {
262 # DEFAULT64-NEXT: Index: 2
263 # DEFAULT64-NEXT: SizeOfFunction: 0x0
264 # DEFAULT64-NEXT: PointerToLineNum: 0x0
265 # DEFAULT64-NEXT: SymbolIndexOfNextBeyond: 0
266 # DEFAULT64-NEXT: Auxiliary Type: AUX_FCN (0xFE)
268 # DEFAULT64-NEXT: CSECT Auxiliary Entry {
269 # DEFAULT64-NEXT: Index: 3
270 # DEFAULT64-NEXT: SectionLen: 0
271 # DEFAULT64-NEXT: ParameterHashIndex: 0x0
272 # DEFAULT64-NEXT: TypeChkSectNum: 0x0
273 # DEFAULT64-NEXT: SymbolAlignmentLog2: 0
274 # DEFAULT64-NEXT: SymbolType: XTY_ER (0x0)
275 # DEFAULT64-NEXT: StorageMappingClass: XMC_PR (0x0)
276 # DEFAULT64-NEXT: Auxiliary Type: AUX_CSECT (0xFB)
279 # DEFAULT64-NEXT: Symbol {
280 # DEFAULT64-NEXT: Index: 4
281 # DEFAULT64-NEXT: Name: aux_sym
282 # DEFAULT64-NEXT: Value (RelocatableAddress): 0x0
283 # DEFAULT64-NEXT: Section: N_UNDEF
284 # DEFAULT64-NEXT: Type: 0x0
285 # DEFAULT64-NEXT: StorageClass: C_BLOCK (0x64)
286 # DEFAULT64-NEXT: NumberOfAuxEntries: 1
287 # DEFAULT64-NEXT: Block Auxiliary Entry {
288 # DEFAULT64-NEXT: Index: 5
289 # DEFAULT64-NEXT: LineNumber: 0x0
290 # DEFAULT64-NEXT: Auxiliary Type: AUX_SYM (0xFD)
293 # DEFAULT64-NEXT: Symbol {
294 # DEFAULT64-NEXT: Index: 6
295 # DEFAULT64-NEXT: Name: aux_file
296 # DEFAULT64-NEXT: Value (SymbolTableIndex): 0x0
297 # DEFAULT64-NEXT: Section: N_UNDEF
298 # DEFAULT64-NEXT: Source Language ID: TB_C (0x0)
299 # DEFAULT64-NEXT: CPU Version ID: 0x0
300 # DEFAULT64-NEXT: StorageClass: C_FILE (0x67)
301 # DEFAULT64-NEXT: NumberOfAuxEntries: 1
302 # DEFAULT64-NEXT: File Auxiliary Entry {
303 # DEFAULT64-NEXT: Index: 7
304 # DEFAULT64-NEXT: Name:
305 # DEFAULT64-NEXT: Type: XFT_FN (0x0)
306 # DEFAULT64-NEXT: Auxiliary Type: AUX_FILE (0xFC)
309 # DEFAULT64-NEXT: Symbol {
310 # DEFAULT64-NEXT: Index: 8
311 # DEFAULT64-NEXT: Name: aux_sect
312 # DEFAULT64-NEXT: Value (OffsetInDWARF): 0x0
313 # DEFAULT64-NEXT: Section: N_UNDEF
314 # DEFAULT64-NEXT: Type: 0x0
315 # DEFAULT64-NEXT: StorageClass: C_DWARF (0x70)
316 # DEFAULT64-NEXT: NumberOfAuxEntries: 1
317 # DEFAULT64-NEXT: Sect Auxiliary Entry For DWARF {
318 # DEFAULT64-NEXT: Index: 9
319 # DEFAULT64-NEXT: LengthOfSectionPortion: 0x0
320 # DEFAULT64-NEXT: NumberOfRelocEntries: 0
321 # DEFAULT64-NEXT: Auxiliary Type: AUX_SECT (0xFA)
330 - Name: aux_except_fcn_csect
335 OffsetToExceptionTbl: [[OFFTOEXP=<none>]]
336 SizeOfFunction: [[SIZEOFFUN=<none>]]
337 SymIdxOfNextBeyond: [[SYMIDXOFNEXT=<none>]]
339 SizeOfFunction: [[SIZEOFFUN2=<none>]]
340 SymIdxOfNextBeyond: [[SYMIDXOFNEXT2=<none>]]
341 PtrToLineNum: [[PTRTOLINE=<none>]]
343 ParameterHashIndex: [[HASHIDX=<none>]]
344 TypeChkSectNum: [[TYPECHKNUM=<none>]]
345 SymbolAlignmentAndType: [[SYMALIGN=<none>]]
346 StorageMappingClass: [[STORMAPCLASS=<none>]]
347 SectionOrLengthLo: [[SECTLENLO=<none>]]
348 SectionOrLengthHi: [[SECTLENHI=<none>]]
350 StorageClass: C_BLOCK
353 LineNum: [[LINENUM=<none>]]
358 FileNameOrString: [[FILENAME=<none>]]
359 FileStringType: [[FILETYPE=<none>]]
361 StorageClass: C_DWARF
364 LengthOfSectionPortion: [[LENOFSEC=<none>]]
365 NumberOfRelocEnt: [[NUMOFRELOC=<none>]]
367 ## Case4: check the non-default behaviour in XCOFF64.
368 # RUN: yaml2obj %s --docnum=2 -o %t4 -DOFFTOEXP=2 -DSIZEOFFUN=3 \
369 # RUN: -DSYMIDXOFNEXT=4 -DSIZEOFFUN2=2 -DSYMIDXOFNEXT2=3 -DPTRTOLINE=4 \
370 # RUN: -DHASHIDX=2 -DTYPECHKNUM=3 -DSYMALIGN=4 -DSTORMAPCLASS=XMC_RO \
371 # RUN: -DSECTLENLO=5 -DSECTLENHI=1 -DLINENUM=2 -DFILENAME='fname' \
372 # RUN: -DFILETYPE=XFT_CD -DLENOFSEC=2 -DNUMOFRELOC=3
373 # RUN: llvm-readobj --syms %t4 | FileCheck %s --check-prefix=NON-DEFAULT64
375 # NON-DEFAULT64: Symbols [
376 # NON-DEFAULT64-NEXT: Symbol {
377 # NON-DEFAULT64-NEXT: Index: 0
378 # NON-DEFAULT64-NEXT: Name: aux_except_fcn_csect
379 # NON-DEFAULT64-NEXT: Value (RelocatableAddress): 0x0
380 # NON-DEFAULT64-NEXT: Section: N_UNDEF
381 # NON-DEFAULT64-NEXT: Type: 0x20
382 # NON-DEFAULT64-NEXT: StorageClass: C_EXT (0x2)
383 # NON-DEFAULT64-NEXT: NumberOfAuxEntries: 3
384 # NON-DEFAULT64-NEXT: Exception Auxiliary Entry {
385 # NON-DEFAULT64-NEXT: Index: 1
386 # NON-DEFAULT64-NEXT: OffsetToExceptionTable: 0x2
387 # NON-DEFAULT64-NEXT: SizeOfFunction: 0x3
388 # NON-DEFAULT64-NEXT: SymbolIndexOfNextBeyond: 4
389 # NON-DEFAULT64-NEXT: Auxiliary Type: AUX_EXCEPT (0xFF)
390 # NON-DEFAULT64-NEXT: }
391 # NON-DEFAULT64-NEXT: Function Auxiliary Entry {
392 # NON-DEFAULT64-NEXT: Index: 2
393 # NON-DEFAULT64-NEXT: SizeOfFunction: 0x2
394 # NON-DEFAULT64-NEXT: PointerToLineNum: 0x4
395 # NON-DEFAULT64-NEXT: SymbolIndexOfNextBeyond: 3
396 # NON-DEFAULT64-NEXT: Auxiliary Type: AUX_FCN (0xFE)
397 # NON-DEFAULT64-NEXT: }
398 # NON-DEFAULT64-NEXT: CSECT Auxiliary Entry {
399 # NON-DEFAULT64-NEXT: Index: 3
400 # NON-DEFAULT64-NEXT: SectionLen: 4294967301
401 # NON-DEFAULT64-NEXT: ParameterHashIndex: 0x2
402 # NON-DEFAULT64-NEXT: TypeChkSectNum: 0x3
403 # NON-DEFAULT64-NEXT: SymbolAlignmentLog2: 0
404 # NON-DEFAULT64-NEXT: SymbolType: 0x4
405 # NON-DEFAULT64-NEXT: StorageMappingClass: XMC_RO (0x1)
406 # NON-DEFAULT64-NEXT: Auxiliary Type: AUX_CSECT (0xFB)
407 # NON-DEFAULT64-NEXT: }
408 # NON-DEFAULT64-NEXT: }
409 # NON-DEFAULT64-NEXT: Symbol {
410 # NON-DEFAULT64-NEXT: Index: 4
411 # NON-DEFAULT64-NEXT: Name: aux_sym
412 # NON-DEFAULT64-NEXT: Value (RelocatableAddress): 0x0
413 # NON-DEFAULT64-NEXT: Section: N_UNDEF
414 # NON-DEFAULT64-NEXT: Type: 0x0
415 # NON-DEFAULT64-NEXT: StorageClass: C_BLOCK (0x64)
416 # NON-DEFAULT64-NEXT: NumberOfAuxEntries: 1
417 # NON-DEFAULT64-NEXT: Block Auxiliary Entry {
418 # NON-DEFAULT64-NEXT: Index: 5
419 # NON-DEFAULT64-NEXT: LineNumber: 0x2
420 # NON-DEFAULT64-NEXT: Auxiliary Type: AUX_SYM (0xFD)
421 # NON-DEFAULT64-NEXT: }
422 # NON-DEFAULT64-NEXT: }
423 # NON-DEFAULT64-NEXT: Symbol {
424 # NON-DEFAULT64-NEXT: Index: 6
425 # NON-DEFAULT64-NEXT: Name: aux_file
426 # NON-DEFAULT64-NEXT: Value (SymbolTableIndex): 0x0
427 # NON-DEFAULT64-NEXT: Section: N_UNDEF
428 # NON-DEFAULT64-NEXT: Source Language ID: TB_C (0x0)
429 # NON-DEFAULT64-NEXT: CPU Version ID: 0x0
430 # NON-DEFAULT64-NEXT: StorageClass: C_FILE (0x67)
431 # NON-DEFAULT64-NEXT: NumberOfAuxEntries: 1
432 # NON-DEFAULT64-NEXT: File Auxiliary Entry {
433 # NON-DEFAULT64-NEXT: Index: 7
434 # NON-DEFAULT64-NEXT: Name: fname
435 # NON-DEFAULT64-NEXT: Type: XFT_CD (0x80)
436 # NON-DEFAULT64-NEXT: Auxiliary Type: AUX_FILE (0xFC)
437 # NON-DEFAULT64-NEXT: }
438 # NON-DEFAULT64-NEXT: }
439 # NON-DEFAULT64-NEXT: Symbol {
440 # NON-DEFAULT64-NEXT: Index: 8
441 # NON-DEFAULT64-NEXT: Name: aux_sect
442 # NON-DEFAULT64-NEXT: Value (OffsetInDWARF): 0x0
443 # NON-DEFAULT64-NEXT: Section: N_UNDEF
444 # NON-DEFAULT64-NEXT: Type: 0x0
445 # NON-DEFAULT64-NEXT: StorageClass: C_DWARF (0x70)
446 # NON-DEFAULT64-NEXT: NumberOfAuxEntries: 1
447 # NON-DEFAULT64-NEXT: Sect Auxiliary Entry For DWARF {
448 # NON-DEFAULT64-NEXT: Index: 9
449 # NON-DEFAULT64-NEXT: LengthOfSectionPortion: 0x2
450 # NON-DEFAULT64-NEXT: NumberOfRelocEntries: 3
451 # NON-DEFAULT64-NEXT: Auxiliary Type: AUX_SECT (0xFA)
452 # NON-DEFAULT64-NEXT: }
453 # NON-DEFAULT64-NEXT: }
454 # NON-DEFAULT64-NEXT: ]
456 ## Case5: a file name longer than 8 bytes in the AUX_FILE symbol
457 ## is stored in the string table.
458 # RUN: yaml2obj %s --docnum=3 -o %t5
459 # RUN: llvm-readobj --syms --string-table %t5 | FileCheck %s \
460 # RUN: --check-prefix=FILENAME
462 # FILENAME: Symbols [
463 # FILENAME-NEXT: Symbol {
464 # FILENAME-NEXT: Index: 0
465 # FILENAME-NEXT: Name: aux_file
466 # FILENAME-NEXT: Value (SymbolTableIndex): 0x0
467 # FILENAME-NEXT: Section: N_UNDEF
468 # FILENAME-NEXT: Source Language ID: TB_C (0x0)
469 # FILENAME-NEXT: CPU Version ID: 0x0
470 # FILENAME-NEXT: StorageClass: C_FILE (0x67)
471 # FILENAME-NEXT: NumberOfAuxEntries: 1
472 # FILENAME-NEXT: File Auxiliary Entry {
473 # FILENAME-NEXT: Index: 1
474 # FILENAME-NEXT: Name: fileNameInStringTable
475 # FILENAME-NEXT: Type: XFT_CD (0x80)
479 # FILENAME-NEXT: StringTable {
480 # FILENAME-NEXT: Length: 26
481 # FILENAME-NEXT: [ 4] fileNameInStringTable
490 NumberOfAuxEntries: 1
493 FileNameOrString: fileNameInStringTable
494 FileStringType: XFT_CD
496 ## Case6: show that yaml2obj reports an error when trying to write
497 ## the AUX_STAT symbol for XCOFF64.
498 # RUN: not yaml2obj %s --docnum=4 -o %t6 2>&1 | FileCheck %s \
499 # RUN: --check-prefix=STAT64
501 # STAT64: error: an auxiliary symbol of type AUX_STAT cannot be defined in XCOFF64
507 - StorageClass: C_STAT
508 NumberOfAuxEntries: 1
512 ## Case7: show that yaml2obj reports an error when trying to write
513 ## the AUX_EXCEPT symbol for XCOFF32.
514 # RUN: not yaml2obj %s --docnum=5 -o %t7 2>&1 | FileCheck %s \
515 # RUN: --check-prefix=EXCEPT32
517 # EXCEPT32: error: an auxiliary symbol of type AUX_EXCEPT cannot be defined in XCOFF32
523 - StorageClass: C_EXT
524 NumberOfAuxEntries: 1
528 ## Case8: show that yaml2obj reports an error when the specified value
529 ## of NumberOfAuxEntries is less than the actual number.
530 # RUN: not yaml2obj %s --docnum=6 -o %t8 2>&1 | FileCheck %s \
531 # RUN: --check-prefix=AUXCOUNT
533 # AUXCOUNT: error: specified NumberOfAuxEntries 1 is less than the actual number of auxiliary entries 2
539 - StorageClass: C_EXT
540 NumberOfAuxEntries: 1
545 ## Case9: pad with zeros when the specified value of NumberOfAuxEntries
546 ## is greater than the actual number.
547 # RUN: yaml2obj %s --docnum=7 -o %t9
548 # RUN: llvm-readobj --syms %t9 | FileCheck %s --check-prefix=AUXNUM
551 # AUXNUM-NEXT: Symbol {
552 # AUXNUM-NEXT: Index: 0
554 # AUXNUM-NEXT: Value (SymbolTableIndex): 0x0
555 # AUXNUM-NEXT: Section: N_UNDEF
556 # AUXNUM-NEXT: Source Language ID: TB_C (0x0)
557 # AUXNUM-NEXT: CPU Version ID: 0x0
558 # AUXNUM-NEXT: StorageClass: C_FILE (0x67)
559 # AUXNUM-NEXT: NumberOfAuxEntries: 2
560 # AUXNUM-NEXT: File Auxiliary Entry {
561 # AUXNUM-NEXT: Index: 1
562 # AUXNUM-NEXT: Name: foo
563 # AUXNUM-NEXT: Type: XFT_FN (0x0)
565 # AUXNUM-NEXT: File Auxiliary Entry {
566 # AUXNUM-NEXT: Index: 2
568 # AUXNUM-NEXT: Type: XFT_FN (0x0)
577 - StorageClass: C_FILE
578 NumberOfAuxEntries: 2
581 FileNameOrString: foo