Follow up to d0858bffa11, add missing REQUIRES x86
[llvm-project.git] / llvm / test / tools / obj2yaml / XCOFF / aix.yaml
blobcd1e88dec11d29b97a8f0482ac07673374b51faa
1 ## This is a basic test to check if we can parse the XCOFF object file correctly.
2 # RUN: yaml2obj %s -DMAGIC=0x01DF -o %t-32
3 # RUN: obj2yaml %t-32 | FileCheck %s --check-prefix=CHECK32
4 # RUN: yaml2obj %s -DMAGIC=0x01F7 -o %t-64
5 # RUN: obj2yaml %t-64 -o %t-64.yaml 2>&1 | count 0
6 # RUN: FileCheck --input-file %t-64.yaml %s --check-prefix=CHECK64
8 # CHECK32:      --- !XCOFF
9 # CHECK32-NEXT: FileHeader:
10 # CHECK32-NEXT:   MagicNumber:     0x1DF
11 # CHECK32-NEXT:   NumberOfSections: 2
12 # CHECK32-NEXT:   CreationTime:    0
13 # CHECK32-NEXT:   OffsetToSymbolTable: 0x80
14 # CHECK32-NEXT:   EntriesInSymbolTable: 4
15 # CHECK32-NEXT:   AuxiliaryHeaderSize: 0
16 # CHECK32-NEXT:   Flags:           0x0
17 # CHECK32-NEXT: Sections:
18 # CHECK32-NEXT:   - Name:            .text
19 # CHECK32-NEXT:     Address:         0x0
20 # CHECK32-NEXT:     Size:            0x4
21 # CHECK32-NEXT:     FileOffsetToData: 0x64
22 # CHECK32-NEXT:     FileOffsetToRelocations: 0x6C
23 # CHECK32-NEXT:     FileOffsetToLineNumbers: 0x0
24 # CHECK32-NEXT:     NumberOfRelocations: 0x1
25 # CHECK32-NEXT:     NumberOfLineNumbers: 0x0
26 # CHECK32-NEXT:     Flags:           [ STYP_TEXT ]
27 # CHECK32-NEXT:     SectionData:     '00007400'
28 # CHECK32-NEXT:     Relocations:
29 # CHECK32-NEXT:       - Address:         0xE
30 # CHECK32-NEXT:         Symbol:          0x12
31 # CHECK32-NEXT:         Info:            0xF
32 # CHECK32-NEXT:         Type:            0x3
33 # CHECK32-NEXT:   - Name:            .data
34 # CHECK32-NEXT:     Address:         0x4
35 # CHECK32-NEXT:     Size:            0x4
36 # CHECK32-NEXT:     FileOffsetToData: 0x68
37 # CHECK32-NEXT:     FileOffsetToRelocations: 0x76
38 # CHECK32-NEXT:     FileOffsetToLineNumbers: 0x0
39 # CHECK32-NEXT:     NumberOfRelocations: 0x1
40 # CHECK32-NEXT:     NumberOfLineNumbers: 0x0
41 # CHECK32-NEXT:     Flags:           [ STYP_DATA ]
42 # CHECK32-NEXT:     SectionData:     '00007700'
43 # CHECK32-NEXT:     Relocations:
44 # CHECK32-NEXT:       - Address:         0x60
45 # CHECK32-NEXT:         Symbol:          0x8
46 # CHECK32-NEXT:         Info:            0x1F
47 # CHECK32-NEXT:         Type:            0x0
48 # CHECK32-NEXT: Symbols:
49 # CHECK32-NEXT:   - Name:            TestforXcoff
50 # CHECK32-NEXT:     Value:           0x0
51 # CHECK32-NEXT:     Section:         N_UNDEF
52 # CHECK32-NEXT:     Type:            0x0
53 # CHECK32-NEXT:     StorageClass:    C_EXT
54 # CHECK32-NEXT:     NumberOfAuxEntries: 1
55 # CHECK32-NEXT:   - Name:            .data
56 # CHECK32-NEXT:     Value:           0x70
57 # CHECK32-NEXT:     Section:         .data
58 # CHECK32-NEXT:     Type:            0x0
59 # CHECK32-NEXT:     StorageClass:    C_HIDEXT
60 # CHECK32-NEXT:     NumberOfAuxEntries: 1
62 # CHECK64:      --- !XCOFF
63 # CHECK64-NEXT: FileHeader:
64 # CHECK64-NEXT:   MagicNumber:     0x1F7
65 # CHECK64-NEXT:   NumberOfSections: 2
66 # CHECK64-NEXT:   CreationTime:    0
67 # CHECK64-NEXT:   OffsetToSymbolTable: 0xCC
68 # CHECK64-NEXT:   EntriesInSymbolTable: 4
69 # CHECK64-NEXT:   AuxiliaryHeaderSize: 0
70 # CHECK64-NEXT:   Flags:           0x0
71 # CHECK64-NEXT: Sections:
72 # CHECK64-NEXT:   - Name:            .text
73 # CHECK64-NEXT:     Address:         0x0
74 # CHECK64-NEXT:     Size:            0x4
75 # CHECK64-NEXT:     FileOffsetToData: 0xA8
76 # CHECK64-NEXT:     FileOffsetToRelocations: 0xB0
77 # CHECK64-NEXT:     FileOffsetToLineNumbers: 0x0
78 # CHECK64-NEXT:     NumberOfRelocations: 0x1
79 # CHECK64-NEXT:     NumberOfLineNumbers: 0x0
80 # CHECK64-NEXT:     Flags:           [ STYP_TEXT ]
81 # CHECK64-NEXT:     SectionData:     '00007400'
82 # CHECK64-NEXT:     Relocations:
83 # CHECK64-NEXT:       - Address:         0xE
84 # CHECK64-NEXT:         Symbol:          0x12
85 # CHECK64-NEXT:         Info:            0xF
86 # CHECK64-NEXT:         Type:            0x3
87 # CHECK64-NEXT:   - Name:            .data
88 # CHECK64-NEXT:     Address:         0x4
89 # CHECK64-NEXT:     Size:            0x4
90 # CHECK64-NEXT:     FileOffsetToData: 0xAC
91 # CHECK64-NEXT:     FileOffsetToRelocations: 0xBE
92 # CHECK64-NEXT:     FileOffsetToLineNumbers: 0x0
93 # CHECK64-NEXT:     NumberOfRelocations: 0x1
94 # CHECK64-NEXT:     NumberOfLineNumbers: 0x0
95 # CHECK64-NEXT:     Flags:           [ STYP_DATA ]
96 # CHECK64-NEXT:     SectionData:     '00007700'
97 # CHECK64-NEXT:     Relocations:
98 # CHECK64-NEXT:       - Address:         0x60
99 # CHECK64-NEXT:         Symbol:          0x8
100 # CHECK64-NEXT:         Info:            0x1F
101 # CHECK64-NEXT:         Type:            0x0
102 # CHECK64-NEXT: Symbols:
103 # CHECK64-NEXT:   - Name:            TestforXcoff
104 # CHECK64-NEXT:     Value:           0x0
105 # CHECK64-NEXT:     Section:         N_UNDEF
106 # CHECK64-NEXT:     Type:            0x0
107 # CHECK64-NEXT:     StorageClass:    C_EXT
108 # CHECK64-NEXT:     NumberOfAuxEntries: 1
109 # CHECK64-NEXT:   - Name:            .data
110 # CHECK64-NEXT:     Value:           0x70
111 # CHECK64-NEXT:     Section:         .data
112 # CHECK64-NEXT:     Type:            0x0
113 # CHECK64-NEXT:     StorageClass:    C_HIDEXT
114 # CHECK64-NEXT:     NumberOfAuxEntries: 1
116 --- !XCOFF
117 FileHeader:
118   MagicNumber: [[MAGIC]]
119 Sections:
120   - Name:        .text
121     Flags:       [ STYP_TEXT ]
122     SectionData: '00007400'
123     Relocations:
124       - Address: 0xE
125         Symbol:  0x12
126         Info:    0xF
127         Type:    0x3
128   - Name:        .data
129     Flags:       [ STYP_DATA ]
130     SectionData: '00007700'
131     Relocations:
132       - Address: 0x60
133         Symbol:  0x8
134         Info:    0x1F
135         Type:    0x0
136 Symbols:
137   - Name:               TestforXcoff
138     Value:              0x0
139     Section:            N_UNDEF
140     Type:               0x0
141     StorageClass:       C_EXT
142     NumberOfAuxEntries: 1
143   - Name:               .data
144     Value:              0x70
145     Section:            .data
146     Type:               0x0
147     StorageClass:       C_HIDEXT
148     NumberOfAuxEntries: 1