| ## Test invalid offset to symbol string table of loader section for --loader-section-symbols option. |
| |
| # RUN: yaml2obj %s -o %t_xcoff.o |
| # RUN: llvm-readobj --loader-section-symbols %t_xcoff.o 2>&1 | FileCheck -DFILE=%t_xcoff.o %s |
| |
| --- !XCOFF |
| FileHeader: |
| MagicNumber: 0x1DF |
| Sections: |
| - Name: .loader |
| Flags: [ STYP_LOADER ] |
| SectionData: "0000000100000002000000050000016D00000001000000A40000000c000000506d79696e747661722000028000021105000000000000000000000000000000A2200002840002110a0000000000000000000a66756e63305f5f467600" |
| ## ^------- -Version=1 |
| ## ^------- -NumberOfSymbolEntries=2 |
| ## ^------- -NumberOfRelocationEntries=5 |
| ## ^------- -LengthOfImportFileIDStringTable=365 |
| ## ^------- -NumberOfImportFileIDs=1 |
| ## ^------- -OffsetToImportFileIDs=0xA4 |
| ## ^------- -LengthOfStringTable=12 |
| ## ^------- -OffsetToStringTable=0x050 |
| ## ^--------------- SymbolName=myintvar |
| ## ^------- Value=0x20000280 |
| ## ^--- sectionNumber = 2 |
| ## ^- SymbolType=0x11 |
| ## ^- StorageClass=0x0a |
| ## ^------- ImportFileID=0 |
| ## ^-------ParameterCheckType=0 |
| ## ^-------SymbolZero=0 |
| ## ^-------OffsetToStringTbl=0xA2 (Invalid) |
| ## ^------- Value=20000284 |
| ## ^--- sectionNumber = 2 |
| ## ^- SymbolType=0x11 |
| ## ^- StorageClass=0x0a |
| ## ^------- ImportFileID=0 |
| ## ^-------ParameterCheckType=0 |
| ## ^StringTable |
| |
| # CHECK: warning: '[[FILE]]': entry with offset 0xa2 in the loader section's string table with size 0xc is invalid |