================ @@ -0,0 +1,45 @@ +# RUN: yaml2obj --docnum=1 %s -o %t.o + +# RUN: llvm-readobj --headers %t.o 2>&1 | FileCheck %s -DFILE=%t.o --check-prefix=CASE-INVALID + +# CASE-INVALID: SectionHeaderOffset: 0x0 +# CASE-INVALID: ProgramHeaderEntrySize: 56 +# CASE-INVALID-NEXT: warning: '[[FILE]]': invalid section index: 0 +# CASE-INVALID-NEXT: ProgramHeaderCount: <?> +# CASE-INVALID-NEXT: SectionHeaderEntrySize: 64 +# CASE-INVALID-NEXT: SectionHeaderCount: 0 +# CASE-INVALID-NEXT: StringTableSectionIndex: 65535 (corrupt: out of range) + +--- !ELF +FileHeader: + Class: ELFCLASS64 + Data: ELFDATA2LSB + Type: ET_EXEC + Machine: EM_X86_64 + EPhNum: 65535 + EShNum: 0 + EShStrNdx: 0xffff + EShOff: 0 +ProgramHeaders: + - Type: PT_LOAD + +# RUN: yaml2obj --docnum=2 %s -o %t2.o + +# RUN: llvm-readobj --headers %t2.o 2>&1 | FileCheck %s --check-prefix=CASE-VALID + +# CASE-VALID: SectionHeaderOffset: 0 ---------------- jh7370 wrote:
Why are you testing this field? https://github.com/llvm/llvm-project/pull/165278 _______________________________________________ llvm-branch-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
