Resolve ctors/dtors/extab/extabindex

This commit is contained in:
Luke Street 2022-03-23 20:39:27 -04:00
parent ce247fb264
commit ed0d2110d9
6 changed files with 186 additions and 38 deletions

View File

@ -6,7 +6,7 @@ ifneq ($(findstring MSYS,$(shell uname)),)
endif
# If 0, tells the console to chill out. (Quiets the make process.)
VERBOSE ?= 1
VERBOSE ?= 0
# If MAPGENFLAG set to 1, tells LDFLAGS to generate a mapfile, which makes linking take several minutes.
MAPGENFLAG ?= 1

View File

@ -1,6 +1,118 @@
.include "macros.inc"
.section .ctors, "wa" # 0x803CB1C0 - 0x803CB380
.global lbl_803CB1C0
lbl_803CB1C0:
.incbin "baserom.dol", 0x3C81C0, 0x1C0
.global __init_cpp_exceptions_reference
__init_cpp_exceptions_reference:
# ROM: 0x3C81C0
.4byte __init_cpp_exceptions
.4byte __sinit_CControlMapper_cpp
.4byte __sinit_CPlayer_cpp
.4byte __sinit_CAxisAngle_cpp
.4byte __sinit_CEulerAngles_cpp
.4byte __sinit_CFrontEndUI_cpp
.4byte __sinit_CMFGame_cpp
.4byte __sinit_CAnimData_cpp
.4byte __sinit_CPlayerGun_cpp
.4byte __sinit_CEntity_cpp
.4byte __sinit_CWorld_cpp
.4byte __sinit_CSamusHud_cpp
.4byte __sinit_CPatterned_cpp
.4byte __sinit_CMapArea_cpp
.4byte __sinit_CBallCamera_cpp
.4byte __sinit_CAi_cpp
.4byte __sinit_CTargetReticles_cpp
.4byte __sinit_CSamusDoll_cpp
.4byte __sinit_CPlasmaBeam_cpp
.4byte __sinit_CWaveBeam_cpp
.4byte __sinit_CMappableObject_cpp
.4byte __sinit_CPlayerCameraBob_cpp
.4byte __sinit_CCameraFilter_cpp
.4byte __sinit_CMorphBall_cpp
.4byte __sinit_CDamageVulnerability_cpp
.4byte __sinit_CModelData_cpp
.4byte __sinit_CDecalManager_cpp
.4byte __sinit_TGameTypes_cpp
.4byte __sinit_CSpacePirate_cpp
.4byte __sinit_CPathCamera_cpp
.4byte __sinit_CBSFlyerLocomotion_cpp
.4byte __sinit_CChozoGhost_cpp
.4byte __sinit_CFireFlea_cpp
.4byte __sinit_CPuddleToadGamma_cpp
.4byte __sinit_CPowerBomb_cpp
.4byte __sinit_CParasite_cpp
.4byte __sinit_CSamusFaceReflection_cpp
.4byte __sinit_CCameraShakeData_cpp
.4byte __sinit_CMetroid_cpp
.4byte __sinit_CPlasmaProjectile_cpp
.4byte __sinit_CPlayerOrbit_cpp
.4byte __sinit_CFlameThrower_cpp
.4byte __sinit_CScriptRoomAcoustics_cpp
.4byte __sinit_CIceSheegoth_cpp
.4byte __sinit_CCollisionActor_cpp
.4byte __sinit_CFlaahgra_cpp
.4byte __sinit_CWaveBuster_cpp
.4byte __sinit_CMetroidBeta_cpp
.4byte __sinit_CThardus_cpp
.4byte __sinit_CFlyingPirate_cpp
.4byte __sinit_CEnergyProjectile_cpp
.4byte __sinit_CScriptGunTurret_cpp
.4byte __sinit_CBabygoth_cpp
.4byte __sinit_CScriptCameraPitchVolume_cpp
.4byte __sinit_RumbleFxTable_cpp
.4byte __sinit_CElitePirate_cpp
.4byte __sinit_CGrenadeLauncher_cpp
.4byte __sinit_CScriptLayerManager_cpp
.4byte __sinit_CMagdolite_cpp
.4byte __sinit_CScriptSpindleCamera_cpp
.4byte __sinit_CRidley_cpp
.4byte __sinit_CTryclops_cpp
.4byte __sinit_CNewFlameThrower_cpp
.4byte __sinit_CBurrower_cpp
.4byte __sinit_CMetroidPrimeExo_cpp
.4byte __sinit_CMetroidPrimeEssence_cpp
.4byte sub_802886f0
.4byte __sinit_CSlideShow_cpp
.4byte __sinit_CArtifactDoll_cpp
.4byte __sinit_CWorldLight_cpp
.4byte __sinit_IWeaponRenderer_cpp
.4byte __sinit_CDecal_cpp
.4byte __sinit_CCubeRenderer_cpp
.4byte __sinit_CGuiFeeHelper_cpp
.4byte __sinit_CGuiWidgetDrawParms_cpp
.4byte __sinit_CCollidableAABox_cpp
.4byte __sinit_CCollisionPrimitive_cpp
.4byte __sinit_CollisionUtil_cpp
.4byte __sinit_CCollidableSphere_cpp
.4byte __sinit_CMaterialFilter_cpp
.4byte __sinit_CStopwatch_cpp
.4byte __sinit_CSfxManager_cpp
.4byte __sinit_CLight_cpp
.4byte __sinit_CGX_cpp
.4byte __sinit_CTevCombiners_cpp
.4byte __sinit_DolphinCGraphics_cpp
.4byte __sinit_CloseEnough_cpp
.4byte __sinit_CMatrix3f_cpp
.4byte __sinit_CMatrix4f_cpp
.4byte __sinit_CQuaternion_cpp
.4byte __sinit_CTransform4f_cpp
.4byte __sinit_CVector2f_cpp
.4byte __sinit_CVector3f_cpp
.4byte __sinit_CMemory_cpp
.4byte sub_8032a504
.4byte __sinit_CAABox_cpp
.4byte __sinit_rstl_strings_cpp
.4byte __sinit_RstlExtras_cpp
.4byte __sinit_IObj_cpp
.4byte __sinit_CARAMManager_cpp
.4byte __sinit_CCubeMaterial_cpp
.4byte __sinit_CCubeSurface_cpp
.4byte __sinit_CColor_cpp
.4byte __sinit_DolphinCAudioSys_cpp
.4byte __sinit_DolphinCMemoryCardSys_cpp
.4byte __sinit_DolphinCSkinnedModel_cpp
.4byte __sinit_CMidiManager_cpp
.4byte __sinit_CDSPStreamManager_cpp
.4byte __sinit_CStreamAudioManager_cpp
.4byte __sinit_CStaticAudioPlayer_cpp
.4byte __sinit_GameTweaks_cpp
.4byte 0

