92 lines · yaml
1## Report errors when specified file offsets are invalid.2 3# RUN: not yaml2obj %s -DTEXTRAWDATAOFFSET=0xFFFFFFF0 -o %t 2>&1 | \4# RUN: FileCheck %s --check-prefix=ERROR15# ERROR1: current file offset (4294967288) is bigger than the specified FileOffsetToData for the .data section (108)6 7# RUN: not yaml2obj %s -DDATARAWDATAOFFSET=0xFFFFFFF0 -o %t 2>&1 | \8# RUN: FileCheck %s --check-prefix=ERROR29# ERROR2: current file offset (4294967284) is bigger than the specified FileOffsetToRelocations for the .text section (112)10 11# RUN: not yaml2obj %s -DRELOCOFFSET=0xFFFFFFF0 -o %t 2>&1 | \12# RUN: FileCheck %s --check-prefix=ERROR313# ERROR3: current file offset (4294967290) is bigger than the specified SymbolTableOffset (122)14 15# RUN: not yaml2obj %s -DSYMTABOFFSET=0x100000000 -o %t 2>&1 | \16# RUN: FileCheck %s --check-prefix=ERROR417# ERROR4: maximum object size of 4294967295 exceeded when writing symbols18 19# RUN: not yaml2obj %s -DRELOCOFFSET=0x100000000 -o %t 2>&1 | \20# RUN: FileCheck %s --check-prefix=ERROR521# ERROR5: maximum object size (4294967295) exceeded when writing relocation data for section .text22 23# RUN: not yaml2obj %s -DDATARAWDATAOFFSET=0x100000000 -o %t 2>&1 | \24# RUN: FileCheck %s --check-prefix=ERROR625# ERROR6: maximum object size (4294967295) exceeded when writing data for section 2 (.data)26 27--- !XCOFF28FileHeader:29 MagicNumber: 0x1DF30 NumberOfSections: 231 OffsetToSymbolTable: [[SYMTABOFFSET=0x7A]]32 EntriesInSymbolTable: 633 AuxiliaryHeaderSize: 034 Flags: 0x035Sections:36 - Name: .text37 Address: 0x038 Size: 0x839 FileOffsetToData: [[TEXTRAWDATAOFFSET=0x64]]40 FileOffsetToRelocations: [[RELOCOFFSET=0x70]]41 NumberOfRelocations: 0x142 Flags: [ STYP_TEXT ]43 SectionData: 386000004BFFFFFC44 Relocations:45 - Address: 0x446 Symbol: 0x247 Info: 0x9948 Type: 0x1A49 - Name: .data50 Address: 0x051 Size: 0x452 FileOffsetToData: [[DATARAWDATAOFFSET=0x6C]]53 FileOffsetToRelocations: 054 Flags: [ STYP_DATA ]55 SectionData: 3210ABCD56Symbols:57 - Name: .bar58 Value: 0x059 Section: N_UNDEF60 Type: 0x061 StorageClass: C_EXT62 NumberOfAuxEntries: 163 AuxEntries:64 - Type: AUX_CSECT65 SymbolAlignmentAndType: 066 StorageMappingClass: XMC_PR67 SectionOrLength: 068 - Name: ''69 Value: 0x070 Section: .text71 Type: 0x072 StorageClass: C_HIDEXT73 NumberOfAuxEntries: 174 AuxEntries:75 - Type: AUX_CSECT76 SymbolAlignmentAndType: 1777 StorageMappingClass: XMC_PR78 SectionOrLength: 879 - Name: .foo80 Value: 0x081 Section: .text82 Type: 0x083 StorageClass: C_EXT84 NumberOfAuxEntries: 185 AuxEntries:86 - Type: AUX_CSECT87 SymbolAlignmentAndType: 288 StorageMappingClass: XMC_PR89 SectionOrLength: 290StringTable: {}91...92