summaryrefslogtreecommitdiff
path: root/ld_script.txt
blob: d891908ca17edfb7d065dd00f0efcabfa62c14ae (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
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
ENTRY(Start)

gNumMusicPlayers = 4;
gMaxLines = 0;

SECTIONS {
    . = 0x2000000;

    ewram (NOLOAD) :
    ALIGN(4)
    {
        gHeap = .;

        . = 0x1C000;

<EWRAM>

        *libc.a:impure.o(.data);
        *libc.a:locale.o(.data);
        *libc.a:mallocr.o(.data);
        . = 0x40000;
    }

    . = 0x3000000;

    iwram (NOLOAD) :
    ALIGN(4)
    {
        /* .bss starts at 0x3000000 */
<BSS>

        /* .bss.code starts at 0x30028E0 */
        src/m4a.o(.bss.code);

        /* COMMON starts at 0x30030E0 */
<COMMON>

        *libc.a:sbrkr.o(COMMON);
        end = .;

        . = 0x8000;
    }

    . = 0x8000000;

    .text :
    ALIGN(4)
    {
        asm/crt0.o(.text);
        src/main.o(.text);
        src/gpu_regs.o(.text);
        src/dma3_manager.o(.text);
        src/bg.o(.text);
        src/malloc.o(.text);
        src/text_printer.o(.text);
        asm/text_printer.o(.text);
        src/window.o(.text);
        src/blit.o(.text);
        src/window_8bpp.o(.text);
        src/text.o(.text);
        src/sprite.o(.text);
        src/string_util.o(.text);
        asm/link.o(.text);
        src/multiboot.o(.text);
        asm/main_menu.o(.text);
        asm/battle_controllers.o(.text);
        src/decompress.o(.text);
        asm/battle_1.o(.text);
        asm/battle_2.o(.text);
        asm/battle_util.o(.text);
        asm/battle_script_commands.o(.text);
        asm/battle_util2.o(.text);
        asm/battle_controller_player.o(.text);
        asm/battle_gfx_sfx_util.o(.text);
        asm/battle_controller_opponent.o(.text);
        asm/battle_ai_switch_items.o(.text);
        asm/battle_controller_link_opponent.o(.text);
        src/pokemon.o(.text);
        src/trig.o(.text);
        src/random.o(.text);
        src/util.o(.text);
        src/blend_palette.o(.text);
        src/daycare.o(.text);
        asm/battle_interface.o(.text);
        asm/smokescreen.o(.text);
        asm/pokeball.o(.text);
        src/load_save.o(.text);
        asm/trade.o(.text);
        src/play_time.o(.text);
        asm/new_game.o(.text);
        asm/overworld.o(.text);
        src/fieldmap.o(.text);
        src/metatile_behavior.o(.text);
        asm/field_camera.o(.text);
        asm/field_door.o(.text);
        asm/field_player_avatar.o(.text);
        asm/field_map_obj.o(.text);
        asm/field_ground_effect.o(.text);
        asm/map_obj_80688E4.o(.text);
        asm/field_message_box.o(.text);
        src/map_obj_lock.o(.text);
        src/text_window_graphics.o(.text);
        src/script.o(.text);
        src/scrcmd.o(.text);
        asm/field_control_avatar.o(.text);
        asm/event_data.o(.text);
        src/coord_event_weather.o(.text);
        asm/field_tasks.o(.text);
        asm/start_menu.o(.text);
        asm/tileset_anims.o(.text);
        asm/palette.o(.text);
        src/sound.o(.text);
        asm/battle_anim.o(.text);
        asm/battle_anim_mons.o(.text);
        src/task.o(.text);
        asm/reshow_battle_screen.o(.text);
        asm/battle_anim_status_effects.o(.text);
        asm/title_screen.o(.text);
        src/reset_save_heap.o(.text);
        asm/field_weather.o(.text);
        asm/field_weather_effects.o(.text);
        asm/field_fadetransition.o(.text);
        asm/field_screen_effect.o(.text);
        asm/battle_setup.o(.text);
        asm/cable_club.o(.text);
        asm/trainer_see.o(.text);
        asm/wild_encounter.o(.text);
        asm/field_effect.o(.text);
        src/scanline_effect.o(.text);
        asm/option_menu.o(.text);
        asm/pokedex.o(.text);
        asm/trainer_card.o(.text);
        asm/pokemon_storage_system.o(.text);
        asm/pokemon_icon.o(.text);
        asm/script_movement.o(.text);
        asm/fldeff_cut.o(.text);
        src/mail_data.o(.text);
        asm/map_name_popup.o(.text);
        src/item_menu_icons.o(.text);
        src/battle_anim_mon_movement.o(.text);
        src/item.o(.text);
        asm/shop.o(.text);
        src/berry.o(.text);
        asm/script_menu.o(.text);
        asm/naming_screen.o(.text);
        src/money.o(.text);
        asm/script_pokemon_util_80A0058.o(.text);
        src/field_poison.o(.text);
        asm/pokemon_size_record.o(.text);
        asm/pc_screen_effect.o(.text);
        src/fldeff_poison.o(.text);
        src/fldeff_berrytree.o(.text);
        src/field_special_scene.o(.text);
        src/safari_zone.o(.text);
        src/item_use.o(.text);
        asm/battle_anim_effects_1.o(.text);
        asm/battle_anim_effects_2.o(.text);
        asm/water.o(.text);
        asm/fire.o(.text);
        asm/electric.o(.text);
        asm/ice.o(.text);
        asm/fighting.o(.text);
        asm/poison.o(.text);
        asm/flying.o(.text);
        asm/psychic.o(.text);
        asm/bug.o(.text);
        asm/rock.o(.text);
        asm/ghost.o(.text);
        asm/dragon.o(.text);
        asm/dark.o(.text);
        asm/ground.o(.text);
        asm/normal.o(.text);
        asm/battle_anim_utility_funcs.o(.text);
        asm/bike.o(.text);
        asm/easy_chat.o(.text);
        asm/mon_markings.o(.text);
        asm/mail.o(.text);
        src/menu_helpers.o(.text);
        asm/script_pokemon_util_80BF8FC.o(.text);
        src/heal_location.o(.text);
        asm/region_map.o(.text);
        src/battle_ai_script_commands.o(.text);
        src/fldeff_rocksmash.o(.text);
        src/fldeff_dig.o(.text);
        asm/fldeff_flash.o(.text);
        asm/post_battle_event_funcs.o(.text);
        src/prof_pc.o(.text);
        src/hof_pc.o(.text);
        asm/field_specials.o(.text);
        asm/battle_records.o(.text);
        asm/evolution_scene.o(.text);
        src/coins.o(.text);
        src/fldeff_strength.o(.text);
        asm/battle_transition.o(.text);
        asm/battle_controller_link_partner.o(.text);
        asm/battle_message.o(.text);
        src/math_util.o(.text);
        src/roulette_util.o(.text);
        src/cable_car_util.o(.text);
        src/save.o(.text);
        src/mystery_event_script.o(.text);
        asm/field_effect_helpers.o(.text);
        asm/battle_anim_sound_tasks.o(.text);
        asm/battle_controller_safari.o(.text);
        src/fldeff_sweetscent.o(.text);
        asm/battle_anim_effects_3.o(.text);
        asm/learn_move.o(.text);
        src/fldeff_softboiled.o(.text);
        asm/battle_tower.o(.text);
        asm/battle_controller_oak.o(.text);
        asm/player_pc.o(.text);
        src/intro.o(.text);
        asm/battle_anim_special.o(.text);
        asm/hall_of_fame.o(.text);
        asm/credits.o(.text);
        src/diploma.o(.text);
        asm/save_failed_screen.o(.text);
        asm/clear_save_data_screen.o(.text);
        asm/evolution_graphics.o(.text);
        src/fldeff_teleport.o(.text);
        src/new_menu_helpers.o(.text);
        asm/box_party_pokemon_dropdown.o(.text);
        asm/save_menu_util.o(.text);
        asm/map_preview_screen.o(.text);
        asm/link_rfu_2.o(.text);
        asm/link_rfu.o(.text);
        asm/pokedex_screen.o(.text);
        src/list_menu.o(.text);
        asm/item_menu.o(.text);
        src/save_location.o(.text);
        src/bag.o(.text);
        src/trainer_pokemon_sprites.o(.text);
        src/vs_seeker.o(.text);
        src/item_pc.o(.text);
        asm/mailbox_pc.o(.text);
        src/menu.o(.text);
        src/quest_log.o(.text);
        asm/link_rfu_3.o(.text);
        asm/pokemon_special_anim.o(.text);
        asm/party_menu.o(.text);
        asm/union_room_chat.o(.text);
        src/help_system_812B1E0.o(.text);
        src/quest_log_battle.o(.text);
        src/fame_checker.o(.text);
        src/menu2.o(.text);
        src/oak_speech.o(.text);
        src/tm_case.o(.text);
        src/menu_indicators.o(.text);
        asm/pokedex_area_markers.o(.text);
        asm/pokemon_summary_screen.o(.text);
        src/help_system.o(.text);
        asm/wild_pokemon_area.o(.text);
        src/dynamic_placeholder_text_util.o(.text);
        asm/berry_pouch.o(.text);
        asm/itemfinder.o(.text);
        src/buy_menu_helpers.o(.text);
        asm/slot_machine.o(.text);
        src/roamer.o(.text);
        src/mystery_gift_menu.o(.text);
        src/mevent.o(.text);
        src/mevent_server_helpers.o(.text);
        src/mevent_server.o(.text);
        src/mevent_8145654.o(.text);
        src/menews_jisan.o(.text);
        src/seagallop.o(.text);
        asm/pokemon_jump.o(.text);
        asm/pokemon_jump_2.o(.text);
        asm/berry_crush.o(.text);
        asm/berry_crush_2.o(.text);
        asm/berry_crush_3.o(.text);
        src/wireless_communication_status_screen.o(.text);
        src/braille_text.o(.text);
        src/text_window.o(.text);
        src/quest_log_8150454.o(.text);
        asm/dodrio_berry_picking.o(.text);
        asm/battle_controller_pokedude.o(.text);
        src/unk_8159F40.o(.text);
        src/dodrio_berry_picking_2.o(.text);
        asm/dodrio_berry_picking_2.o(.text);
        src/teachy_tv.o(.text);
        src/ereader_helpers.o(.text);
        src/unk_815C980.o(.text);
        src/ss_anne.o(.text);
        src/cereader_tool.o(.text);
        src/trainer_tower.o(.text);
        src/berry_powder.o(.text);
        src/unk_815F138.o(.text);
        src/berry_fix_program.o(.text);
    } =0

    script_data :
    ALIGN(4)
    {
        data/event_scripts.o(script_data);
        data/battle_anim_scripts.o(script_data);
        data/battle_scripts_1.o(script_data);
        data/field_effect_scripts.o(script_data);
        data/battle_scripts_2.o(script_data);
        data/battle_ai_scripts.o(script_data);
        data/mystery_event_script_cmd_table.o(script_data);
    } =0

    lib_text :
    ALIGN(4)
    {
        asm/libgcnmultiboot.o(.text);
        asm/m4a_1.o(.text);
        src/m4a.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);
        asm/librfu.o(.text);
        src/isagbprn.o(.text);
        asm/libagbsyscall.o(.text);
        *libgcc.a:_call_via_rX.o(.text);
        *libgcc.a:_divdi3.o(.text);
        *libgcc.a:_divsi3.o(.text);
        *libgcc.a:_dvmd_tls.o(.text);
        *libgcc.a:_fixunsdfsi.o(.text);
        *libgcc.a:_modsi3.o(.text);
        *libgcc.a:_muldi3.o(.text);
        *libgcc.a:_udivdi3.o(.text);
        *libgcc.a:_udivsi3.o(.text);
        *libgcc.a:_umodsi3.o(.text);
        *libgcc.a:dp-bit.o(.text);
        *libgcc.a:fp-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:strcmp.o(.text);
        *libc.a:strcpy.o(.text);
        *libc.a:impure.o(.text);
        *libc.a:vsprintf.o(.text);
        *libc.a:vfprintf.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:mtrim.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:strlen.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:libcfunc.o(.text);
        *libc.a:lseekr.o(.text);
        *libc.a:readr.o(.text);
    } =0

    .rodata :
    ALIGN(4)
    {
        src/main.o(.rodata);
        src/bg.o(.rodata);
        src/malloc.o(.rodata);
        src/malloc.o(.rodata.str1.4);
        src/text_printer.o(.rodata);
        src/window.o(.rodata);
        src/text.o(.rodata);
        src/sprite.o(.rodata);
        src/bg_regs.o(.rodata);
        src/string_util.o(.rodata);
        data/data.o(.rodata);
        src/pokemon.o(.rodata);
        src/trig.o(.rodata);
        src/util.o(.rodata);
        src/daycare.o(.rodata);
        data/data.o(.rodata.825EF0C);
        data/tilesets.o(.rodata);
        data/maps.o(.rodata);
        src/fieldmap.o(.rodata);
        src/metatile_behavior.o(.rodata);
        data/metatile_behavior.o(.rodata);
        data/field_door.o(.rodata);
        data/field_player_avatar.o(.rodata);
        data/field_map_obj.o(.rodata);
        data/field_ground_effect.o(.rodata);
        data/map_obj_80688E4.o(.rodata);
        src/scrcmd.o(.rodata);
        src/coord_event_weather.o(.rodata);
        data/field_tasks.o(.rodata);
        data/start_menu.o(.rodata);
        data/tileset_anims.o(.rodata);
        data/palette.o(.rodata);
        src/sound.o(.rodata);
        data/battle_anim.o(.rodata);
        data/map_events.o(.rodata);
        data/battle_anim_status_effects.o(.rodata);
        data/title_screen.o(.rodata);
        data/field_weather.o(.rodata);
        data/data_835B488.o(.rodata);
        src/item_menu_icons.o(.rodata);
        src/battle_anim_mon_movement.o(.rodata);
        src/item.o(.rodata);
        data/data_835B488.o(.rodata.83DF09C);
        src/heal_location.o(.rodata);
        data/data_835B488.o(.rodata.83EEC98);
        src/battle_ai_script_commands.o(.rodata);
        data/data_83F5738.o(.rodata);
        src/save.o(.rodata);
        data/data_83FECCC.o(.rodata);
		src/intro.o(.rodata);
        data/data_83FECCC.o(.rodata.battle_anim_special);
        src/diploma.o(.rodata);
        data/strings.o(.rodata);
        data/data_83FECCC.o(.rodata.841EE44);
        src/new_menu_helpers.o(.rodata);
        data/data_83FECCC.o(.rodata.841F4B4);
        src/list_menu.o(.rodata);
        data/data_83FECCC.o(.rodata.8452CF4);
        src/save_location.o(.rodata);
        src/bag.o(.rodata);
        src/trainer_pokemon_sprites.o(.rodata);
        src/vs_seeker.o(.rodata);
        src/item_pc.o(.rodata);
        data/data_83FECCC.o(.rodata.8453F6C);
        src/menu.o(.rodata);
        src/quest_log.o(.rodata);
        data/data_83FECCC.o(.rodata.8456C74);
        src/help_system_812B1E0.o(.rodata);
        src/fame_checker.o(.rodata);
        src/menu2.o(.rodata);
        src/oak_speech.o(.rodata);
        src/tm_case.o(.rodata);
        src/menu_indicators.o(.rodata);
        data/pokedex_area_markers.o(.rodata);
        data/pokemon_summary_screen.o(.rodata);
        src/help_system.o(.rodata);
        data/wild_pokemon_area.o(.rodata);
        src/dynamic_placeholder_text_util.o(.rodata);
        data/berry_pouch.o(.rodata);
        data/itemfinder.o(.rodata);
        src/buy_menu_helpers.o(.rodata);
        data/slot_machine.o(.rodata);
        src/roamer.o(.rodata);
        src/mystery_gift_menu.o(.rodata);
        src/mevent.o(.rodata);
        src/mevent_server_helpers.o(.rodata);
        src/mevent_server.o(.rodata);
        src/mevent_8145654.o(.rodata);
        data/data_8466FB8.o(.rodata);
        src/menews_jisan.o(.rodata);
        src/menews_jisan.o(.rodata.str1.4);
        . = ALIGN(4);
        src/seagallop.o(.rodata);
        data/data_8468C98.o(.rodata);
        src/wireless_communication_status_screen.o(.rodata);
        src/braille_text.o(.rodata);
        src/text_window_graphics.o(.rodata);
        src/quest_log_8150454.o(.rodata);
        data/data_8471F00.o(.rodata);
        src/teachy_tv.o(.rodata);
        src/unk_815C980.o(.rodata);
        data/data_8471F00.o(.rodata.8479668);
        src/ss_anne.o(.rodata);
        src/cereader_tool.o(.rodata);
        src/trainer_tower.o(.rodata);
        src/unk_815F138.o(.rodata);
        src/berry_fix_program.o(.rodata);
        data/data_8471F00.o(.rodata.after_trainer_tower);
        src/mystery_event_msg.o(.rodata);
        data/mystery_event_msg.o(.rodata);
        src/m4a_tables.o(.rodata);
        data/sound_data.o(.rodata);
    } =0

    lib_rodata :
    ALIGN(4)
    {
        src/agb_flash.o(.rodata);
        src/agb_flash_1m.o(.rodata);
        src/agb_flash_mx.o(.rodata);
        src/agb_flash_le.o(.rodata);
        data/librfu_rodata.o(.rodata);
        src/isagbprn.o(.rodata);
        *libgcc.a:_divdi3.o(.rodata);
        *libgcc.a:_udivdi3.o(.rodata);
        *libc.a:memcpy.o(.rodata);
        *libc.a:memset.o(.rodata);
        *libc.a:strcmp.o(.rodata);
        *libc.a:strcpy.o(.rodata);
        *libc.a:impure.o(.rodata);
        *libc.a:vsprintf.o(.rodata);
        *libc.a:vfprintf.o(.rodata);
        *libc.a:wsetup.o(.rodata);
        *libc.a:dtoa.o(.rodata);
        *libc.a:fflush.o(.rodata);
        *libc.a:findfp.o(.rodata);
        *libc.a:freer.o(.rodata);
        *libc.a:mtrim.o(.rodata);
        *libc.a:fvwrite.o(.rodata);
        *libc.a:fwalk.o(.rodata);
        *libc.a:locale.o(.rodata);
        *libc.a:makebuf.o(.rodata);
        *libc.a:mallocr.o(.rodata);
        *libc.a:mbtowc_r.o(.rodata);
        *libc.a:memchr.o(.rodata);
        *libc.a:memmove.o(.rodata);
        *libc.a:mlock.o(.rodata);
        *libc.a:mprec.o(.rodata);
        *libc.a:s_isinf.o(.rodata);
        *libc.a:s_isnan.o(.rodata);
        *libc.a:sbrkr.o(.rodata);
        *libc.a:stdio.o(.rodata);
        *libc.a:strlen.o(.rodata);
        *libc.a:syscalls.o(.rodata);
        *libc.a:writer.o(.rodata);
        *libc.a:callocr.o(.rodata);
        *libc.a:closer.o(.rodata);
        *libc.a:errno.o(.rodata);
        *libc.a:fstatr.o(.rodata);
        *libc.a:libcfunc.o(.rodata);
        *libc.a:lseekr.o(.rodata);
        *libc.a:readr.o(.rodata);

        . = ALIGN(4);
    } =0

    other_data :
    ALIGN(4)
    {
        data/unknown_serial_data.o(.rodata);
        data/multiboot_berry_glitch_fix.o(.rodata);
        data/multiboot_pokemon_colosseum.o(.rodata);
    } =0

	. = 0x08D00000;
    gfx_data :
    ALIGN(4)
    {
        data/graphics.o(gfx_data);
    } =0

    /* 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/ :
    {
        *(*);
    }
}