53 lines · plain
1## Test the --private-headers option for XCOFF object files.2 3# RUN: yaml2obj -DMAGIC=0x1DF --docnum=1 %s -o %t_xcoff32.o4# RUN: yaml2obj -DMAGIC=0x1F7 --docnum=1 %s -o %t_xcoff64.o5# RUN: llvm-objdump --private-headers %t_xcoff32.o | \6# RUN: FileCheck %s --check-prefixes=CHECK32 --match-full-lines --strict-whitespace7# RUN: llvm-objdump --private-headers %t_xcoff64.o | \8# RUN: FileCheck %s --check-prefixes=CHECK64 --match-full-lines --strict-whitespace9 10--- !XCOFF11FileHeader:12 MagicNumber: [[MAGIC]]13 CreationTime: 123414Sections:15 - Name: .text16 Flags: [ STYP_TEXT ]17 SectionData: "9061FFF880820000"18 - Name: .data19 Flags: [ STYP_DATA ]20 SectionData: "0000000000000FC0"21 22# CHECK32:---File Header:23# CHECK32-NEXT:Magic: 0x1df24# CHECK32-NEXT:NumberOfSections: 225# CHECK32-NEXT:Timestamp: 1970-01-01 00:20:34 (1234)26# CHECK32-NEXT:SymbolTableOffset: 0x027# CHECK32-NEXT:SymbolTableEntries: 028# CHECK32-NEXT:OptionalHeaderSize: 0x029# CHECK32-NEXT:Flags: 0x030 31# CHECK64:---File Header:32# CHECK64-NEXT:Magic: 0x1f733# CHECK64-NEXT:NumberOfSections: 234# CHECK64-NEXT:Timestamp: 1970-01-01 00:20:34 (1234)35# CHECK64-NEXT:SymbolTableOffset: 0x036# CHECK64-NEXT:SymbolTableEntries: 037# CHECK64-NEXT:OptionalHeaderSize: 0x038# CHECK64-NEXT:Flags: 0x039 40## Test if the creation time of XCOFF is zero and the number of symbols is negative.41# RUN: yaml2obj -DMAGIC=0x1DF --docnum=2 %s -o %t_xcoff_timestamp.o42# RUN: llvm-objdump --private-headers %t_xcoff_timestamp.o | \43# RUN: FileCheck %s --match-full-lines44 45--- !XCOFF46FileHeader:47 MagicNumber: 0x1DF48 CreationTime: 049 EntriesInSymbolTable: -150 51# CHECK: Timestamp: None (0)52# CHECK: SymbolTableEntries: Reserved Value (-1)53