View File

@ -1,6 +1,10 @@
.include "macros.inc"
.section .dtors, "wa" # 0x803CB380 - 0x803CB3A0
.global lbl_803CB380
lbl_803CB380:
.incbin "baserom.dol", 0x3C8380, 0x10
.global __destroy_global_chain_reference
__destroy_global_chain_reference:
# ROM: 0x3C8380
.4byte __destroy_global_chain
.4byte __fini_cpp_exceptions
.4byte __destroy_global_chain
.4byte 0

View File

@ -1,6 +1,20 @@
.include "macros.inc"
.section extab_, "wa" # 0x800035A0 - 0x800035E0
.global lbl_extab
lbl_extab:
.incbin "baserom.dol", 0x3C8120, 0x28
.global __destroy_arr_extab
__destroy_arr_extab:
# ROM: 0x3C8120
.4byte 0x20080000
.4byte 0
.global __construct_array_extab
__construct_array_extab:
.4byte 0x20080000
.4byte 0x00000060
.4byte 0x00000010
.4byte 0
.4byte 0x82000008
.4byte 0x80389844
.global __partial_array_destructor_extab
__partial_array_destructor_extab:
.4byte 0x18080000
.4byte 0

View File

@ -2,7 +2,25 @@
.section extabindex_, "wa" # 0x800035E0 - 0x80003640
lbl_extabindex:
.incbin "baserom.dol", 0x3C8160, 0x24
# ROM: 0x3C8160
.4byte __destroy_arr
.4byte 0x00000078
.4byte __destroy_arr_extab
.4byte __construct_array
.4byte 0x000000F8
.4byte __construct_array_extab
.4byte __partial_array_destructor
.4byte 0x000000B8
.4byte __partial_array_destructor_extab
.global lbl_80003604
lbl_80003604:
.incbin "baserom.dol", 0x3C8184, 0x20
# ROM: 0x3C8184
.4byte lbl_extabindex
.4byte lbl_80003604
.4byte __destroy_arr
.4byte 0x00000228
.4byte 0
.4byte 0
.4byte 0
.4byte 0

View File

