brintos

brintos / llvm-project-archived public Read only

0
0
Text · 990 B · 0e16a47 Raw
34 lines · yaml
1## Check that obj2yaml reports a suitable error when it encounters2## invalid content in Section.3 4## Error1: failed to get section data.5# RUN: yaml2obj %s --docnum=1 -o %t16# RUN: not obj2yaml %t1 2>&1 | FileCheck %s -DFILE=%t1 --check-prefix=ERROR17 8# ERROR1: The end of the file was unexpectedly encountered: section data with offset 0x70 and size 0x20 goes past the end of the file9 10--- !XCOFF11FileHeader:12  MagicNumber: 0x01DF13Sections:14  - SectionData:      '00007400'15    FileOffsetToData: 0x7016    Size: 0x2017 18## Error2: failed to get relocations.19# RUN: yaml2obj %s --docnum=2 -o %t220# RUN: not obj2yaml %t2 2>&1 | FileCheck %s -DFILE=%t2 --check-prefix=ERROR221 22# ERROR2: The end of the file was unexpectedly encountered: relocations with offset 0x3c and size 0x1e go past the end of the file23 24--- !XCOFF25FileHeader:26  MagicNumber: 0x01DF27Sections:28  - NumberOfRelocations: 0x329    Relocations:30      - Address: 0xE31        Symbol:  0x1232        Info:    0xF33        Type:    0x334