llvm-project
217 строк · 2.1 Кб
1# REQUIRES: x86
2
3# Test that the strtab size is included in the allocation even if the
4# strtab itself is empty. To achieve this, we need a number of symbols N
5# where alignTo(N*18, 512) < alignTo(N*18 + 4, 512), where the first
6# positive N fulfilling that is 199.
7
8# RUN: llvm-mc -triple=x86_64-windows-msvc %s -filetype=obj -o %t.obj
9# RUN: lld-link -out:%t.exe -entry:main %t.obj -debug:dwarf
10
11# If the size of the strtab isn't allocated for, llvm-readobj would
12# output SymbolCount: 0 (and dumpbin.exe would error out with "invalid file
13# or disk full, cannot seek to 0x1602").
14
15# RUN: llvm-readobj --file-headers %t.exe | FileCheck %s
16# CHECK: SymbolCount: 197
17
18.global main
19.text
20main:
21sym0:
22sym1:
23sym2:
24sym3:
25sym4:
26sym5:
27sym6:
28sym7:
29sym8:
30sym9:
31sym10:
32sym11:
33sym12:
34sym13:
35sym14:
36sym15:
37sym16:
38sym17:
39sym18:
40sym19:
41sym20:
42sym21:
43sym22:
44sym23:
45sym24:
46sym25:
47sym26:
48sym27:
49sym28:
50sym29:
51sym30:
52sym31:
53sym32:
54sym33:
55sym34:
56sym35:
57sym36:
58sym37:
59sym38:
60sym39:
61sym40:
62sym41:
63sym42:
64sym43:
65sym44:
66sym45:
67sym46:
68sym47:
69sym48:
70sym49:
71sym50:
72sym51:
73sym52:
74sym53:
75sym54:
76sym55:
77sym56:
78sym57:
79sym58:
80sym59:
81sym60:
82sym61:
83sym62:
84sym63:
85sym64:
86sym65:
87sym66:
88sym67:
89sym68:
90sym69:
91sym70:
92sym71:
93sym72:
94sym73:
95sym74:
96sym75:
97sym76:
98sym77:
99sym78:
100sym79:
101sym80:
102sym81:
103sym82:
104sym83:
105sym84:
106sym85:
107sym86:
108sym87:
109sym88:
110sym89:
111sym90:
112sym91:
113sym92:
114sym93:
115sym94:
116sym95:
117sym96:
118sym97:
119sym98:
120sym99:
121sym100:
122sym101:
123sym102:
124sym103:
125sym104:
126sym105:
127sym106:
128sym107:
129sym108:
130sym109:
131sym110:
132sym111:
133sym112:
134sym113:
135sym114:
136sym115:
137sym116:
138sym117:
139sym118:
140sym119:
141sym120:
142sym121:
143sym122:
144sym123:
145sym124:
146sym125:
147sym126:
148sym127:
149sym128:
150sym129:
151sym130:
152sym131:
153sym132:
154sym133:
155sym134:
156sym135:
157sym136:
158sym137:
159sym138:
160sym139:
161sym140:
162sym141:
163sym142:
164sym143:
165sym144:
166sym145:
167sym146:
168sym147:
169sym148:
170sym149:
171sym150:
172sym151:
173sym152:
174sym153:
175sym154:
176sym155:
177sym156:
178sym157:
179sym158:
180sym159:
181sym160:
182sym161:
183sym162:
184sym163:
185sym164:
186sym165:
187sym166:
188sym167:
189sym168:
190sym169:
191sym170:
192sym171:
193sym172:
194sym173:
195sym174:
196sym175:
197sym176:
198sym177:
199sym178:
200sym179:
201sym180:
202sym181:
203sym182:
204sym183:
205sym184:
206sym185:
207sym186:
208sym187:
209sym188:
210sym189:
211sym190:
212sym191:
213sym192:
214sym193:
215sym194:
216sym195:
217ret
218