1 // Check COFF emission of cvtres
2 // The input was generated with the following command, using the original Windows
4 // > rc /fo test_resource.res /nologo test_resource.rc
5 // The object file we are comparing against was generated with this command using
6 // the original Windows cvtres.exe.
7 // > cvtres /machine:X86 /readonly /nologo /out:test_resource.obj.coff \
10 RUN: llvm-cvtres /verbose /out:%t %p/Inputs/test_resource.res
11 RUN: llvm-readobj --coff-resources --section-data %t | FileCheck %s
14 CHECK-NEXT: Total Number of Resources: 8
15 CHECK-DAG: Number of String Entries: 1
16 CHECK-NEXT: Number of ID Entries: 4
17 CHECK-NEXT: Type: STRINGARRAY [
18 CHECK-NEXT: Table Offset: 0x38
19 CHECK-NEXT: Number of String Entries: 1
20 CHECK-NEXT: Number of ID Entries: 0
21 CHECK-NEXT: Name: MYRESOURCE [
22 CHECK-NEXT: Table Offset: 0xC8
23 CHECK-NEXT: Number of String Entries: 0
24 CHECK-NEXT: Number of ID Entries: 1
25 CHECK-NEXT: Language: (ID 1033) [
26 CHECK-NEXT: Entry Offset: 0x188
27 CHECK-NEXT: Time/Date Stamp: 1970-01-01 00:00:00 (0x0)
28 CHECK-NEXT: Major Version: 0
29 CHECK-NEXT: Minor Version: 0
30 CHECK-NEXT: Characteristics: 0
34 CHECK-NEXT: Type: BITMAP (ID 2) [
35 CHECK-NEXT: Table Offset: 0x50
36 CHECK-NEXT: Number of String Entries: 2
37 CHECK-NEXT: Number of ID Entries: 0
38 CHECK-NEXT: Name: CURSOR [
39 CHECK-NEXT: Table Offset: 0xE0
40 CHECK-NEXT: Number of String Entries: 0
41 CHECK-NEXT: Number of ID Entries: 1
42 CHECK-NEXT: Language: (ID 1033) [
43 CHECK-NEXT: Entry Offset: 0x198
44 CHECK-NEXT: Time/Date Stamp: 1970-01-01 00:00:00 (0x0)
45 CHECK-NEXT: Major Version: 0
46 CHECK-NEXT: Minor Version: 0
47 CHECK-NEXT: Characteristics: 0
50 CHECK-NEXT: Name: OKAY [
51 CHECK-NEXT: Table Offset: 0xF8
52 CHECK-NEXT: Number of String Entries: 0
53 CHECK-NEXT: Number of ID Entries: 1
54 CHECK-NEXT: Language: (ID 1033) [
55 CHECK-NEXT: Entry Offset: 0x1A8
56 CHECK-NEXT: Time/Date Stamp: 1970-01-01 00:00:00 (0x0)
57 CHECK-NEXT: Major Version: 0
58 CHECK-NEXT: Minor Version: 0
59 CHECK-NEXT: Characteristics: 0
63 CHECK-NEXT: Type: MENU (ID 4) [
64 CHECK-NEXT: Table Offset: 0x70
65 CHECK-NEXT: Number of String Entries: 1
66 CHECK-NEXT: Number of ID Entries: 1
67 CHECK-NEXT: Name: "EAT" [
68 CHECK-NEXT: Table Offset: 0x110
69 CHECK-NEXT: Number of String Entries: 0
70 CHECK-NEXT: Number of ID Entries: 1
71 CHECK-NEXT: Language: (ID 3081) [
72 CHECK-NEXT: Entry Offset: 0x1B8
73 CHECK-NEXT: Time/Date Stamp: 1970-01-01 00:00:00 (0x0)
74 CHECK-NEXT: Major Version: 0
75 CHECK-NEXT: Minor Version: 0
76 CHECK-NEXT: Characteristics: 0
79 CHECK-NEXT: Name: (ID 14432) [
80 CHECK-NEXT: Table Offset: 0x128
81 CHECK-NEXT: Number of String Entries: 0
82 CHECK-NEXT: Number of ID Entries: 1
83 CHECK-NEXT: Language: (ID 2052) [
84 CHECK-NEXT: Entry Offset: 0x1C8
85 CHECK-NEXT: Time/Date Stamp: 1970-01-01 00:00:00 (0x0)
86 CHECK-NEXT: Major Version: 0
87 CHECK-NEXT: Minor Version: 0
88 CHECK-NEXT: Characteristics: 0
92 CHECK-NEXT: Type: DIALOG (ID 5) [
93 CHECK-NEXT: Table Offset: 0x90
94 CHECK-NEXT: Number of String Entries: 1
95 CHECK-NEXT: Number of ID Entries: 0
96 CHECK-NEXT: Name: TESTDIALOG [
97 CHECK-NEXT: Table Offset: 0x140
98 CHECK-NEXT: Number of String Entries: 0
99 CHECK-NEXT: Number of ID Entries: 1
100 CHECK-NEXT: Language: (ID 1033) [
101 CHECK-NEXT: Entry Offset: 0x1D8
102 CHECK-NEXT: Time/Date Stamp: 1970-01-01 00:00:00 (0x0)
103 CHECK-NEXT: Major Version: 0
104 CHECK-NEXT: Minor Version: 0
105 CHECK-NEXT: Characteristics: 0
109 CHECK-NEXT: Type: ACCELERATOR (ID 9) [
110 CHECK-NEXT: Table Offset: 0xA8
111 CHECK-NEXT: Number of String Entries: 1
112 CHECK-NEXT: Number of ID Entries: 1
113 CHECK-NEXT: Name: MYACCELERATORS [
114 CHECK-NEXT: Table Offset: 0x158
115 CHECK-NEXT: Number of String Entries: 0
116 CHECK-NEXT: Number of ID Entries: 1
117 CHECK-NEXT: Language: (ID 1033) [
118 CHECK-NEXT: Entry Offset: 0x1E8
119 CHECK-NEXT: Time/Date Stamp: 1970-01-01 00:00:00 (0x0)
120 CHECK-NEXT: Major Version: 0
121 CHECK-NEXT: Minor Version: 0
122 CHECK-NEXT: Characteristics: 0
125 CHECK-NEXT: Name: (ID 12) [
126 CHECK-NEXT: Table Offset: 0x170
127 CHECK-NEXT: Number of String Entries: 0
128 CHECK-NEXT: Number of ID Entries: 1
129 CHECK-NEXT: Language: (ID 1033) [
130 CHECK-NEXT: Entry Offset: 0x1F8
131 CHECK-NEXT: Time/Date Stamp: 1970-01-01 00:00:00 (0x0)
132 CHECK-NEXT: Major Version: 0
133 CHECK-NEXT: Minor Version: 0
134 CHECK-NEXT: Characteristics: 0
138 CHECK-DAG: .rsrc$02 Data (
139 CHECK-NEXT: 0000: 11000300 E7030000 0D004400 4C040000 |..........D.L...|
140 CHECK-NEXT: 0010: 82001200 BC010000 28000000 10000000 |........(.......|
141 CHECK-NEXT: 0020: 10000000 01001800 00000000 00030000 |................|
142 CHECK-NEXT: 0030: C40E0000 C40E0000 00000000 00000000 |................|
143 CHECK-NEXT: 0040: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
144 CHECK-NEXT: 0050: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
145 CHECK-NEXT: 0060: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
146 CHECK-NEXT: 0070: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
147 CHECK-NEXT: 0080: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
148 CHECK-NEXT: 0090: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
149 CHECK-NEXT: 00A0: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
150 CHECK-NEXT: 00B0: FFFFFFFF FF7F7F7F 7C7C7C78 78787575 |........|||xxxuu|
151 CHECK-NEXT: 00C0: 75FFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |u...............|
152 CHECK-NEXT: 00D0: FFFFFFFF FFFFFFFF FFFFFFFF 979797FF |................|
153 CHECK-NEXT: 00E0: FFFFFFFF FF838383 AAAAAADB DBDB7979 |..............yy|
154 CHECK-NEXT: 00F0: 79757575 FFFFFFFF FFFFFFFF FFFFFFFF |yuuu............|
155 CHECK-NEXT: 0100: FFFFFFFF FFFFFFFF FFFFFFFF 9C9C9C98 |................|
156 CHECK-NEXT: 0110: 9898FFFF FF888888 DBDBDBB7 B7B77D7D |..............}}|
157 CHECK-NEXT: 0120: 7DFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |}...............|
158 CHECK-NEXT: 0130: FFFFFFFF FFFFFFFF FFFFFFFF A0A0A09C |................|
159 CHECK-NEXT: 0140: 9C9C9393 93ADADAD F2F2F284 84848181 |................|
160 CHECK-NEXT: 0150: 81FFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
161 CHECK-NEXT: 0160: FFFFFFFF FFFFFFFF FFFFFFFF A4A4A4D7 |................|
162 CHECK-NEXT: 0170: D7D79D9D 9DD0D0D0 EEEEEE91 91918D8D |................|
163 CHECK-NEXT: 0180: 8DFFFFFF FFFFFF81 81817E7E 7EFFFFFF |..........~~~...|
164 CHECK-NEXT: 0190: FFFFFFFF FFFFFFFF FFFFFFFF A9A9A9F2 |................|
165 CHECK-NEXT: 01A0: F2F2E5E5 E5E2E2E2 95959591 91918D8D |................|
166 CHECK-NEXT: 01B0: 8D898989 868686FF FFFFFFFF FFFFFFFF |................|
167 CHECK-NEXT: 01C0: FFFFFFFF FFFFFFFF FFFFFFFF ADADADF2 |................|
168 CHECK-NEXT: 01D0: F2F2E1E1 E1DFDFDF E7E7E7E4 E4E4BBBB |................|
169 CHECK-NEXT: 01E0: BB8E8E8E FFFFFFFF FFFFFFFF FFFFFFFF |................|
170 CHECK-NEXT: 01F0: FFFFFFFF FFFFFFFF FFFFFFFF B5B5B5F2 |................|
171 CHECK-NEXT: 0200: F2F2E8E8 E8E7E7E7 EAEAEAC6 C6C69E9E |................|
172 CHECK-NEXT: 0210: 9EFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
173 CHECK-NEXT: 0220: FFFFFFFF FFFFFFFF FFFFFFFF B9B9B9F4 |................|
174 CHECK-NEXT: 0230: F4F4ECEC ECEDEDED CBCBCBA7 A7A7FFFF |................|
175 CHECK-NEXT: 0240: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
176 CHECK-NEXT: 0250: FFFFFFFF FFFFFFFF FFFFFFFF BDBDBDF7 |................|
177 CHECK-NEXT: 0260: F7F7EFEF EFD0D0D0 AFAFAFFF FFFFFFFF |................|
178 CHECK-NEXT: 0270: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
179 CHECK-NEXT: 0280: FFFFFFFF FFFFFFFF FFFFFFFF C1C1C1F7 |................|
180 CHECK-NEXT: 0290: F7F7D5D5 D5B6B6B6 FFFFFFFF FFFFFFFF |................|
181 CHECK-NEXT: 02A0: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
182 CHECK-NEXT: 02B0: FFFFFFFF FFFFFFFF FFFFFFFF C4C4C4D9 |................|
183 CHECK-NEXT: 02C0: D9D9BEBE BEFFFFFF FFFFFFFF FFFFFFFF |................|
184 CHECK-NEXT: 02D0: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
185 CHECK-NEXT: 02E0: FFFFFFFF FFFFFFFF FFFFFFFF C8C8C8C5 |................|
186 CHECK-NEXT: 02F0: C5C5FFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
187 CHECK-NEXT: 0300: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
188 CHECK-NEXT: 0310: FFFFFFFF FFFFFFFF FFFFFFFF CBCBCBFF |................|
189 CHECK-NEXT: 0320: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
190 CHECK-NEXT: 0330: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
191 CHECK-NEXT: 0340: 28000000 10000000 10000000 01001800 |(...............|
192 CHECK-NEXT: 0350: 00000000 00030000 C40E0000 C40E0000 |................|
193 CHECK-NEXT: 0360: 00000000 00000000 FFFFFFFF FFFFFFFF |................|
194 CHECK-NEXT: 0370: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
195 CHECK-NEXT: 0380: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
196 CHECK-NEXT: 0390: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
197 CHECK-NEXT: 03A0: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
198 CHECK-NEXT: 03B0: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
199 CHECK-NEXT: 03C0: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
200 CHECK-NEXT: 03D0: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
201 CHECK-NEXT: 03E0: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
202 CHECK-NEXT: 03F0: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
203 CHECK-NEXT: 0400: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
204 CHECK-NEXT: 0410: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
205 CHECK-NEXT: 0420: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
206 CHECK-NEXT: 0430: FFFFFFFF A0E3A901 B31801B3 1801B318 |................|
207 CHECK-NEXT: 0440: 01B31801 B31801B3 1861D06F FFFFFFFF |.........a.o....|
208 CHECK-NEXT: 0450: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
209 CHECK-NEXT: 0460: FFFFFFFF 01B31800 D7331CDB 49DBF9E2 |.........3..I...|
210 CHECK-NEXT: 0470: 9BEFAF00 D73300D7 3301B318 FFFFFFFF |.....3..3.......|
211 CHECK-NEXT: 0480: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
212 CHECK-NEXT: 0490: FFFFFFFF 01B31800 DE55F6FE F9DBFAE7 |.........U......|
213 CHECK-NEXT: 04A0: FEFFFE86 EFAE00DE 5501B318 FFFFFFFF |........U.......|
214 CHECK-NEXT: 04B0: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
215 CHECK-NEXT: 04C0: FFFFFFFF 01B31800 E676DBFB EC00E676 |.........v.....v|
216 CHECK-NEXT: 04D0: 57EFA5FB FFFD55EE A401B318 FFFFFFFF |W.....U.........|
217 CHECK-NEXT: 04E0: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
218 CHECK-NEXT: 04F0: FFFFFFFF 01B31800 ED9800ED 9800ED98 |................|
219 CHECK-NEXT: 0500: 00ED9887 F7CFFEFF FF01B318 FFFFFFFF |................|
220 CHECK-NEXT: 0510: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
221 CHECK-NEXT: 0520: FFFFFFFF 01B31800 F4BA00F4 BA00F4BA |................|
222 CHECK-NEXT: 0530: 00F4BA00 F4BA9CFB E401B318 FFFFFFFF |................|
223 CHECK-NEXT: 0540: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
224 CHECK-NEXT: 0550: FFFFFFFF 01B31800 FBDB00FB DB00FBDB |................|
225 CHECK-NEXT: 0560: 00FBDB00 FBDB00FB DB01B318 FFFFFFFF |................|
226 CHECK-NEXT: 0570: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
227 CHECK-NEXT: 0580: FFFFFFFF 9FE2A801 B31801B3 1801B318 |................|
228 CHECK-NEXT: 0590: 01B31801 B31801B3 1861D06F FFFFFFFF |.........a.o....|
229 CHECK-NEXT: 05A0: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
230 CHECK-NEXT: 05B0: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
231 CHECK-NEXT: 05C0: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
232 CHECK-NEXT: 05D0: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
233 CHECK-NEXT: 05E0: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
234 CHECK-NEXT: 05F0: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
235 CHECK-NEXT: 0600: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
236 CHECK-NEXT: 0610: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
237 CHECK-NEXT: 0620: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
238 CHECK-NEXT: 0630: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
239 CHECK-NEXT: 0640: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
240 CHECK-NEXT: 0650: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................|
241 CHECK-NEXT: 0660: FFFFFFFF FFFFFFFF 00000000 00006400 |..............d.|
242 CHECK-NEXT: 0670: 79007500 00000000 65007300 68006100 |y.u.....e.s.h.a.|
243 CHECK-NEXT: 0680: 6C006100 00008000 66006B00 61006F00 |l.a.....f.k.a.o.|
244 CHECK-NEXT: 0690: 79006100 00000000 0000C080 00000000 |y.a.............|
245 CHECK-NEXT: 06A0: 02000A00 0A00C800 2C010000 00005400 |........,.....T.|
246 CHECK-NEXT: 06B0: 65007300 74000000 01000250 00000000 |e.s.t......P....|
247 CHECK-NEXT: 06C0: 0A000A00 E6000E00 0100FFFF 82004300 |..............C.|
248 CHECK-NEXT: 06D0: 6F006E00 74006900 6E007500 65003A00 |o.n.t.i.n.u.e.:.|
249 CHECK-NEXT: 06E0: 00000000 00000150 00000000 42008600 |.......P....B...|
250 CHECK-NEXT: 06F0: A1000D00 0200FFFF 80002600 4F004B00 |..........&.O.K.|
251 CHECK-NEXT: 0700: 00000000 00000000 11005800 A4000000 |..........X.....|
252 CHECK-NEXT: 0710: 0D004800 2E160000 82001200 BC010000 |..H.............|
253 CHECK-NEXT: 0720: 00000000 00006400 66006900 73006800 |......d.f.i.s.h.|
254 CHECK-NEXT: 0730: 00000000 65007300 61006C00 61006400 |....e.s.a.l.a.d.|
255 CHECK-NEXT: 0740: 00008000 66006400 75006300 6B000000 |....f.d.u.c.k...|
256 CHECK-NEXT: 0750: 74686973 20697320 61207573 65722064 |this is a user d|
257 CHECK-NEXT: 0760: 6566696E 65642072 65736F75 72636500 |efined resource.|
258 CHECK-NEXT: 0770: 69742063 6F6E7461 696E7320 6D616E79 |it contains many|
259 CHECK-NEXT: 0780: 20737472 696E6773 00000000 00000000 | strings........|