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