xref: /llvm-project/llvm/test/tools/llvm-readobj/COFF/resources.test (revision dbf520f617440d62ca46f64cdc41159945911902)
1*dbf520f6SGeorgii Rymar// Check dumping of the .rsrc section(s)
2*dbf520f6SGeorgii Rymar// The input was generated with the following commands, using the original Windows
3*dbf520f6SGeorgii Rymar// rc.exe and cvtres.exe:
4*dbf520f6SGeorgii Rymar// > rc /fo test_resource.res /nologo test_resource.rc
5*dbf520f6SGeorgii Rymar// > cvtres /machine:X86 /readonly /nologo /out:test_resource.o test_resource.res
6*dbf520f6SGeorgii Rymar
7*dbf520f6SGeorgii RymarRUN: llvm-readobj --coff-resources --section-data %p/Inputs/zero-string-table.obj.coff-i386 \
8*dbf520f6SGeorgii RymarRUN:   | FileCheck %s -check-prefix ZERO
9*dbf520f6SGeorgii RymarRUN: llvm-readobj --coff-resources %p/Inputs/resources/test_resource.obj.coff \
10*dbf520f6SGeorgii RymarRUN:   | FileCheck %s -check-prefix TEST_RES
11*dbf520f6SGeorgii Rymar
12*dbf520f6SGeorgii RymarZERO:     Resources [
13*dbf520f6SGeorgii RymarZERO-NEXT:  Total Number of Resources: 1
14*dbf520f6SGeorgii RymarZERO-NEXT:  Base Table Address: 0x188
15*dbf520f6SGeorgii RymarZERO-DAG:   Number of String Entries: 0
16*dbf520f6SGeorgii RymarZERO-NEXT:  Number of ID Entries: 1
17*dbf520f6SGeorgii RymarZERO-NEXT:  Type: STRINGTABLE (ID 6) [
18*dbf520f6SGeorgii RymarZERO-NEXT:    Table Offset: 0x18
19*dbf520f6SGeorgii RymarZERO-NEXT:    Number of String Entries: 0
20*dbf520f6SGeorgii RymarZERO-NEXT:    Number of ID Entries: 1
21*dbf520f6SGeorgii RymarZERO-NEXT:    Name: (ID 1) [
22*dbf520f6SGeorgii RymarZERO-NEXT:      Table Offset: 0x30
23*dbf520f6SGeorgii RymarZERO-NEXT:      Number of String Entries: 0
24*dbf520f6SGeorgii RymarZERO-NEXT:      Number of ID Entries: 1
25*dbf520f6SGeorgii RymarZERO-NEXT:      Language: (ID 1033) [
26*dbf520f6SGeorgii RymarZERO-NEXT:        Entry Offset: 0x48
27*dbf520f6SGeorgii RymarZERO-NEXT:        Time/Date Stamp: 1970-01-01 00:00:00 (0x0)
28*dbf520f6SGeorgii RymarZERO-NEXT:        Major Version: 0
29*dbf520f6SGeorgii RymarZERO-NEXT:        Minor Version: 0
30*dbf520f6SGeorgii RymarZERO-NEXT:        Characteristics: 0
31*dbf520f6SGeorgii RymarZERO-NEXT:        Data [
32*dbf520f6SGeorgii RymarZERO-NEXT:          DataRVA: 0x0
33*dbf520f6SGeorgii RymarZERO-NEXT:          DataSize: 42
34*dbf520f6SGeorgii RymarZERO-NEXT:          Codepage: 0
35*dbf520f6SGeorgii RymarZERO-NEXT:          Reserved: 0
36*dbf520f6SGeorgii RymarZERO-NEXT:          Data (
37*dbf520f6SGeorgii RymarZERO-NEXT:            0000: 00000500 48006500 6C006C00 6F000000  |....H.e.l.l.o...|
38*dbf520f6SGeorgii RymarZERO-NEXT:            0010: 00000000 00000000 00000000 00000000  |................|
39*dbf520f6SGeorgii RymarZERO-NEXT:            0020: 00000000 00000000 0000               |..........|
40*dbf520f6SGeorgii RymarZERO-NEXT:          )
41*dbf520f6SGeorgii RymarZERO-NEXT:        ]
42*dbf520f6SGeorgii RymarZERO-NEXT:      ]
43*dbf520f6SGeorgii RymarZERO-NEXT:    ]
44*dbf520f6SGeorgii RymarZERO-NEXT:  ]
45*dbf520f6SGeorgii Rymar
46*dbf520f6SGeorgii RymarTEST_RES:     Resources [
47*dbf520f6SGeorgii RymarTEST_RES-NEXT:  Total Number of Resources: 7
48*dbf520f6SGeorgii RymarTEST_RES-NEXT:  Base Table Address: 0x1C0
49*dbf520f6SGeorgii RymarTEST_RES-DAG:   Number of String Entries: 0
50*dbf520f6SGeorgii RymarTEST_RES-NEXT:  Number of ID Entries: 4
51*dbf520f6SGeorgii RymarTEST_RES-NEXT:  Type: BITMAP (ID 2) [
52*dbf520f6SGeorgii RymarTEST_RES-NEXT:    Table Offset: 0x30
53*dbf520f6SGeorgii RymarTEST_RES-NEXT:    Number of String Entries: 2
54*dbf520f6SGeorgii RymarTEST_RES-NEXT:    Number of ID Entries: 0
55*dbf520f6SGeorgii RymarTEST_RES-NEXT:    Name: CURSOR [
56*dbf520f6SGeorgii RymarTEST_RES-NEXT:      Table Offset: 0xA8
57*dbf520f6SGeorgii RymarTEST_RES-NEXT:      Number of String Entries: 0
58*dbf520f6SGeorgii RymarTEST_RES-NEXT:      Number of ID Entries: 1
59*dbf520f6SGeorgii RymarTEST_RES-NEXT:      Language: (ID 1033) [
60*dbf520f6SGeorgii RymarTEST_RES-NEXT:        Entry Offset: 0x150
61*dbf520f6SGeorgii RymarTEST_RES-NEXT:        Time/Date Stamp: 1970-01-01 00:00:00 (0x0)
62*dbf520f6SGeorgii RymarTEST_RES-NEXT:        Major Version: 0
63*dbf520f6SGeorgii RymarTEST_RES-NEXT:        Minor Version: 0
64*dbf520f6SGeorgii RymarTEST_RES-NEXT:        Characteristics: 0
65*dbf520f6SGeorgii RymarTEST_RES-NEXT:        Data [
66*dbf520f6SGeorgii RymarTEST_RES-NEXT:          DataRVA: 0x0
67*dbf520f6SGeorgii RymarTEST_RES-NEXT:          DataSize: 808
68*dbf520f6SGeorgii RymarTEST_RES-NEXT:          Codepage: 0
69*dbf520f6SGeorgii RymarTEST_RES-NEXT:          Reserved: 0
70*dbf520f6SGeorgii RymarTEST_RES-NEXT:          Data (
71*dbf520f6SGeorgii RymarTEST_RES:               )
72*dbf520f6SGeorgii RymarTEST_RES-NEXT:        ]
73*dbf520f6SGeorgii RymarTEST_RES-NEXT:      ]
74*dbf520f6SGeorgii RymarTEST_RES-NEXT:    ]
75*dbf520f6SGeorgii RymarTEST_RES-NEXT:    Name: OKAY [
76*dbf520f6SGeorgii RymarTEST_RES-NEXT:      Table Offset: 0xC0
77*dbf520f6SGeorgii RymarTEST_RES-NEXT:      Number of String Entries: 0
78*dbf520f6SGeorgii RymarTEST_RES-NEXT:      Number of ID Entries: 1
79*dbf520f6SGeorgii RymarTEST_RES-NEXT:      Language: (ID 1033) [
80*dbf520f6SGeorgii RymarTEST_RES-NEXT:        Entry Offset: 0x160
81*dbf520f6SGeorgii RymarTEST_RES-NEXT:        Time/Date Stamp: 1970-01-01 00:00:00 (0x0)
82*dbf520f6SGeorgii RymarTEST_RES-NEXT:        Major Version: 0
83*dbf520f6SGeorgii RymarTEST_RES-NEXT:        Minor Version: 0
84*dbf520f6SGeorgii RymarTEST_RES-NEXT:        Characteristics: 0
85*dbf520f6SGeorgii RymarTEST_RES-NEXT:        Data [
86*dbf520f6SGeorgii RymarTEST_RES-NEXT:          DataRVA: 0x0
87*dbf520f6SGeorgii RymarTEST_RES-NEXT:          DataSize: 808
88*dbf520f6SGeorgii RymarTEST_RES-NEXT:          Codepage: 0
89*dbf520f6SGeorgii RymarTEST_RES-NEXT:          Reserved: 0
90*dbf520f6SGeorgii RymarTEST_RES-NEXT:          Data (
91*dbf520f6SGeorgii RymarTEST_RES:               )
92*dbf520f6SGeorgii RymarTEST_RES-NEXT:        ]
93*dbf520f6SGeorgii RymarTEST_RES-NEXT:      ]
94*dbf520f6SGeorgii RymarTEST_RES-NEXT:    ]
95*dbf520f6SGeorgii RymarTEST_RES-NEXT:  ]
96*dbf520f6SGeorgii RymarTEST_RES-NEXT:  Type: MENU (ID 4) [
97*dbf520f6SGeorgii RymarTEST_RES-NEXT:    Table Offset: 0x50
98*dbf520f6SGeorgii RymarTEST_RES-NEXT:    Number of String Entries: 1
99*dbf520f6SGeorgii RymarTEST_RES-NEXT:    Number of ID Entries: 1
100*dbf520f6SGeorgii RymarTEST_RES-NEXT:    Name: "EAT" [
101*dbf520f6SGeorgii RymarTEST_RES-NEXT:      Table Offset: 0xD8
102*dbf520f6SGeorgii RymarTEST_RES-NEXT:      Number of String Entries: 0
103*dbf520f6SGeorgii RymarTEST_RES-NEXT:      Number of ID Entries: 1
104*dbf520f6SGeorgii RymarTEST_RES-NEXT:      Language: (ID 3081) [
105*dbf520f6SGeorgii RymarTEST_RES-NEXT:        Entry Offset: 0x170
106*dbf520f6SGeorgii RymarTEST_RES-NEXT:        Time/Date Stamp: 1970-01-01 00:00:00 (0x0)
107*dbf520f6SGeorgii RymarTEST_RES-NEXT:        Major Version: 0
108*dbf520f6SGeorgii RymarTEST_RES-NEXT:        Minor Version: 0
109*dbf520f6SGeorgii RymarTEST_RES-NEXT:        Characteristics: 0
110*dbf520f6SGeorgii RymarTEST_RES-NEXT:        Data [
111*dbf520f6SGeorgii RymarTEST_RES-NEXT:          DataRVA: 0x0
112*dbf520f6SGeorgii RymarTEST_RES-NEXT:          DataSize: 48
113*dbf520f6SGeorgii RymarTEST_RES-NEXT:          Codepage: 0
114*dbf520f6SGeorgii RymarTEST_RES-NEXT:          Reserved: 0
115*dbf520f6SGeorgii RymarTEST_RES-NEXT:          Data (
116*dbf520f6SGeorgii RymarTEST_RES:               )
117*dbf520f6SGeorgii RymarTEST_RES-NEXT:        ]
118*dbf520f6SGeorgii RymarTEST_RES-NEXT:      ]
119*dbf520f6SGeorgii RymarTEST_RES-NEXT:    ]
120*dbf520f6SGeorgii RymarTEST_RES-NEXT:    Name: (ID 14432) [
121*dbf520f6SGeorgii RymarTEST_RES-NEXT:      Table Offset: 0xF0
122*dbf520f6SGeorgii RymarTEST_RES-NEXT:      Number of String Entries: 0
123*dbf520f6SGeorgii RymarTEST_RES-NEXT:      Number of ID Entries: 1
124*dbf520f6SGeorgii RymarTEST_RES-NEXT:      Language: (ID 2052) [
125*dbf520f6SGeorgii RymarTEST_RES-NEXT:        Entry Offset: 0x180
126*dbf520f6SGeorgii RymarTEST_RES-NEXT:        Time/Date Stamp: 1970-01-01 00:00:00 (0x0)
127*dbf520f6SGeorgii RymarTEST_RES-NEXT:        Major Version: 0
128*dbf520f6SGeorgii RymarTEST_RES-NEXT:        Minor Version: 0
129*dbf520f6SGeorgii RymarTEST_RES-NEXT:        Characteristics: 0
130*dbf520f6SGeorgii RymarTEST_RES-NEXT:        Data [
131*dbf520f6SGeorgii RymarTEST_RES-NEXT:          DataRVA: 0x0
132*dbf520f6SGeorgii RymarTEST_RES-NEXT:          DataSize: 46
133*dbf520f6SGeorgii RymarTEST_RES-NEXT:          Codepage: 0
134*dbf520f6SGeorgii RymarTEST_RES-NEXT:          Reserved: 0
135*dbf520f6SGeorgii RymarTEST_RES-NEXT:          Data (
136*dbf520f6SGeorgii RymarTEST_RES:               )
137*dbf520f6SGeorgii RymarTEST_RES-NEXT:        ]
138*dbf520f6SGeorgii RymarTEST_RES-NEXT:      ]
139*dbf520f6SGeorgii RymarTEST_RES-NEXT:    ]
140*dbf520f6SGeorgii RymarTEST_RES-NEXT:  ]
141*dbf520f6SGeorgii RymarTEST_RES-NEXT:  Type: DIALOG (ID 5) [
142*dbf520f6SGeorgii RymarTEST_RES-NEXT:    Table Offset: 0x70
143*dbf520f6SGeorgii RymarTEST_RES-NEXT:    Number of String Entries: 1
144*dbf520f6SGeorgii RymarTEST_RES-NEXT:    Number of ID Entries: 0
145*dbf520f6SGeorgii RymarTEST_RES-NEXT:    Name: TESTDIALOG [
146*dbf520f6SGeorgii RymarTEST_RES-NEXT:      Table Offset: 0x108
147*dbf520f6SGeorgii RymarTEST_RES-NEXT:      Number of String Entries: 0
148*dbf520f6SGeorgii RymarTEST_RES-NEXT:      Number of ID Entries: 1
149*dbf520f6SGeorgii RymarTEST_RES-NEXT:      Language: (ID 1033) [
150*dbf520f6SGeorgii RymarTEST_RES-NEXT:        Entry Offset: 0x190
151*dbf520f6SGeorgii RymarTEST_RES-NEXT:        Time/Date Stamp: 1970-01-01 00:00:00 (0x0)
152*dbf520f6SGeorgii RymarTEST_RES-NEXT:        Major Version: 0
153*dbf520f6SGeorgii RymarTEST_RES-NEXT:        Minor Version: 0
154*dbf520f6SGeorgii RymarTEST_RES-NEXT:        Characteristics: 0
155*dbf520f6SGeorgii RymarTEST_RES-NEXT:        Data [
156*dbf520f6SGeorgii RymarTEST_RES-NEXT:          DataRVA: 0x0
157*dbf520f6SGeorgii RymarTEST_RES-NEXT:          DataSize: 108
158*dbf520f6SGeorgii RymarTEST_RES-NEXT:          Codepage: 0
159*dbf520f6SGeorgii RymarTEST_RES-NEXT:          Reserved: 0
160*dbf520f6SGeorgii RymarTEST_RES-NEXT:          Data (
161*dbf520f6SGeorgii RymarTEST_RES:               )
162*dbf520f6SGeorgii RymarTEST_RES-NEXT:        ]
163*dbf520f6SGeorgii RymarTEST_RES-NEXT:      ]
164*dbf520f6SGeorgii RymarTEST_RES-NEXT:    ]
165*dbf520f6SGeorgii RymarTEST_RES-NEXT:  ]
166*dbf520f6SGeorgii RymarTEST_RES-NEXT:  Type: ACCELERATOR (ID 9) [
167*dbf520f6SGeorgii RymarTEST_RES-NEXT:    Table Offset: 0x88
168*dbf520f6SGeorgii RymarTEST_RES-NEXT:    Number of String Entries: 1
169*dbf520f6SGeorgii RymarTEST_RES-NEXT:    Number of ID Entries: 1
170*dbf520f6SGeorgii RymarTEST_RES-NEXT:    Name: MYACCELERATORS [
171*dbf520f6SGeorgii RymarTEST_RES-NEXT:      Table Offset: 0x120
172*dbf520f6SGeorgii RymarTEST_RES-NEXT:      Number of String Entries: 0
173*dbf520f6SGeorgii RymarTEST_RES-NEXT:      Number of ID Entries: 1
174*dbf520f6SGeorgii RymarTEST_RES-NEXT:      Language: (ID 1033) [
175*dbf520f6SGeorgii RymarTEST_RES-NEXT:        Entry Offset: 0x1A0
176*dbf520f6SGeorgii RymarTEST_RES-NEXT:        Time/Date Stamp: 1970-01-01 00:00:00 (0x0)
177*dbf520f6SGeorgii RymarTEST_RES-NEXT:        Major Version: 0
178*dbf520f6SGeorgii RymarTEST_RES-NEXT:        Minor Version: 0
179*dbf520f6SGeorgii RymarTEST_RES-NEXT:        Characteristics: 0
180*dbf520f6SGeorgii RymarTEST_RES-NEXT:        Data [
181*dbf520f6SGeorgii RymarTEST_RES-NEXT:          DataRVA: 0x0
182*dbf520f6SGeorgii RymarTEST_RES-NEXT:          DataSize: 24
183*dbf520f6SGeorgii RymarTEST_RES-NEXT:          Codepage: 0
184*dbf520f6SGeorgii RymarTEST_RES-NEXT:          Reserved: 0
185*dbf520f6SGeorgii RymarTEST_RES-NEXT:          Data (
186*dbf520f6SGeorgii RymarTEST_RES:               )
187*dbf520f6SGeorgii RymarTEST_RES-NEXT:        ]
188*dbf520f6SGeorgii RymarTEST_RES-NEXT:      ]
189*dbf520f6SGeorgii RymarTEST_RES-NEXT:    ]
190*dbf520f6SGeorgii RymarTEST_RES-NEXT:    Name: (ID 12) [
191*dbf520f6SGeorgii RymarTEST_RES-NEXT:      Table Offset: 0x138
192*dbf520f6SGeorgii RymarTEST_RES-NEXT:      Number of String Entries: 0
193*dbf520f6SGeorgii RymarTEST_RES-NEXT:      Number of ID Entries: 1
194*dbf520f6SGeorgii RymarTEST_RES-NEXT:      Language: (ID 1033) [
195*dbf520f6SGeorgii RymarTEST_RES-NEXT:        Entry Offset: 0x1B0
196*dbf520f6SGeorgii RymarTEST_RES-NEXT:        Time/Date Stamp: 1970-01-01 00:00:00 (0x0)
197*dbf520f6SGeorgii RymarTEST_RES-NEXT:        Major Version: 0
198*dbf520f6SGeorgii RymarTEST_RES-NEXT:        Minor Version: 0
199*dbf520f6SGeorgii RymarTEST_RES-NEXT:        Characteristics: 0
200*dbf520f6SGeorgii RymarTEST_RES-NEXT:        Data [
201*dbf520f6SGeorgii RymarTEST_RES-NEXT:          DataRVA: 0x0
202*dbf520f6SGeorgii RymarTEST_RES-NEXT:          DataSize: 24
203*dbf520f6SGeorgii RymarTEST_RES-NEXT:          Codepage: 0
204*dbf520f6SGeorgii RymarTEST_RES-NEXT:          Reserved: 0
205*dbf520f6SGeorgii RymarTEST_RES-NEXT:          Data (
206*dbf520f6SGeorgii RymarTEST_RES:               )
207*dbf520f6SGeorgii RymarTEST_RES-NEXT:        ]
208*dbf520f6SGeorgii RymarTEST_RES-NEXT:      ]
209*dbf520f6SGeorgii RymarTEST_RES-NEXT:    ]
210*dbf520f6SGeorgii RymarTEST_RES-NEXT:  ]
211