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 AuxiliaryHeaderSize: 0
33 # RUN: yaml2obj -DMAGIC=0x01F7 -DCREATTIME=0 %s -o %t2
34 # RUN: llvm-readobj %t2 --file-header | \
35 # RUN: FileCheck %s --strict-whitespace --match-full-lines --check-prefix=FILEHEADER64
37 # FILEHEADER64:Format: aix5coff64-rs6000
38 # FILEHEADER64-NEXT:Arch: powerpc64
39 # FILEHEADER64-NEXT:AddressSize: 64bit
40 # FILEHEADER64-NEXT:FileHeader {
41 # FILEHEADER64-NEXT: Magic: 0x1F7
42 # FILEHEADER64-NEXT: NumberOfSections: 1
43 # FILEHEADER64-NEXT: TimeStamp: None (0x0)
44 # FILEHEADER64-NEXT: SymbolTableOffset: 0x60
45 # FILEHEADER64-NEXT: SymbolTableEntries: 1
46 # FILEHEADER64-NEXT: OptionalHeaderSize: 0x0
47 # FILEHEADER64-NEXT: Flags: 0x12
50 # RUN: yaml2obj -DCREATTIME=-1 %s -o %t3
51 # RUN: llvm-readobj %t3 --file-header | \
52 # RUN: FileCheck %s --strict-whitespace --match-full-lines --check-prefix=NEGTIME
54 # NEGTIME:FileHeader {
55 # NEGTIME: TimeStamp: Reserved Value (0xFFFFFFFF)
58 # RUN: yaml2obj -DSYMBOLCOUNT=-1 %s -o %t4
59 # RUN: llvm-readobj %t4 --file-header | \
60 # RUN: FileCheck %s --strict-whitespace --match-full-lines --check-prefix=NEGSYMCOUNT
62 # NEGSYMCOUNT:FileHeader {
63 # NEGSYMCOUNT: SymbolTableEntries: Reserved Value (0xFFFFFFFF)