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