@ -356989,8 +356989,8 @@ IsPitchable__18CBSFlyerLocomotionCFv:
/* 80138D90 00135CF0 88 63 03 CC */ lbz r3, 0x3cc(r3)
/* 80138D94 00135CF4 4E 80 00 20 */ blr
.global sub_80138d98
sub_80138d98:
.global __sinit_CBSFlyerLocomotion_cpp
__sinit_CBSFlyerLocomotion_cpp:
/* 80138D98 00135CF8 C0 02 9A 54 */ lfs f0, lbl_805AB774@sda21(r2)
/* 80138D9C 00135CFC D0 0D A3 C0 */ stfs f0, lbl_805A8F80@sda21(r13)
/* 80138DA0 00135D00 4E 80 00 20 */ blr
@ -398531,8 +398531,8 @@ lbl_8015DC98:
/* 8015DCAC 0015AC0C 38 21 01 10 */ addi r1, r1, 0x110
/* 8015DCB0 0015AC10 4E 80 00 20 */ blr
.global sub_8015dcb4
sub_8015dcb4:
.global __sinit_CCameraShakeData_cpp
__sinit_CCameraShakeData_cpp:
/* 8015DCB4 0015AC14 94 21 FE 80 */ stwu r1, -0x180(r1)
/* 8015DCB8 0015AC18 7C 08 02 A6 */ mflr r0
/* 8015DCBC 0015AC1C C0 22 9E E0 */ lfs f1, lbl_805ABC00@sda21(r2)
@ -637794,8 +637794,8 @@ __ct__13CGLXMemoryInfoFi:
/* 802345F0 00231550 90 03 00 20 */ stw r0, 0x20(r3)
/* 802345F4 00231554 4E 80 00 20 */ blr
.global __sinit_CWorldLayerState_cpp
__sinit_CWorldLayerState_cpp:
.global __sinit_CScriptLayerManager_cpp
__sinit_CScriptLayerManager_cpp:
/* 802345F8 00231558 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 802345FC 0023155C 7C 08 02 A6 */ mflr r0
/* 80234600 00231560 3C 80 80 3D */ lis r4, lbl_803D42E0@ha
@ -680987,8 +680987,8 @@ lbl_8025AA14:
/* 8025AA64 002579C4 38 21 02 B0 */ addi r1, r1, 0x2b0
/* 8025AA68 002579C8 4E 80 00 20 */ blr
.global sub_8025aa6c
sub_8025aa6c:
.global __sinit_CRidley_cpp
__sinit_CRidley_cpp:
/* 8025AA6C 002579CC 94 21 F9 00 */ stwu r1, -0x700(r1)
/* 8025AA70 002579D0 7C 08 02 A6 */ mflr r0
/* 8025AA74 002579D4 3C 60 80 3D */ lis r3, lbl_803D4D5C@ha
@ -687910,8 +687910,8 @@ __ct__9CTryclops:
/* 80260F18 0025DE78 38 21 00 70 */ addi r1, r1, 0x70
/* 80260F1C 0025DE7C 4E 80 00 20 */ blr
.global sub_80260f20
sub_80260f20:
.global __sinit_CTryclops_cpp
__sinit_CTryclops_cpp:
/* 80260F20 0025DE80 94 21 FF 20 */ stwu r1, -0xe0(r1)
/* 80260F24 0025DE84 7C 08 02 A6 */ mflr r0
/* 80260F28 0025DE88 39 60 00 02 */ li r11, 2
@ -692448,8 +692448,8 @@ lbl_80264F54:
sub_80264f60:
/* 80264F60 00261EC0 4E 80 00 20 */ blr
.global sub_80264f64
sub_80264f64:
.global __sinit_CNewFlameThrower_cpp
__sinit_CNewFlameThrower_cpp:
/* 80264F64 00261EC4 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 80264F68 00261EC8 7C 08 02 A6 */ mflr r0
/* 80264F6C 00261ECC 38 60 00 00 */ li r3, 0
@ -718752,8 +718752,8 @@ lbl_8027C530:
/* 8027C544 002794A4 38 21 00 10 */ addi r1, r1, 0x10
/* 8027C548 002794A8 4E 80 00 20 */ blr
.global sub_8027c54c
sub_8027c54c:
.global __sinit_CMetroidPrimeExo_cpp
__sinit_CMetroidPrimeExo_cpp:
/* 8027C54C 002794AC 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 8027C550 002794B0 3C 60 80 3D */ lis r3, lbl_803D5454@ha
/* 8027C554 002794B4 39 23 54 54 */ addi r9, r3, lbl_803D5454@l
@ -723148,8 +723148,8 @@ __ct__20CMetroidPrimeEssence:
/* 8028044C 0027D3AC 38 21 00 60 */ addi r1, r1, 0x60
/* 80280450 0027D3B0 4E 80 00 20 */ blr
.global sub_80280454
sub_80280454:
.global __sinit_CMetroidPrimeEssence_cpp
__sinit_CMetroidPrimeEssence_cpp:
/* 80280454 0027D3B4 80 02 BD 00 */ lwz r0, lbl_805ADA20@sda21(r2)
/* 80280458 0027D3B8 90 0D 98 E4 */ stw r0, lbl_805A84A4@sda21(r13)
/* 8028045C 0027D3BC 4E 80 00 20 */ blr
@ -754664,8 +754664,8 @@ sub_8029c5b4:
/* 8029C5C4 00299524 7C 60 01 94 */ addze r3, r0
/* 8029C5C8 00299528 4E 80 00 20 */ blr
.global sub_8029c5cc
sub_8029c5cc:
.global __sinit_CSlideShow_cpp
__sinit_CSlideShow_cpp:
/* 8029C5CC 0029952C 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 8029C5D0 00299530 7C 08 02 A6 */ mflr r0
/* 8029C5D4 00299534 C0 22 BF F0 */ lfs f1, lbl_805ADD10@sda21(r2)
@ -795356,8 +795356,8 @@ lbl_802C0A34:
/* 802C0A34 002BD994 B1 24 00 00 */ sth r9, 0(r4)
/* 802C0A38 002BD998 4E 80 00 20 */ blr
.global sub_802c0a3c
sub_802c0a3c:
.global __sinit_CCubeRenderer_cpp
__sinit_CCubeRenderer_cpp:
/* 802C0A3C 002BD99C 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 802C0A40 002BD9A0 7C 08 02 A6 */ mflr r0
/* 802C0A44 002BD9A4 C0 22 C2 70 */ lfs f1, lbl_805ADF90@sda21(r2)
@ -983673,8 +983673,8 @@ lbl_80364A7C:
/* 80364A88 003619E8 38 21 00 20 */ addi r1, r1, 0x20
/* 80364A8C 003619EC 4E 80 00 20 */ blr
.global sub_80364a90
sub_80364a90:
.global __sinit_CDSPStreamManager_cpp
__sinit_CDSPStreamManager_cpp:
/* 80364A90 003619F0 54 2B 06 FE */ clrlwi r11, r1, 0x1b
/* 80364A94 003619F4 7C 2C 0B 78 */ mr r12, r1
/* 80364A98 003619F8 21 6B FC 80 */ subfic r11, r11, -896
@ -1021829,8 +1021829,8 @@ __init_cpp:
/* 80385848 003827A8 90 01 00 04 */ stw r0, 4(r1)
/* 8038584C 003827AC 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 80385850 003827B0 93 E1 00 0C */ stw r31, 0xc(r1)
/* 80385854 003827B4 3C 60 80 3D */ lis r3, lbl_803CB1C0@ha
/* 80385858 003827B8 38 03 B1 C0 */ addi r0, r3, lbl_803CB1C0@l
/* 80385854 003827B4 3C 60 80 3D */ lis r3, __init_cpp_exceptions_reference@ha
/* 80385858 003827B8 38 03 B1 C0 */ addi r0, r3, __init_cpp_exceptions_reference@l
/* 8038585C 003827BC 7C 1F 03 78 */ mr r31, r0
/* 80385860 003827C0 48 00 00 04 */ b lbl_80385864
lbl_80385864:
@ -1027231,8 +1027231,8 @@ exit:
/* 8038A1DC 0038713C 2C 00 00 00 */ cmpwi r0, 0
/* 8038A1E0 00387140 40 82 00 4C */ bne lbl_8038A22C
/* 8038A1E4 00387144 4B FF F4 61 */ bl __destroy_global_chain
/* 8038A1E8 00387148 3C 60 80 3D */ lis r3, lbl_803CB380@ha
/* 8038A1EC 0038714C 38 03 B3 80 */ addi r0, r3, lbl_803CB380@l
/* 8038A1E8 00387148 3C 60 80 3D */ lis r3, __destroy_global_chain_reference@ha
/* 8038A1EC 0038714C 38 03 B3 80 */ addi r0, r3, __destroy_global_chain_reference@l
/* 8038A1F0 00387150 7C 1F 03 78 */ mr r31, r0
/* 8038A1F4 00387154 48 00 00 10 */ b lbl_8038A204
lbl_8038A1F8: