-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathlinker_script
394 lines (387 loc) · 13.3 KB
/
linker_script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
source 'app_tools/app.src'
if DEBUG
iterate sections, <.comment, .debug_abbrev, .debug_addr, .debug_aranges, \
.debug_frame, .debug_info, .debug_line, .debug_line_str, \
.debug_loc, .debug_loclists, .debug_macinfo, \
.debug_macro, .debug_names, .debug_pubnames, \
.debug_pubtypes, .debug_ranges, .debug_rnglists, \
.debug_str, .debug_str_offsets, .debug_sup, .debug_types, \
.debug_abbrev.dwo, .debug_info.dwo, .debug_line.dwo, \
.debug_loclists.dwo, .debug_macro.dwo, \
.debug_rnglists.dwo, .debug_str.dwo, \
.debug_str_offsets.dwo, .debug_cu_index, .debug_tu_index>
split debug: sections
precious sections
end iterate
end if
locate .app.header element at .app.header.element
order .app.header, .app.init, .init.libs, .init.clock, .init.reruncheck, .init, .jp_fini, .text, .rodata, .app.info_string
locate .fini element at .fini.element + .app.info_string.base + .app.info_string.length - .app.header.element
order .fini, .data, .libs, .jp_post_libs
locate .app.footer at .app.info_string.base + .app.info_string.length + .jp_post_libs.base + .jp_post_libs.length - .fini.base
split : .init_array, .ctors, .dtors, .fini_array
precious .init.libs if .libs.length, .libs, .init_array, .ctors, .dtors, .fini_array, .app.header, .app.init, .app.info_string, .app.footer, .jp_fini, .jp_post_libs
provide ___low_bss = .bss.base
provide ___len_bss = .bss.length
provide ___heaptop = .bss.high
provide ___heapbot = .bss.top
provide ___libs = .libs.base
provide ___init_array_count = .init_array.length / 3
provide ___ctors_count = .ctors.length / 3
provide ___dtors_count = .dtors.length / 3
provide ___fini_array_count = .fini_array.length / 3
require __start
library "../lib/libload/libload.lib" neveroptional
require lib.LibLoad if .libs.length
source "../lib/crt/and.src"
source "../lib/crt/and_fast.src"
source "../lib/crt/bbitrev.src"
source "../lib/crt/bctlz.src"
source "../lib/crt/bdivs.src"
source "../lib/crt/bdivu.src"
source "../lib/crt/bdvrms_abs.src"
source "../lib/crt/bdvrmu.src"
source "../lib/crt/bmuls.src"
source "../lib/crt/bmulu.src"
source "../lib/crt/bpopcnt.src"
source "../lib/crt/brems.src"
source "../lib/crt/bremu.src"
source "../lib/crt/bshl.src"
source "../lib/crt/bshrs.src"
source "../lib/crt/bshru.src"
source "../lib/crt/ftoll.c.src"
source "../lib/crt/lltof.c.src"
source "../lib/crt/ulltof.c.src"
source "../lib/crt/fpneg.src"
source "../lib/crt/fpupop1.src"
source "../lib/crt/fpupop2.src"
source "../lib/crt/frameset.src"
source "../lib/crt/frameset0.src"
source "../lib/crt/frbmuls.src"
source "../lib/crt/frimuls.src"
source "../lib/crt/frimulu.src"
source "../lib/crt/frsmuls.src"
source "../lib/crt/frsmulu.src"
source "../lib/crt/ftoll.src"
source "../lib/crt/i48stubs.src"
source "../lib/crt/ibitrev.src"
source "../lib/crt/ibitrev_fast.src"
source "../lib/crt/icmpzero.src"
source "../lib/crt/ictlz.src"
source "../lib/crt/idivs.src"
source "../lib/crt/idivu.src"
source "../lib/crt/idvrms.src"
source "../lib/crt/idvrmu.src"
source "../lib/crt/imulu.src"
source "../lib/crt/imulu_fast.src"
source "../lib/crt/inchar.src"
source "../lib/crt/indcallhl.src"
source "../lib/crt/ineg.src"
source "../lib/crt/ineg_fast.src"
source "../lib/crt/inot.src"
source "../lib/crt/inot_fast.src"
source "../lib/crt/internal_bitrev_byte.src"
source "../lib/crt/ipopcnt.src"
source "../lib/crt/ipopcnt_fast.src"
source "../lib/crt/irems.src"
source "../lib/crt/iremu.src"
source "../lib/crt/ishl.src"
source "../lib/crt/ishrs.src"
source "../lib/crt/ishrs_1_fast.src"
source "../lib/crt/ishru_1_fast.src"
source "../lib/crt/labs.src"
source "../lib/crt/ladd.src"
source "../lib/crt/ladd_1.src"
source "../lib/crt/ladd_b.src"
source "../lib/crt/ladd_b_fast.src"
source "../lib/crt/ladd_fast.src"
source "../lib/crt/lbitrev.src"
source "../lib/crt/lbswap.src"
source "../lib/crt/lcmps.src"
source "../lib/crt/lcmps_fast.src"
source "../lib/crt/lcmpu.src"
source "../lib/crt/lcmpu_fast.src"
source "../lib/crt/lcmpzero.src"
source "../lib/crt/lctlz.src"
source "../lib/crt/ldiv.src"
source "../lib/crt/ldivs.src"
source "../lib/crt/ldivs_lrems_common.src"
source "../lib/crt/ldivu.src"
source "../lib/crt/ldvrmu.src"
source "../lib/crt/llabs.src"
source "../lib/crt/lladd.src"
source "../lib/crt/lladd_1.src"
source "../lib/crt/lladd_b.src"
source "../lib/crt/lladd_b_fast.src"
source "../lib/crt/lladd_fast.src"
source "../lib/crt/lland.src"
source "../lib/crt/lland_fast.src"
source "../lib/crt/llbitrev.src"
source "../lib/crt/llbswap.src"
source "../lib/crt/llcmps.src"
source "../lib/crt/llcmps_fast.src"
source "../lib/crt/llcmpu.src"
source "../lib/crt/llcmpu_fast.src"
source "../lib/crt/llcmpzero.src"
source "../lib/crt/llcmpzero_fast.src"
source "../lib/crt/llctlz.src"
source "../lib/crt/lldiv.src"
source "../lib/crt/lldivs.src"
source "../lib/crt/lldivu.src"
source "../lib/crt/lldivu_b.src"
source "../lib/crt/lldvrmu.src"
source "../lib/crt/llmulu.src"
source "../lib/crt/llmulu_b.src"
source "../lib/crt/llneg.src"
source "../lib/crt/llneg_fast.src"
source "../lib/crt/llnot.src"
source "../lib/crt/llnot_fast.src"
source "../lib/crt/llor.src"
source "../lib/crt/llor_fast.src"
source "../lib/crt/llpopcnt.src"
source "../lib/crt/llpopcnt_fast.src"
source "../lib/crt/llremu.src"
source "../lib/crt/llshl.src"
source "../lib/crt/llshl_1_fast.src"
source "../lib/crt/llshrs.src"
source "../lib/crt/llshrs_1_fast.src"
source "../lib/crt/llshrs_fast.src"
source "../lib/crt/llshru.src"
source "../lib/crt/llshru_1_fast.src"
source "../lib/crt/llshru_fast.src"
source "../lib/crt/llsub.src"
source "../lib/crt/llsub_1.src"
source "../lib/crt/llsub_fast.src"
source "../lib/crt/lltof.src"
source "../lib/crt/llxor.src"
source "../lib/crt/llxor_fast.src"
source "../lib/crt/lmulu.src"
source "../lib/crt/lmulu_fast.src"
source "../lib/crt/lneg.src"
source "../lib/crt/lneg_fast.src"
source "../lib/crt/lnot.src"
source "../lib/crt/lnot_fast.src"
source "../lib/crt/lpopcnt.src"
source "../lib/crt/lpopcnt_fast.src"
source "../lib/crt/lrems.src"
source "../lib/crt/lremu.src"
source "../lib/crt/lshl.src"
source "../lib/crt/lshrs.src"
source "../lib/crt/lshrs_1_fast.src"
source "../lib/crt/lshru.src"
source "../lib/crt/lshru_1_fast.src"
source "../lib/crt/lsub.src"
source "../lib/crt/lsub_1.src"
source "../lib/crt/lsub_fast.src"
source "../lib/crt/or.src"
source "../lib/crt/or_fast.src"
source "../lib/crt/os.src"
source "../lib/crt/popcnt_common.src"
source "../lib/crt/sand.src"
source "../lib/crt/sbitrev.src"
source "../lib/crt/scmpzero.src"
source "../lib/crt/sctlz.src"
source "../lib/crt/sdivs.src"
source "../lib/crt/sdivu.src"
source "../lib/crt/sdvrms_abs.src"
source "../lib/crt/sdvrmu.src"
source "../lib/crt/smulu.src"
source "../lib/crt/smulu_fast.src"
source "../lib/crt/sneg.src"
source "../lib/crt/sneg_fast.src"
source "../lib/crt/snot.src"
source "../lib/crt/snot_fast.src"
source "../lib/crt/sor.src"
source "../lib/crt/spopcnt.src"
source "../lib/crt/spopcnt_fast.src"
source "../lib/crt/srems.src"
source "../lib/crt/sremu.src"
source "../lib/crt/sshl.src"
source "../lib/crt/sshrs.src"
source "../lib/crt/sshru.src"
source "../lib/crt/sxor.src"
source "../lib/crt/ulltof.src"
source "../lib/crt/xor.src"
source "../lib/crt/xor_fast.src"
source "../lib/ce/atomic_load_32.src"
source "../lib/ce/atomic_load_decreasing_32.src"
source "../lib/ce/atomic_load_increasing_32.src"
source "../lib/ce/delay.src"
source "../lib/ce/eval.src"
source "../lib/ce/getstringinput.src"
source "../lib/ce/gettokeninput.src"
source "../lib/ce/intce.src"
source "../lib/ce/os_textbuffer.src"
source "../lib/ce/random.src"
source "../lib/ce/runprgm.src"
source "../lib/ce/sleep.src"
source "../lib/ce/sleep_common.src"
source "../lib/ce/tice.src"
source "../lib/ce/ticksleep.src"
source "../lib/ce/usleep.src"
source "../lib/ce/zx0.src"
source "../lib/ce/zx7.src"
if HAS_LIBC
source "../lib/libc/abs.src"
source "../lib/libc/acos.src"
source "../lib/libc/allocator.src"
source "../lib/libc/allocator_simple.src"
source "../lib/libc/asin.src"
source "../lib/libc/atan.src"
source "../lib/libc/atan2.src"
source "../lib/libc/atof.src"
source "../lib/libc/atol.src"
source "../lib/libc/atoll.src"
source "../lib/libc/acosh.c.src"
source "../lib/libc/allocator_standard.c.src"
source "../lib/libc/asctime.c.src"
source "../lib/libc/asin.c.src"
source "../lib/libc/asinh.c.src"
source "../lib/libc/assert.c.src"
source "../lib/libc/atan.c.src"
source "../lib/libc/atan2.c.src"
source "../lib/libc/atanh.c.src"
source "../lib/libc/bsearch.c.src"
source "../lib/libc/cbrt.c.src"
source "../lib/libc/clearerr.c.src"
source "../lib/libc/cosh.c.src"
source "../lib/libc/ctime.c.src"
source "../lib/libc/difftime.c.src"
source "../lib/libc/erf.c.src"
source "../lib/libc/erfc.c.src"
source "../lib/libc/exp.c.src"
source "../lib/libc/exp2.c.src"
source "../lib/libc/expm1.c.src"
source "../lib/libc/fclose.c.src"
source "../lib/libc/fdim.c.src"
source "../lib/libc/fenv.c.src"
source "../lib/libc/feof.c.src"
source "../lib/libc/ferror.c.src"
source "../lib/libc/fflush.c.src"
source "../lib/libc/fgetc.c.src"
source "../lib/libc/fgets.c.src"
source "../lib/libc/files.c.src"
source "../lib/libc/floor.c.src"
source "../lib/libc/fma.c.src"
source "../lib/libc/fmax.c.src"
source "../lib/libc/fmin.c.src"
source "../lib/libc/fmod.c.src"
source "../lib/libc/fopen.c.src"
source "../lib/libc/fputc.c.src"
source "../lib/libc/fputs.c.src"
source "../lib/libc/fread.c.src"
source "../lib/libc/frexp.c.src"
source "../lib/libc/fseek.c.src"
source "../lib/libc/ftell.c.src"
source "../lib/libc/fwrite.c.src"
source "../lib/libc/gmtime.c.src"
source "../lib/libc/hypot.c.src"
source "../lib/libc/ilogb.c.src"
source "../lib/libc/ldexp.c.src"
source "../lib/libc/lgamma.c.src"
source "../lib/libc/llrint.c.src"
source "../lib/libc/llround.c.src"
source "../lib/libc/localtime.c.src"
source "../lib/libc/log.c.src"
source "../lib/libc/log10.c.src"
source "../lib/libc/log1p.c.src"
source "../lib/libc/log2.c.src"
source "../lib/libc/logb.c.src"
source "../lib/libc/lrint.c.src"
source "../lib/libc/lround.c.src"
source "../lib/libc/maptab.c.src"
source "../lib/libc/mktime.c.src"
source "../lib/libc/modf.c.src"
source "../lib/libc/nan.c.src"
source "../lib/libc/nanoprintf.c.src"
source "../lib/libc/nearbyint.c.src"
source "../lib/libc/nextafter.c.src"
source "../lib/libc/pow.c.src"
source "../lib/libc/qsort.c.src"
source "../lib/libc/quick_exit.c.src"
source "../lib/libc/remainder.c.src"
source "../lib/libc/remove.c.src"
source "../lib/libc/remquo.c.src"
source "../lib/libc/rewind.c.src"
source "../lib/libc/rint.c.src"
source "../lib/libc/round.c.src"
source "../lib/libc/roundeven.c.src"
source "../lib/libc/scalbln.c.src"
source "../lib/libc/scalbn.c.src"
source "../lib/libc/sin.c.src"
source "../lib/libc/sinh.c.src"
source "../lib/libc/sqrt.c.src"
source "../lib/libc/strftime.c.src"
source "../lib/libc/strtof.c.src"
source "../lib/libc/strtol.c.src"
source "../lib/libc/strtoll.c.src"
source "../lib/libc/strtoul.c.src"
source "../lib/libc/strtoull.c.src"
source "../lib/libc/tan.c.src"
source "../lib/libc/tanh.c.src"
source "../lib/libc/tgamma.c.src"
source "../lib/libc/time.c.src"
source "../lib/libc/trunc.c.src"
source "../lib/libc/ceil.src"
source "../lib/libc/clock.src"
source "../lib/libc/copysign.src"
source "../lib/libc/cos.src"
source "../lib/libc/cosh.src"
source "../lib/libc/div.src"
source "../lib/libc/exp.src"
source "../lib/libc/fabs.src"
source "../lib/libc/floor.src"
source "../lib/libc/fmod.src"
source "../lib/libc/frexp.src"
source "../lib/libc/getchar.src"
source "../lib/libc/isalnum.src"
source "../lib/libc/isalpha.src"
source "../lib/libc/isascii.src"
source "../lib/libc/iscntrl.src"
source "../lib/libc/isdigit.src"
source "../lib/libc/isfinitef.src"
source "../lib/libc/isgraph.src"
source "../lib/libc/isinff.src"
source "../lib/libc/islower.src"
source "../lib/libc/isnanf.src"
source "../lib/libc/isprint.src"
source "../lib/libc/ispunct.src"
source "../lib/libc/isspace.src"
source "../lib/libc/isupper.src"
source "../lib/libc/isxdigit.src"
source "../lib/libc/ldexp.src"
source "../lib/libc/log.src"
source "../lib/libc/log10.src"
source "../lib/libc/memset.src"
source "../lib/libc/modf.src"
source "../lib/libc/os.src"
source "../lib/libc/outchar.src"
source "../lib/libc/pow.src"
source "../lib/libc/printf.src"
source "../lib/libc/putchar.src"
source "../lib/libc/puts.src"
source "../lib/libc/rand.src"
source "../lib/libc/sin.src"
source "../lib/libc/sinh.src"
source "../lib/libc/sqrt.src"
source "../lib/libc/srand.src"
source "../lib/libc/strcasecmp.src"
source "../lib/libc/strdup.src"
source "../lib/libc/strndup.src"
source "../lib/libc/strnlen.src"
source "../lib/libc/strrchr.src"
source "../lib/libc/strtof.src"
source "../lib/libc/tan.src"
source "../lib/libc/tanh.src"
source "../lib/libc/tolower.src"
source "../lib/libc/toupper.src"
end if
if HAS_LIBCXX
source "../lib/libcxx/abort_message.cpp.src"
source "../lib/libcxx/exception.cpp.src"
source "../lib/libcxx/new.cpp.src"
source "../lib/libcxx/type_traits.cpp.src"
source "../lib/libcxx/typeinfo.cpp.src"
source "../lib/libcxx/utility.cpp.src"
source "../lib/libcxx/virtual.cpp.src"
end if