summaryrefslogtreecommitdiff
path: root/ld_script.txt
blob: a03b217c85a931847a927bc6a2c0cc9dfbe655aa (plain)
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
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
ENTRY(Start)

gNumMusicPlayers = 8;
gMaxLines = 0;

SECTIONS {
    . = 0x2000000;

    ewram (NOLOAD) :
    ALIGN(4)
    {
        ewram_start = .;
        INCLUDE "sym_ewram.txt"
        src/agb_flash.o(.bss);
        *libgcc.a:fp-bit.o(.bss);
        *libgcc.a:dp-bit.o(.bss);
        *libc.a:syscalls.o(.bss);
        . = ALIGN(16);
        INCLUDE "sym_ewram2.txt"
        *libc.a:impure.o(.data);
        *libc.a:locale.o(.data);
        *libc.a:mallocr.o(.data);
        gUnknown_203BC04 = .;
        . = 0x40000;
    }

    . = 0x3000000;

    iwram (NOLOAD) :
    ALIGN(4)
    {
        iwram_start = .;
        INCLUDE "sym_iwram.txt"
        . = 0x8000;
    }

    . = 0x8000000;

    .text :
    ALIGN(4)
    {
        asm/crt0.o(.text);
        src/code_80001DC.o(.text);
        asm/arm_func.o(.text);
        src/code_2.o(.text);
        asm/code_2.o(.text);
        src/code.o(.text);
        asm/event_flag.o(.text);
        src/event_flag.o(.text);
        asm/code_8002774.o(.text);
        src/memory.o(.text);
        asm/memory.o(.text);
        src/memory_mid.o(.text);
        asm/memory_1.o(.text);
        src/memory1.o(.text);
        asm/code_80035F0.o(.text);
        src/other_random.o(.text);
        src/util.o(.text);
        src/bg_palette_buffer.o(.text);
        src/input.o(.text);
        asm/code_8004AA0.o(.text);
        src/sprite.o(.text);
        asm/sprite.o(.text);
        asm/code_800558C.o(.text);
        src/code_800558C.o(.text);
        src/random.o(.text);
        src/text.o(.text);
        src/text_1.o(.text);
        asm/text.o(.text);
        src/code_8009804.o(.text);
        asm/code_8009804.o(.text);
        src/file_system.o(.text);
        src/main.o(.text);
        asm/code_800B5F0.o(.text);
        src/music_pre.o(.text);
        asm/music.o(.text);
        src/music.o(.text);
        src/code_800C9CC.o(.text);
        src/cpu.o(.text);
        src/flash.o(.text);
        src/code_800D090.o(.text);
        asm/code_800D090.o(.text);
        src/code_80118A4.o(.text);
        src/debug.o(.text);
        src/save.o(.text);
        src/code_8012A18.o(.text);
        src/more_input.o(.text);
        asm/code_8012A18.o(.text);
        src/code_8012A18_1.o(.text);
        src/felicity_bank.o(.text);
        asm/felicity_bank.o(.text);
        src/felicity_bank_1.o(.text);
        src/kangaskhan_storage.o(.text);
        asm/kangaskhan_storage.o(.text);
        src/kangaskhan_storage_1.o(.text);
        asm/kangaskhan_storage_1.o(.text);
        src/kangaskhan_storage_2.o(.text);
        asm/kangaskhan_storage_2.o(.text);
        src/kangaskhan_storage_3.o(.text);
        src/kecleon_items.o(.text);
        asm/kecleon_items.o(.text);
        src/kecleon_items_1.o(.text);
        asm/kecleon_items_1.o(.text);
        src/kecleon_items_2.o(.text);
        src/code_801AFA4.o(.text);
        src/code_801B3C0.o(.text);
        asm/code_801B3C0.o(.text);
        src/code_801C620.o(.text);
        asm/code_801C620.o(.text);
        src/code_801D760.o(.text);
        asm/code_801D760.o(.text);
        src/code_801DCC4.o(.text);
        asm/code_801DCC4.o(.text);
        src/hints_menu.o(.text);
        src/gulpin_shop.o(.text);
        asm/gulpin_shop.o(.text);
        src/gulpin_shop_1.o(.text);
        asm/code_801EE10.o(.text);
        src/luminous_cave.o(.text);
        asm/friend_list_menu.o(.text);
        src/friend_list_menu.o(.text);
        src/friend_area_action_menu.o(.text);
        asm/friend_area_action_menu.o(.text);
        src/friend_area_action_menu_1.o(.text);
        src/wonder_mail.o(.text);
        src/thank_you_wonder_mail.o(.text);
        src/wonder_mail_2.o(.text);
        asm/wonder_mail_2.o(.text);
        src/wonder_mail_3.o(.text);
        asm/wonder_mail_3.o(.text);
        src/wonder_mail_802DF88.o(.text);
        src/mailbox.o(.text);
        asm/mailbox.o(.text);
        src/mailbox_1.o(.text);
        src/pelipper_board.o(.text);
        asm/pelipper_board.o(.text);
        src/pelipper_board_1.o(.text);
        src/wonder_mail_3_mid.o(.text);
        asm/wonder_mail_3_mid.o(.text);
        src/wonder_mail_3_1.o(.text);
        src/makuhita_dojo.o(.text);
        asm/makuhita_dojo.o(.text);
        src/wonder_mail_4.o(.text);
        asm/wonder_mail_4.o(.text);
        src/post_office_guide.o(.text);
        asm/wonder_mail_5.o(.text);
        src/adventure_log.o(.text);
        src/friend_rescue.o(.text);
        asm/friend_rescue.o(.text);
        src/friend_rescue_1.o(.text);
        asm/credits.o(.text);
        src/credits.o(.text);
        src/main_menu.o(.text);
        src/trade_items_menu.o(.text);
        src/other_menus.o(.text);
        asm/other_menus.o(.text);
        src/adventure_log_menu.o(.text);
        src/unk_menu_203B360.o(.text);
        asm/unk_menu_203B360.o(.text);
        src/unk_menu_203B360_1.o(.text);
        src/unk_menu_203B364.o(.text);
        asm/unk_menu_203B364.o(.text);
        src/rescue_password_menu.o(.text);
        asm/rescue_password_menu.o(.text);
        src/rescue_password_menu_1.o(.text);
        src/load_screen.o(.text);
        src/wonder_mail_main_menu.o(.text);
        src/ds_menus.o(.text);
        src/debug_menu.o(.text);
        asm/debug_menu.o(.text);
        src/debug_menu_mid.o(.text);
        asm/debug_menu_1.o(.text);
        src/debug_menu_2.o(.text);
        asm/debug_menu_2.o(.text);
        src/debug_menu_1.o(.text);
        asm/code_803B050.o(.text);
        src/pokemon_mail.o(.text);
        src/code_803C1B4.o(.text);
        asm/code_803C1D0.o(.text);
        src/personality_test.o(.text);
        src/code_803D0D8.o(.text);
        asm/code_803D110.o(.text);
        src/code_8040094.o(.text);
        asm/code_8040094.o(.text);
        src/code_8041AD0.o(.text);
        asm/code_8041AD0.o(.text);
        src/code_80428A0.o(.text);
        asm/code_80428A0.o(.text);
        src/dungeon_engine.o(.text);
        asm/code_8044210.o(.text);
        src/dungeon_action.o(.text);
        asm/code_8044CC8.o(.text);
        src/dungeon_util.o(.text);
        asm/code_80450F8.o(.text);
        src/dungeon_visibility.o(.text);
        asm/code_8045A00.o(.text);
        src/dungeon_items.o(.text);
        asm/code_8046CE4.o(.text);
        src/code_8048480.o(.text);
        asm/code_8048480.o(.text);
        src/dungeon_ai_item_weight.o(.text);
        src/dungeon_map_access.o(.text);
        asm/code_80495E4.o(.text);
        src/code_80521D0.o(.text);
        asm/code_80521D0.o(.text);
        src/charge_move.o(.text);
        asm/code_8057144.o(.text);
        src/code_8057824.o(.text);
        asm/code_8057824.o(.text);
        src/status_checker.o(.text);
        asm/code_805CEB8.o(.text);
        src/targeting.o(.text);
        asm/code_8069E0C.o(.text);
        src/code_806CD90.o(.text);
        asm/code_806CD90.o(.text);
        src/status_checks.o(.text);
        asm/code_80701A4.o(.text);
        src/dungeon_movement.o(.text);
        asm/code_807034C.o(.text);
        src/status_checks_1.o(.text);
        asm/code_8070B48.o(.text);
        src/dungeon_capabilities.o(.text);
        asm/code_8070BC0.o(.text);
        src/dungeon_capabilities_1.o(.text);
        asm/code_8070E3C.o(.text);
        src/dungeon_ai.o(.text);
        asm/code_8071518.o(.text);
        src/dungeon_ai_1.o(.text);
        asm/code_807167C.o(.text);
        src/dungeon_pokemon_attributes.o(.text);
        asm/code_80718D8.o(.text);
        src/dungeon_ai_items.o(.text);
        asm/code_8073CF0.o(.text);
        src/dungeon_ai_movement.o(.text);
        asm/code_8075BA4.o(.text);
        src/dungeon_ai_attack.o(.text);
        asm/code_807C4A0.o(.text);
        src/dungeon_ai_attack_1.o(.text);
        asm/code_807CABC.o(.text);
        src/targeting_flags.o(.text);
        asm/code_807CD9C.o(.text);
        src/dungeon_range.o(.text);
        asm/code_808333C.o(.text);
        src/dungeon_random.o(.text);
        asm/code_808411C.o(.text);
        src/dungeon_random_1.o(.text);
        asm/code_808417C.o(.text);
        src/code_80848F0.o(.text);
        asm/code_80848F0.o(.text);
        src/dungeon_util_1.o(.text);
        asm/code_8085B0C.o(.text);
        src/code_80869E4.o(.text);
        asm/code_80869E4.o(.text);
        src/code_8086A3C.o(.text);
        asm/code_8086A3C.o(.text);
        src/code_8057824_1.o(.text);
        asm/jirachi_wish.o(.text);
        src/code_80521D0_1.o(.text);
        src/pokemon.o(.text);
        asm/pokemon.o(.text);
        src/pokemon_mid.o(.text);
        asm/pokemon_2.o(.text);
        src/pokemon_3.o(.text);
        asm/pokemon_3.o(.text);
        src/dungeon.o(.text);
        asm/code_809017C.o(.text);
        src/code_8090208.o(.text);
        asm/code_8090208.o(.text);
        src/items.o(.text);
        src/rescue_team_info.o(.text);
        src/text_util.o(.text);
        src/friend_area.o(.text);
        asm/friend_area_1.o(.text);
        src/friend_area_1.o(.text);
        src/moves.o(.text);
        asm/moves_1.o(.text);
        src/moves_1.o(.text);
        asm/code_8094148.o(.text);
        src/number_util.o(.text);
        asm/code_809447C.o(.text);
        src/code_8092334.o(.text);
        src/game_options.o(.text);
        asm/code_8094D28.o(.text);
        src/play_time.o(.text);
        src/code_8094F88.o(.text);
        asm/code_8095014.o(.text);
        src/code_80958E8.o(.text);
        asm/code_80958E8.o(.text);
        src/code_809747C.o(.text);
        asm/code_809747C.o(.text);
        src/code_809747C_1.o(.text);
        src/code_8097670.o(.text);
        asm/code_8097670.o(.text);
        src/code_8097F40.o(.text);
        src/exclusive_pokemon.o(.text);
        asm/exclusive_pokemon.o(.text);
        src/exclusive_pokemon_1.o(.text);
        src/position_util.o(.text);
        asm/code_8098468.o(.text);
        src/code_8098BDC.o(.text);
        asm/code_8098BDC.o(.text);
        src/code_809D148.o(.text);
        asm/code_809D148.o(.text);
        asm/ground_script.o(.text);
        src/code_80A26CC.o(.text);
        asm/code_80A26CC.o(.text);
        src/ground_map.o(.text);
        asm/ground_map.o(.text);
        asm/ground_sprite.o(.text);
        src/code_80A7714.o(.text);
        asm/ground_lives.o(.text);
        asm/ground_object.o(.text);
        asm/ground_effect.o(.text);
        src/ground_link.o(.text);
        asm/ground_link.o(.text);
        asm/ground_event.o(.text);
        asm/m4a_1.o(.text);
        src/m4a.o(.text);
        *libagbsyscall.a:CpuSet.o(.text);
        *libagbsyscall.a:SoundBiasReset.o(.text);
        *libagbsyscall.a:SoundBiasSet.o(.text);
        *libagbsyscall.a:VBlankIntrWait.o(.text);
        src/agb_flash.o(.text);
        src/agb_flash_1m.o(.text);
        src/agb_flash_mx.o(.text);
        src/agb_flash_le.o(.text);
        *libgcc.a:_call_via_rX.o(.text);
        *libgcc.a:_divsi3.o(.text);
        *libgcc.a:_dvmd_tls.o(.text);
        *libgcc.a:_fixunssfsi.o(.text);
        *libgcc.a:_modsi3.o(.text);
        *libgcc.a:_umodsi3.o(.text);
        *libgcc.a:fp-bit.o(.text);
        *libgcc.a:_muldi3.o(.text);
        *libgcc.a:dp-bit.o(.text);
        *libgcc.a:_lshrdi3.o(.text);
        *libgcc.a:_negdi2.o(.text);
        *libc.a:memcpy.o(.text);
        *libc.a:memset.o(.text);
        *libc.a:sprintf.o(.text);
        *libc.a:strcat.o(.text);
        *libc.a:strcmp.o(.text);
        *libc.a:strcpy.o(.text);
        *libc.a:strlen.o(.text);
        *libc.a:strncpy.o(.text);
        *libc.a:vfprintf.o(.text);
        *libc.a:vsprintf.o(.text);
        *libc.a:wsetup.o(.text);
        *libc.a:dtoa.o(.text);
        *libc.a:fflush.o(.text);
        *libc.a:findfp.o(.text);
        *libc.a:freer.o(.text);
        *libc.a:fvwrite.o(.text);
        *libc.a:fwalk.o(.text);
        *libc.a:locale.o(.text);
        *libc.a:makebuf.o(.text);
        *libc.a:mallocr.o(.text);
        *libc.a:mbtowc_r.o(.text);
        *libc.a:memchr.o(.text);
        *libc.a:memmove.o(.text);
        *libc.a:mlock.o(.text);
        *libc.a:mprec.o(.text);
        *libc.a:s_isinf.o(.text);
        *libc.a:s_isnan.o(.text);
        *libc.a:sbrkr.o(.text);
        *libc.a:stdio.o(.text);
        *libc.a:syscalls.o(.text);
        *libc.a:writer.o(.text);
        *libc.a:callocr.o(.text);
        *libc.a:closer.o(.text);
        *libc.a:errno.o(.text);
        *libc.a:fstatr.o(.text);
        *libc.a:abort.o(.text);
        *libc.a:libcfunc.o(.text);
        *libc.a:lseekr.o(.text);
        *libc.a:readr.o(.text);
        *libgcc.a:_udivsi3.o(.text);
    } =0

    .rodata :
    ALIGN(4)
    {
        data/data.o(.rodata);
        src/file_system.o(.rodata);
        data/data_80B9BB8.o(.rodata);
        src/debug.o(.rodata);
        src/save.o(.rodata);
        data/data_80D47B8.o(.rodata);
        src/wonder_mail.o(.rodata);
        src/thank_you_wonder_mail.o(.rodata);
        src/wonder_mail_2.o(.rodata);
        data/data_80DED44.o(.rodata);
        src/post_office_guide.o(.rodata);
        data/data_80E1F30.o(.rodata);
        src/adventure_log.o(.rodata);
        data/data_80E2068.o(.rodata);
        src/main_menu.o(.rodata);
        data/data_80E59A8.o(.rodata);
        src/load_screen.o(.rodata);
        src/wonder_mail_main_menu.o(.rodata);
        src/debug_menu.o(.rodata);
        data/data_80E7D40.o(.rodata);
        src/pokemon_mail.o(.rodata);
        data/personality_test.o(.rodata);
        src/personality_test.o(.rodata);
        data/data_80F4278.o(.rodata);
        src/dungeon_util.o(.rodata);
        data/data_80F4468.o(.rodata);
        src/status_checks.o(.rodata);
        data/data_80F4DB4.o(.rodata);
        src/dungeon_ai_attack.o(.rodata);
        data/data_80F4E2C.o(.rodata);
        src/status_checker.o(.rodata);
        data/data_80F5668.o(.rodata);
        src/dungeon_pokemon_attributes.o(.rodata);
        data/data_80F59C8.o(.rodata);
        src/charge_move.o(.rodata);
        data/data_8106A4C.o(.rodata);
        src/dungeon_capabilities_1.o(.rodata);
        data/data_8106FB5.o(.rodata);
        src/dungeon_ai_1.o(.rodata);
        data/data_8107010.o(.rodata);
        src/friend_area.o(.rodata);
        data/data_810AC60.o(.rodata);
        src/exclusive_pokemon.o(.rodata);
        src/rescue_team_info.o(.rodata);
        src/text_util.o(.rodata);
        data/data_810AE24.o(.rodata);
        src/position_util.o(.rodata);
        data/data_8115EB8.o(.rodata);
        data/friend_area_dialogue.o(.rodata);
        data/cutscenes.o(.rodata);
        data/cutscenes_1.o(.rodata);
        src/m4a_tables.o(.rodata);
        src/agb_flash.o(.rodata);
        src/agb_flash_1m.o(.rodata);
        src/agb_flash_mx.o(.rodata);
        src/agb_flash_le.o(.rodata);
        *libc.a:sprintf.o(.rodata);
        *libc.a:vfprintf.o(.rodata);
        *libc.a:dtoa.o(.rodata);
        *libc.a:impure.o(.rodata);
        *libc.a:locale.o(.rodata);
        *libc.a:mprec.o(.rodata);
        *libc.a:syscalls.o(.rodata);
        . = ALIGN(4);
        data/data_8270000.o(.rodata);
    } =0

    unk_code_section :
    ALIGN(4)
    {
        unk_code = .;
        asm/code_8272724.o(.rodata);
        src/code_8272724.o(.text);
        asm/code_8272724.o(.text);
        unk_code_end = .;
    }

    unk_code_section_size = (unk_code_end - unk_code);
    unk_code_ram_end = unk_code_ram + unk_code_section_size;
    end = unk_code_ram_end;

    . = 0x8300000;
    unk_data :
    ALIGN(4)
    {
        data/unk_data.o(.rodata);
    }

    . = 0x8300500;
    system_sbin_section :
    ALIGN(4)
    {
        data/system_sbin.o(.rodata);
    }

    . = 0x8380000;
    titlemenu_sbin_section :
    ALIGN(4)
    {
        data/titlemenu_sbin.o(.rodata);
    }

    . = 0x83B0000;
    dungeon_sbin_section :
    ALIGN(4)
    {
        data/dungeon_sbin.o(.rodata);
    }

    . = 0x8510000;
    monster_sbin_section :
    ALIGN(4)
    {
        data/monster_sbin.o(.rodata);
    }

    . = 0x9740000;
    effect_sbin_section :
    ALIGN(4)
    {
        data/effect_sbin.o(.rodata);
    }

    . = 0x9890000;
    ground_sbin_section :
    ALIGN(4)
    {
        data/ground_sbin.o(.rodata);
    }

    . = 0x9E60000;
    ornament_sbin_section :
    ALIGN(4)
    {
        data/ornament_sbin.o(.rodata);
    }

    sound_data :
    ALIGN(4)
    {
        data/sound_data.o(.rodata);
    }

    /* DWARF 2 sections */
    .debug_aranges  0 : { *(.debug_aranges) }
    .debug_pubnames 0 : { *(.debug_pubnames) }
    .debug_info     0 : { *(.debug_info) }
    .debug_abbrev   0 : { *(.debug_abbrev) }
    .debug_line     0 : { *(.debug_line) }
    .debug_frame    0 : { *(.debug_frame) }
    .debug_str      0 : { *(.debug_str) }
    .debug_loc      0 : { *(.debug_loc) }
    .debug_macinfo  0 : { *(.debug_macinfo) }

    /* Discard everything not specifically mentioned above. */
    /DISCARD/ :
    {
        *(*);
    }
}