1 ## This is a general test for the --file-header option.
3 # RUN: yaml2obj %s -o %t1
4 # RUN: llvm-readobj %t1 --file-header | \
5 # RUN: FileCheck %s --strict-whitespace --match-full-lines --check-prefix=FILEHEADER32
7 # FILEHEADER32:Format: aixcoff-rs6000
8 # FILEHEADER32-NEXT:Arch: powerpc
9 # FILEHEADER32-NEXT:AddressSize: 32bit
10 # FILEHEADER32-NEXT:FileHeader {
11 # FILEHEADER32-NEXT: Magic: 0x1DF
12 # FILEHEADER32-NEXT: NumberOfSections: 1
13 # FILEHEADER32-NEXT: TimeStamp: 1970-01-01 00:00:01 (0x1)
14 # FILEHEADER32-NEXT: SymbolTableOffset: 0x3C
15 # FILEHEADER32-NEXT: SymbolTableEntries: 1
16 # FILEHEADER32-NEXT: OptionalHeaderSize: 0x0
17 # FILEHEADER32-NEXT: Flags: 0x12
22 MagicNumber: [[MAGIC=0x01DF]]
23 CreationTime: [[CREATTIME=1]]
24 EntriesInSymbolTable: [[SYMBOLCOUNT=1]]
26 OffsetToSymbolTable: 0x3C
27 AuxiliaryHeaderSize: 0
34 # RUN: yaml2obj -DMAGIC=0x01F7 -DCREATTIME=0 %s -o %t2
35 # RUN: llvm-readobj %t2 --file-header | \
36 # RUN: FileCheck %s --strict-whitespace --match-full-lines --check-prefix=FILEHEADER64
38 # FILEHEADER64:Format: aix5coff64-rs6000
39 # FILEHEADER64-NEXT:Arch: powerpc64
40 # FILEHEADER64-NEXT:AddressSize: 64bit
41 # FILEHEADER64-NEXT:FileHeader {
42 # FILEHEADER64-NEXT: Magic: 0x1F7
43 # FILEHEADER64-NEXT: NumberOfSections: 1
44 # FILEHEADER64-NEXT: TimeStamp: None (0x0)
45 # FILEHEADER64-NEXT: SymbolTableOffset: 0x3C
46 # FILEHEADER64-NEXT: SymbolTableEntries: 1
47 # FILEHEADER64-NEXT: OptionalHeaderSize: 0x0
48 # FILEHEADER64-NEXT: Flags: 0x12
51 # RUN: yaml2obj -DCREATTIME=-1 %s -o %t3
52 # RUN: llvm-readobj %t3 --file-header | \
53 # RUN: FileCheck %s --strict-whitespace --match-full-lines --check-prefix=NEGTIME
55 # NEGTIME:FileHeader {
56 # NEGTIME: TimeStamp: Reserved Value (0xFFFFFFFF)
59 # RUN: yaml2obj -DSYMBOLCOUNT=-1 %s -o %t4
60 # RUN: llvm-readobj %t4 --file-header | \
61 # RUN: FileCheck %s --strict-whitespace --match-full-lines --check-prefix=NEGSYMCOUNT
63 # NEGSYMCOUNT:FileHeader {
64 # NEGSYMCOUNT: SymbolTableEntries: Reserved Value (0xFFFFFFFF)