1 ## Test that we can explicitly specify all fields of the auxiliary file header.
2 ## Notice that the values aren't derived from the sections if we explicitly set the fields.
4 # RUN: yaml2obj %s -o %t1
5 # RUN: llvm-readobj --auxiliary-header %t1 | FileCheck %s --check-prefix=CHECK32
6 # RUN: yaml2obj %s -DMAGIC=0x1F7 -DFLAG64=0x2 -o %t2
7 # RUN: llvm-readobj --auxiliary-header %t2 | FileCheck %s --check-prefix=CHECK64
9 # CHECK32: Format: aixcoff-rs6000
10 # CHECK32-NEXT: Arch: powerpc
11 # CHECK32-NEXT: AddressSize: 32bit
12 # CHECK32-NEXT: AuxiliaryHeader {
13 # CHECK32-NEXT: Magic: 0x10B
14 # CHECK32-NEXT: Version: 0x1
15 # CHECK32-NEXT: Size of .text section: 0x8
16 # CHECK32-NEXT: Size of .data section: 0x9
17 # CHECK32-NEXT: Size of .bss section: 0x10
18 # CHECK32-NEXT: Entry point address: 0x1111
19 # CHECK32-NEXT: .text section start address: 0x2222
20 # CHECK32-NEXT: .data section start address: 0x3333
21 # CHECK32-NEXT: TOC anchor address: 0x4444
22 # CHECK32-NEXT: Section number of entryPoint: 1
23 # CHECK32-NEXT: Section number of .text: 2
24 # CHECK32-NEXT: Section number of .data: 3
25 # CHECK32-NEXT: Section number of TOC: 4
26 # CHECK32-NEXT: Section number of loader data: 5
27 # CHECK32-NEXT: Section number of .bss: 6
28 # CHECK32-NEXT: Maxium alignment of .text: 0x7
29 # CHECK32-NEXT: Maxium alignment of .data: 0x3
30 # CHECK32-NEXT: Module type: 0x0
31 # CHECK32-NEXT: CPU type of objects: 0x1
32 # CHECK32-NEXT: (Reserved): 0x0
33 # CHECK32-NEXT: Maximum stack size: 0x0
34 # CHECK32-NEXT: Maximum data size: 0x0
35 # CHECK32-NEXT: Reserved for debugger: 0x0
36 # CHECK32-NEXT: Text page size: 0x1
37 # CHECK32-NEXT: Data page size: 0x1
38 # CHECK32-NEXT: Stack page size: 0x1
39 # CHECK32-NEXT: Flag: 0x0
40 # CHECK32-NEXT: Alignment of thread-local storage: 0x1
41 # CHECK32-NEXT: Section number for .tdata: 7
42 # CHECK32-NEXT: Section number for .tbss: 8
45 # CHECK64: Format: aix5coff64-rs6000
46 # CHECK64-NEXT: Arch: powerpc64
47 # CHECK64-NEXT: AddressSize: 64bit
48 # CHECK64-NEXT: AuxiliaryHeader {
49 # CHECK64-NEXT: Magic: 0x10B
50 # CHECK64-NEXT: Version: 0x1
51 # CHECK64-NEXT: Reserved for debugger: 0x0
52 # CHECK64-NEXT: .text section start address: 0x2222
53 # CHECK64-NEXT: .data section start address: 0x3333
54 # CHECK64-NEXT: TOC anchor address: 0x4444
55 # CHECK64-NEXT: Section number of entryPoint: 1
56 # CHECK64-NEXT: Section number of .text: 2
57 # CHECK64-NEXT: Section number of .data: 3
58 # CHECK64-NEXT: Section number of TOC: 4
59 # CHECK64-NEXT: Section number of loader data: 5
60 # CHECK64-NEXT: Section number of .bss: 6
61 # CHECK64-NEXT: Maxium alignment of .text: 0x7
62 # CHECK64-NEXT: Maxium alignment of .data: 0x3
63 # CHECK64-NEXT: Module type: 0x0
64 # CHECK64-NEXT: CPU type of objects: 0x1
65 # CHECK64-NEXT: (Reserved): 0x0
66 # CHECK64-NEXT: Text page size: 0x1
67 # CHECK64-NEXT: Data page size: 0x1
68 # CHECK64-NEXT: Stack page size: 0x1
69 # CHECK64-NEXT: Flag: 0x0
70 # CHECK64-NEXT: Alignment of thread-local storage: 0x1
71 # CHECK64-NEXT: Size of .text section: 0x8
72 # CHECK64-NEXT: Size of .data section: 0x9
73 # CHECK64-NEXT: Size of .bss section: 0x10
74 # CHECK64-NEXT: Entry point address: 0x1111
75 # CHECK64-NEXT: Maximum stack size: 0x0
76 # CHECK64-NEXT: Maximum data size: 0x0
77 # CHECK64-NEXT: Section number for .tdata: 7
78 # CHECK64-NEXT: Section number for .tbss: 8
79 # CHECK64-NEXT: Additional flags 64-bit XCOFF: 0x2
84 MagicNumber: [[MAGIC=0x1DF]]
91 EntryPointAddr: 0x1111
109 FlagAndTDataAlignment: 0x1
110 Flag: [[FLAG64=<none>]]
112 - Flags: [ STYP_TEXT ]
114 - Flags: [ STYP_DATA ]
116 - Flags: [ STYP_BSS ]
118 - Flags: [ STYP_TDATA ]
120 - Flags: [ STYP_TBSS ]
122 - Flags: [ STYP_LOADER ]