brintos

brintos / llvm-project-archived public Read only

0
0
Text · 809 B · 0f6f6b2 Raw
31 lines · yaml
1## Check that obj2yaml reports a suitable error when it encounters2## invalid content in Symbol.3 4## Error1: failed to get the section name for a symbol.5# RUN: yaml2obj %s --docnum=1 -o %t16# RUN: not obj2yaml %t1 2>&1 | FileCheck %s -DFILE=%t1 --check-prefix=ERROR17 8# ERROR1: Error reading file: [[FILE]]: the section index (2) is invalid9 10--- !XCOFF11FileHeader:12  MagicNumber: 0x01DF13Sections:14  - Name: .text15Symbols:16  - SectionIndex: 217 18## Error2: failed to get the symbol name.19# RUN: yaml2obj %s --docnum=2 -o %t220# RUN: not obj2yaml %t2 2>&1 | FileCheck %s -DFILE=%t2 --check-prefix=ERROR221 22# ERROR2: Error reading file: [[FILE]]: entry with offset 0x4 in a string table with size 0x4 is invalid23 24--- !XCOFF25FileHeader:26  MagicNumber: 0x01DF27Symbols:28  - Name: nameInStrTbl29StringTable:30  Length: 031