katam/linker.ld
2023-07-04 11:15:25 +03:00

535 lines
19 KiB
Plaintext

gNumMusicPlayers = 4;
gMaxLines = 0;
ENTRY(__start)
MEMORY {
ewram (w!x) : ORIGIN = 0x02000000, LENGTH = 256K
iwram (w!x) : ORIGIN = 0x03000000, LENGTH = 32K
rom (rx) : ORIGIN = 0x08000000, LENGTH = 32M
}
SECTIONS {
ewram (NOLOAD) : ALIGN(4) {
gEwramHeap = 0;
. = 0x00020EE0; gKirbys = .;
. = 0x00021580; gUnk_02021580 = .;
. = 0x00021590; gUnk_02021590 = .;
. = 0x00022120; gUnk_02022120 = .;
. = 0x00022320; gUnk_02022320 = .;
. = 0x00022520; gUnk_02022520 = .;
. = 0x00022920; gUnk_02022920 = .;
. = 0x00022930; gUnk_02022930 = .;
. = 0x000229D0; gUnk_020229D0 = .;
. = 0x000229D4; gUnk_020229D4 = .;
. = 0x000229D8; gUnk_020229D8 = .;
. = 0x000229E0; gUnk_020229E0 = .;
. = 0x00022E60; gUnk_02022E60 = .;
. = 0x00022E70; gUnk_02022E70 = .;
. = 0x00022E80; gUnk_02022E80 = .;
. = 0x00022EA0; gUnk_02022EA0 = .;
. = 0x00022EB0; gUnk_02022EB0 = .;
. = 0x00022EC0; gUnk_02022EC0 = .;
. = 0x00022F40; gUnk_02022F40 = .;
. = 0x00022F50; gUnk_02022F50 = .;
. = 0x00023350; gUnk_02023350 = .;
. = 0x00023354; gUnk_02023354 = .;
. = 0x00023358; gUnk_02023358 = .;
. = 0x00023368; gUnk_02023368 = .;
. = 0x00023388; gUnk_02023388 = .;
. = 0x00023488; gUnk_02023488 = .;
. = 0x00023508; gUnk_02023508 = .;
. = 0x00023510; gUnk_02023510 = .;
. = 0x00023518; gUnk_02023518 = .;
. = 0x00023520; gUnk_02023520 = .;
. = 0x00023530; gCurLevelInfo = .;
. = 0x00024ED0; gUnk_02024ED0 = .;
. = 0x00026D50; gUnk_02026D50 = .;
. = 0x00026D60; gUnk_02026D60 = .;
. = 0x00028BF0; gUnk_02028BF0 = .;
. = 0x00028C10; gUnk_02028C10 = .;
. = 0x00028CA0; gUnk_02028CA0 = .;
. = 0x00028EE0; gUnk_02028EE0 = .;
. = 0x000382A0; gUnk_020382A0 = .;
. = 0x000382C8; gUnk_020382C8 = .;
. = 0x000382D0; gUnk_020382D0 = .;
. = 0x00038580; gUnk_02038580 = .;
. = 0x00038590; gUnk_02038590 = .;
. = 0x00038960; gUnk_02038960 = .;
. = 0x00038990; gUnk_02038990 = .;
. = 0x0003A9A0; gUnk_0203A9A0 = .;
. = 0x0003A9B0; gUnk_0203A9B0 = .;
. = 0x0003ACB0; gUnk_0203ACB0 = .;
. = 0x0003ACC0; gUnk_0203ACC0 = .;
. = 0x0003ACD4; gUnk_0203ACD4 = .;
. = 0x0003ACE8; gUnk_0203ACE8 = .;
. = 0x0003ACFC; gUnk_0203ACFC = .;
. = 0x0003AD10; gUnk_0203AD10 = .;
. = 0x0003AD14; gUnk_0203AD14 = .;
. = 0x0003AD18; gUnk_0203AD18 = .;
. = 0x0003AD1C; gUnk_0203AD1C = .;
. = 0x0003AD20; gUnk_0203AD20 = .;
. = 0x0003AD24; gUnk_0203AD24 = .;
. = 0x0003AD2C; gUnk_0203AD2C = .;
. = 0x0003AD30; gUnk_0203AD30 = .;
. = 0x0003AD34; gUnk_0203AD34 = .;
. = 0x0003AD38; gUnk_0203AD38 = .;
. = 0x0003AD3C; gUnk_0203AD3C = .;
. = 0x0003AD40; gUnk_0203AD40 = .;
. = 0x0003AD44; gUnk_0203AD44 = .;
. = 0x0003AD48; gUnk_0203AD48 = .;
. = 0x0003AD4C; gUnk_0203AD4C = .;
. = 0x0003AD50; gUnk_0203AD50 = .;
. = 0x0003ADE0; gUnk_0203ADE0 = .;
. = 0x0003ADE4; ewram_end = .;
. = 0x00040000;
} >ewram
iwram (NOLOAD) : ALIGN(4) {
. = 0x00000000; gUnk_03000000 = .;
. = 0x00000004; gUnk_03000004 = .;
. = 0x00000008; gUnk_03000008 = .;
. = 0x0000000C; gUnk_0300000C = .;
. = 0x00000010; gUnk_03000010 = .;
. = 0x00000014; src/multi_boot.o(.bss);
. = ALIGN(16); gUnk_03000020 = .;
. = 0x0000002C; gUnk_0300002C = .;
. = 0x00000030; gUnk_03000030 = .;
. = 0x00000034; gUnk_03000034 = .;
. = 0x00000038; *libgcc.a:dp-bit.o(.bss);
. = ALIGN(4); *libgcc.a:fp-bit.o(.bss);
. = ALIGN(4); src/m4a.o(.bss*);
. = 0x00000470; gTimer3IntrBkp = .;
. = 0x00000478; gMultiBootDataRecv = .;
. = 0x00000480; gUnk_03000480 = .;
. = 0x00000484; gMultiSioIntrBkp = .;
. = 0x00000490; gMultiBootStruct = .;
. = 0x000004C0; gMultiBootParam = .;
. = 0x0000050C; gUnk_0300050C = .;
. = 0x00000510; gUnk_03000510 = .;
. = 0x00000518; gUnk_03000518 = .;
. = 0x0000051C; gUnk_0300051C = .;
. = 0x00000524; gUnk_03000524 = .;
. = 0x00000530; gUnk_03000530 = .;
. = 0x00000554; gUnk_03000554 = .;
. = 0x00000558; gUnk_03000558 = .;
. = 0x00000560; src/m4a.o(common_data);
. = ALIGN(16); gIntrTable = .;
. = 0x000017F0; gIntrMainBuf = .;
. = 0x000019F0; gTasks = .;
. = 0x000023F0; gUnk_030023F0 = .;
. = 0x000023F4; gUnk_030023F4 = .;
. = 0x00002400; gUnk_03002400 = .;
. = 0x00002440; gMainFlags = .;
. = 0x00002450; gUnk_03002450 = .;
. = 0x00002470; gUnk_03002470 = .;
. = 0x00002480; gUnk_03002480 = .;
. = 0x00002484; gUnk_03002484 = .;
. = 0x00002488; gVramHeapMaxTileSlots = .;
. = 0x0000248C; gNumHBlankCallbacks = .;
. = 0x00002490; gMultiSioRecv = .;
. = 0x000024E0; gUnk_030024E0 = .;
. = 0x000024E4; gNumHBlankIntrs = .;
. = 0x000024E8; gBldRegs = .;
. = 0x000024F0; gUnk_030024F0 = .;
. = 0x00002500; gEmptyTask = .;
. = 0x00002514; gUnk_03002514 = .;
. = 0x00002520; gBgAffineRegs = .;
. = 0x00002540; gVramHeapStartAddr = .;
. = 0x00002544; gUnk_03002544 = .;
. = 0x00002548; gUnk_03002548 = .;
. = 0x0000254C; gUnk_0300254C = .;
. = 0x00002550; gUnk_03002550 = .;
. = 0x00002554; gMultiSioStatusFlags = .;
. = 0x00002558; gUnk_03002558 = .;
. = 0x00002560; gTaskPtrs = .;
. = 0x00002760; gUnk_03002760 = .;
. = 0x00002C60; gObjPalette = .;
. = 0x00002E20; gUnk_03002E20 = .;
. = 0x00002E40; gUnk_03002E40 = .;
. = 0x00002E60; gUnk_03002E60 = .;
. = 0x00002E64; gFrameCount = .;
. = 0x00002E70; gWinRegs = .;
. = 0x00002E7C; gNumTasks = .;
. = 0x00002E80; gUnk_03002E80 = .;
. = 0x00002E82; gUnk_03002E82 = .;
. = 0x00002E83; gUnk_03002E83 = .;
. = 0x00002E90; gInput = .;
. = 0x00002E94; gUnk_03002E94 = .;
. = 0x00002E98; gNextTaskToCheckForDestruction = .;
. = 0x00002EA0; gRepeatedKeysTestCounter = .;
. = 0x00002EAC; gUnk_03002EAC = .;
. = 0x00002EB0; gBgCntRegs = .;
. = 0x00002EB8; gRepeatedKeys = .;
. = 0x00002EBC; gNextTask = .;
. = 0x00002EC0; gUnk_03002EC0 = .;
. = 0x000031B8; gUnk_030031B8 = .;
. = 0x000031C0; gUnk_030031C0 = .;
. = 0x000035C0; gHBlankCallbacks = .;
. = 0x000035D0; gCurTask = .;
. = 0x000035D4; gUnk_030035D4 = .;
. = 0x000035E0; gKeysFirstRepeatIntervals = .;
. = 0x000035EC; gReleasedKeys = .;
. = 0x000035F0; gUnk_030035F0 = .;
. = 0x00003670; gUnk_03003670 = .;
. = 0x00003674; gSpriteTables = .;
. = 0x00003678; gUnk_03003678 = .;
. = 0x0000367C; gUnk_0300367C = .;
. = 0x00003680; gBgScrollRegs = .;
. = 0x00003690; gDispCnt = .;
. = 0x000036A0; gKeysContinuedRepeatIntervals = .;
. = 0x000036B0; gMultiSioSend = .;
. = 0x000036C4; gUnk_030036C4 = .;
. = 0x000036C8; gUnk_030036C8 = .;
. = 0x000036D0; gRgbMap = .;
. = 0x00003790; gUnk_03003790 = .;
. = 0x000037A0; gBgPalette = .;
. = 0x00003820; gUnk_03003820 = .;
. = 0x00003840; gUnk_03003840 = .;
. = 0x00003860; gUnk_03003860 = .;
. = 0x00003880; gUnk_03003880 = .;
. = 0x000038A0; gUnk_030038A0 = .;
. = 0x000039A0; gUnk_030039A0 = .;
. = 0x000039A4; gUnk_030039A4 = .;
. = 0x000039A8; gPrevInput = .;
. = 0x000039AC; gUnk_030039AC = .;
. = 0x000039FC; gPressedKeys = .;
. = 0x00003A00; gUnk_03003A00 = .;
. = 0x00003A04; gUnk_03003A04 = .;
. = 0x00003A10; gHBlankIntrs = .;
. = 0x00003A20; gIwramHeap = .;
. = 0x00006030; gUnk_03006030 = .;
. = 0x00006070; gUnk_03006070 = .;
. = 0x00006074; gUnk_03006074 = .;
. = 0x00006078; gUnk_03006078 = .;
. = 0x0000607C; gUnk_0300607C = .;
. = 0x00006080; gUnk_03006080 = .;
. = 0x000060A0; gUnk_030060A0 = .;
. = 0x000060B0; gOamBuffer = .;
. = 0x000064B0; gVramHeapState = .;
. = 0x000068B0; gUnk_030068B0 = .;
. = 0x000068B4; gUnk_030068B4 = .;
. = 0x000068B8; gUnk_030068B8 = .;
. = 0x000068C0; gUnk_030068C0 = .;
. = 0x000068D0; gInputPlaybackData = .;
. = 0x000068D4; gExecSoundMain = .;
. = 0x000068D8; gRngVal = .;
. = 0x000068E0; src/multi_sio.o(common_data);
. = ALIGN(4); src/sio32_multi_load.o(common_data);
. = ALIGN(16); src/input_recorder.o(common_data);
. = ALIGN(4); src/input_recorder.o(.bss);
. = ALIGN(4); gUnk_03006CC0 = .;
. = 0x00006CC4; iwram_end = .;
. = 0x00008000;
} >iwram
rom : ALIGN(4) {
asm/crt0.o(.text);
src/init.o(.text);
asm/code.o(.text);
src/code_080023A4.o(.text);
src/save.o(.text);
asm/chest.o(.text);
src/warp_star.o(.text);
src/code_0800E0E4.o(.text);
asm/code_0800ECAC.o(.text);
src/code_08019CB8.o(.text);
src/multi_08019F28.o(.text);
asm/goal_game_bonus.o(.text);
src/shard.o(.text);
src/code_0801C6F8.o(.text);
src/code_0801DA58.o(.text);
asm/special_hub_mirror.o(.text);
src/subgame_menu.o(.text);
asm/code_08020220.o(.text);
asm/cutscene_trigger.o(.text);
src/shadow_kirby.o(.text);
asm/hammer_peg.o(.text);
src/master_sword.o(.text);
src/lever_wall.o(.text);
asm/code_08025650.o(.text);
src/demo.o(.text);
asm/code_08026044.o(.text);
src/special_doors.o(.text);
asm/code_0802B4A8.o(.text);
asm/code_0802E57C.o(.text);
asm/code_0802F8D8.o(.text);
src/multi_boot_util.o(.text);
src/multi_08030C94.o(.text);
asm/code_08032E98.o(.text);
src/kirby.o(.text);
asm/code_0806F734.o(.text);
src/object.o(.text);
src/gordo.o(.text);
asm/droppy.o(.text);
asm/haley.o(.text);
asm/prank.o(.text);
src/cupie.o(.text);
src/waddle_dee.o(.text);
src/blockin.o(.text);
src/big_waddle_dee.o(.text);
src/blipper.o(.text);
src/scarfy.o(.text);
src/jack.o(.text);
src/inhalable_star.o(.text);
src/ability_objects.o(.text);
src/chip.o(.text);
asm/soarar.o(.text);
asm/snooter.o(.text);
asm/roly_poly.o(.text);
src/bronto_burt.o(.text);
src/glunk.o(.text);
src/squishy.o(.text);
asm/leap.o(.text);
src/mirra.o(.text);
asm/sir_kibble.o(.text);
src/laser_ball.o(.text);
asm/sword_knight.o(.text);
src/minny.o(.text);
src/boxin.o(.text);
asm/cookin.o(.text);
src/waddle_doo.o(.text);
src/flamer.o(.text);
asm/flamer.o(.text);
src/pengy.o(.text);
src/twister.o(.text);
src/wheelie.o(.text);
src/batty.o(.text);
src/metal_guardian.o(.text);
src/rocky.o(.text);
src/heavy_knight.o(.text);
src/giant_rocky.o(.text);
src/foley.o(.text);
src/shooty.o(.text);
src/noddy.o(.text);
src/parasol.o(.text);
asm/hot_head.o(.text);
src/sparky.o(.text);
src/bomber.o(.text);
src/ufo.o(.text);
src/golem.o(.text);
src/bang_bang.o(.text);
src/box_boxer.o(.text);
src/batafire.o(.text);
src/mr_frosty.o(.text);
src/phan_phan.o(.text);
src/bonkers.o(.text);
src/master_hand.o(.text);
src/boxy.o(.text);
src/bombar.o(.text);
src/king_golem.o(.text);
src/kracko.o(.text);
src/crazy_hand.o(.text);
src/gobbler.o(.text);
src/wiz.o(.text);
src/moley.o(.text);
src/mega_titan.o(.text);
src/dark_meta_knight.o(.text);
src/dark_mind.o(.text);
asm/boss_challenge_door.o(.text);
asm/big_small_switch.o(.text);
src/fire.o(.text);
src/mirror_door.o(.text);
asm/shotzo.o(.text);
asm/vert_sliding_door.o(.text);
asm/object_spawner.o(.text);
src/destroyable_rock_block.o(.text);
src/unknown_75.o(.text);
src/lava_wall.o(.text);
src/scroll_lock.o(.text);
src/cannon_fuse.o(.text);
asm/star_stone_block.o(.text);
asm/star_platform.o(.text);
src/flame_column.o(.text);
asm/large_stone_block_7D.o(.text);
asm/large_star_stone_block.o(.text);
asm/kirby_cannon.o(.text);
asm/eight_dir_cannon.o(.text);
src/bonus.o(.text);
asm/code_08123950.o(.text);
asm/pause_help.o(.text);
asm/code_08124BE0.o(.text);
asm/pause_world_map.o(.text);
asm/pause_area_map.o(.text);
src/pause_fade.o(.text);
src/code_08128D48.o(.text);
asm/code_08128BEC.o(.text);
src/logo.o(.text);
asm/code_08138B44.o(.text);
asm/code_08138D64.o(.text);
asm/collection_room.o(.text);
asm/intro.o(.text);
src/title_screen.o(.text);
asm/code_0814A828.o(.text);
asm/m4a_asm.o(.text);
src/m4a.o(.text);
src/main.o(.text);
src/task.o(.text);
src/bg_1.o(.text);
asm/sub_08153184.o(.text);
src/bg_2.o(.text);
src/sprite_1.o(.text);
asm/sprite.o(.text);
src/sprite_2.o(.text);
src/malloc_vram.o(.text);
src/multi_sio.o(.text);
src/multi_boot.o(.text);
src/sio32_multi_load.o(.text);
src/input_recorder.o(.text);
src/palette.o(.text);
asm/multi_sio_08158934.o(.text);
asm/multi_sio_asm.o(.text);
src/malloc_ewram.o(.text);
src/agb_sram.o(.text);
asm/libagbsyscall.o(.text);
*libc.a:wf_pow.o(.text);
*libc.a:ef_pow.o(.text);
*libc.a:ef_sqrt.o(.text);
*libc.a:s_matherr.o(.text);
*libc.a:s_rint.o(.text);
*libc.a:sf_fabs.o(.text);
*libc.a:sf_finite.o(.text);
*libc.a:sf_isnan.o(.text);
*libc.a:sf_scalbn.o(.text);
*libc.a:sf_copysign.o(.text);
*libgcc.a:_call_via_rX.o(.text);
*libgcc.a:_divsi3.o(.text);
*libgcc.a:_dvmd_tls.o(.text);
*libgcc.a:_modsi3.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:_muldi3.o(.text);
*libgcc.a:_negdi2.o(.text);
*libc.a:errno.o(.text);
*libc.a:memcpy.o(.text);
*libc.a:memset.o(.text);
data/data_1.o(.rodata);
src/warp_star.o(.rodata);
src/code_0800E0E4.o(.rodata);
data/data_7.o(.rodata);
src/multi_08019F28.o(.rodata);
data/data_15.o(.rodata);
src/shard.o(.rodata);
src/code_0801C6F8.o(.rodata);
src/code_0801DA58.o(.rodata);
data/data_14.o(.rodata);
src/shadow_kirby.o(.rodata);
data/data_11.o(.rodata);
src/special_doors.o(.rodata);
data/data_17.o(.rodata);
src/warp_star_data.o(.rodata);
data/data_6.o(.rodata);
src/kirby.o(.rodata);
data/data_21.o(.rodata);
src/cupie.o(.rodata);
src/waddle_dee.o(.rodata);
src/blockin.o(.rodata);
src/big_waddle_dee.o(.rodata);
src/blipper.o(.rodata);
src/scarfy.o(.rodata);
src/jack.o(.rodata);
src/inhalable_star.o(.rodata);
src/ability_objects.o(.rodata);
data/data_9.o(.rodata);
src/bronto_burt.o(.rodata);
src/glunk.o(.rodata);
src/squishy.o(.rodata);
data/data_18.o(.rodata);
src/boxin.o(.rodata);
data/data_16.o(.rodata);
src/waddle_doo.o(.rodata);
src/flamer.o(.rodata);
src/pengy.o(.rodata);
src/twister.o(.rodata);
src/wheelie.o(.rodata);
src/batty.o(.rodata);
src/metal_guardian.o(.rodata);
src/rocky.o(.rodata);
src/heavy_knight.o(.rodata);
src/giant_rocky.o(.rodata);
src/foley.o(.rodata);
src/shooty.o(.rodata);
src/noddy.o(.rodata);
src/parasol.o(.rodata);
data/data_10.o(.rodata);
src/sparky.o(.rodata);
src/bomber.o(.rodata);
src/ufo.o(.rodata);
src/golem.o(.rodata);
src/bang_bang.o(.rodata);
src/box_boxer.o(.rodata);
src/batafire.o(.rodata);
src/mr_frosty.o(.rodata);
src/phan_phan.o(.rodata);
src/bonkers.o(.rodata);
src/master_hand.o(.rodata);
src/boxy.o(.rodata);
src/bombar.o(.rodata);
src/king_golem.o(.rodata);
src/kracko.o(.rodata);
src/crazy_hand.o(.rodata);
src/gobbler.o(.rodata);
src/wiz.o(.rodata);
src/moley.o(.rodata);
src/mega_titan.o(.rodata);
src/dark_meta_knight.o(.rodata);
src/dark_mind.o(.rodata);
data/data_13.o(.rodata);
src/fire.o(.rodata);
src/mirror_door.o(.rodata);
data/data_20.o(.rodata);
src/destroyable_rock_block.o(.rodata);
src/unknown_75.o(.rodata);
src/lava_wall.o(.rodata);
src/scroll_lock.o(.rodata);
src/cannon_fuse.o(.rodata);
data/data_19.o(.rodata);
src/flame_column.o(.rodata);
data/data_22.o(.rodata);
src/code_08128D48.o(.rodata);
data/data_8.o(.rodata);
src/m4a_tables.o(.rodata);
data/data_4.o(.rodata);
src/main.o(.rodata);
data/data_5.o(.rodata);
src/trig.o(.rodata);
data/data_12.o(.rodata);
src/multi_sio.o(.rodata);
src/sio32_multi_load.o(.rodata);
src/agb_sram.o(.rodata);
*libc.a:wf_pow.o(.rodata);
*libc.a:ef_pow.o(.rodata);
*libc.a:ef_sqrt.o(.rodata);
*libc.a:s_infconst.o(.rodata);
*libc.a:s_lib_ver.o(.rodata);
*libc.a:s_rint.o(.rodata);
data/data_3.o(.rodata); /* very likely to be unused .rodata section in some library */
*libc.a:impure.o(.rodata);
/* TODO: extract the multiboot programs from ROM. */
data/data_2.o(.rodata);
data/multi_boot_images.o(.rodata);
src/build_info.o(.rodata);
*libc.a:impure.o(.data);
} >rom
/* 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/ :
{
*(*);
}
}