From 4b6598b0be35f9cd181087d0c5567902029b24f7 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Wed, 10 Aug 2022 01:34:11 -0400 Subject: [PATCH] Split .ctors Former-commit-id: a54141b0fae519f08564c7139873bd5eb07865e6 --- Makefile | 4 +- asm/Collision/CCollidableAABox.s | 4 + asm/Collision/CCollidableSphere.s | 4 + asm/Collision/CCollisionPrimitive.s | 4 + asm/Collision/CMaterialFilter.s | 4 + asm/Collision/CollisionUtil.s | 4 + asm/GuiSys/CGuiGroup.s | 4 + asm/GuiSys/CGuiWidgetDrawParms.s | 4 + asm/Kyoto/Alloc/CMemory.s | 4 + asm/Kyoto/Animation/DolphinCSkinnedModel.s | 4 + asm/Kyoto/Audio/CDSPStreamManager.s | 4 + asm/Kyoto/Audio/CMidiManager.s | 4 + asm/Kyoto/Audio/CSfxManager.s | 4 + asm/Kyoto/Audio/CStaticAudioPlayer.s | 4 + asm/Kyoto/Audio/CStreamAudioManager.s | 4 + asm/Kyoto/Audio/DolphinCAudioSys.s | 4 + asm/Kyoto/Basics/CStopwatch.s | 4 + asm/Kyoto/CARAMManager.s | 4 + asm/Kyoto/CFrameDelayedKiller.s | 4 + asm/Kyoto/DolphinCMemoryCardSys.s | 4 + asm/Kyoto/Graphics/CColor.s | 4 + asm/Kyoto/Graphics/CCubeMaterial.s | 4 + asm/Kyoto/Graphics/CCubeSurface.s | 4 + asm/Kyoto/Graphics/CGX.s | 4 + asm/Kyoto/Graphics/CLight.s | 4 + asm/Kyoto/Graphics/CTevCombiners.s | 4 + asm/Kyoto/Graphics/DolphinCGraphics.s | 4 + asm/Kyoto/IObj.s | 4 + asm/Kyoto/Math/CAABox.s | 4 + asm/Kyoto/Math/CMatrix3f.s | 4 + asm/Kyoto/Math/CMatrix4f.s | 4 + asm/Kyoto/Math/CQuaternion.s | 4 + asm/Kyoto/Math/CTransform4f.s | 4 + asm/Kyoto/Math/CVector2f.s | 4 + asm/Kyoto/Math/CVector3f.s | 4 + asm/Kyoto/Math/CloseEnough.s | 4 + asm/Kyoto/Particles/CElementGen.s | 4 + asm/Kyoto/rstl/RstlExtras.s | 4 + asm/Kyoto/rstl/rstl_strings.s | 4 + asm/MetaRender/CCubeRenderer.s | 4 + asm/MetroidPrime/BodyState/CBSLocomotion.s | 4 + asm/MetroidPrime/CAnimData.s | 4 + asm/MetroidPrime/CArtifactDoll.s | 4 + asm/MetroidPrime/CAxisAngle.s | 4 + asm/MetroidPrime/CCollisionActor.s | 4 + asm/MetroidPrime/CControlMapper.s | 4 + asm/MetroidPrime/CDamageVulnerability.s | 4 + asm/MetroidPrime/CDecalManager.s | 4 + asm/MetroidPrime/CEntity.s | 16 +- asm/MetroidPrime/CEulerAngles.s | 4 + asm/MetroidPrime/CFrontEndUI.s | 4 + asm/MetroidPrime/CMFGame.s | 4 + asm/MetroidPrime/CMapArea.s | 4 + asm/MetroidPrime/CMappableObject.s | 4 + asm/MetroidPrime/CModelData.s | 4 + asm/MetroidPrime/CSamusDoll.s | 4 + asm/MetroidPrime/CSlideShow.s | 4 + asm/MetroidPrime/CTargetReticles.s | 4 + asm/MetroidPrime/CWorld.s | 4 + asm/MetroidPrime/Cameras/CBallCamera.s | 4 + asm/MetroidPrime/Cameras/CCameraFilter.s | 4 + asm/MetroidPrime/Cameras/CCameraShakeData.s | 4 + asm/MetroidPrime/Cameras/CPathCamera.s | 4 + asm/MetroidPrime/Enemies/CAi.s | 4 + asm/MetroidPrime/Enemies/CBabygoth.s | 4 + asm/MetroidPrime/Enemies/CBurrower.s | 4 + asm/MetroidPrime/Enemies/CChozoGhost.s | 4 + asm/MetroidPrime/Enemies/CElitePirate.s | 4 + asm/MetroidPrime/Enemies/CFireFlea.s | 4 + asm/MetroidPrime/Enemies/CFlaahgra.s | 4 + asm/MetroidPrime/Enemies/CFlyingPirate.s | 4 + asm/MetroidPrime/Enemies/CGrenadeLauncher.s | 4 + asm/MetroidPrime/Enemies/CIceSheegoth.s | 4 + asm/MetroidPrime/Enemies/CMagdolite.s | 4 + asm/MetroidPrime/Enemies/CMetroid.s | 4 + asm/MetroidPrime/Enemies/CMetroidBeta.s | 4 + .../Enemies/CMetroidPrimeEssence.s | 4 + asm/MetroidPrime/Enemies/CMetroidPrimeExo.s | 4 + asm/MetroidPrime/Enemies/CParasite.s | 4 + asm/MetroidPrime/Enemies/CPatterned.s | 4 + asm/MetroidPrime/Enemies/CPuddleToadGamma.s | 4 + asm/MetroidPrime/Enemies/CRidley.s | 4 + asm/MetroidPrime/Enemies/CSpacePirate.s | 4 + asm/MetroidPrime/Enemies/CThardus.s | 4 + asm/MetroidPrime/Enemies/CTryclops.s | 4 + asm/MetroidPrime/HUD/CSamusHud.s | 4 + asm/MetroidPrime/Player/CMorphBall.s | 4 + asm/MetroidPrime/Player/CPlayer.s | 4 + asm/MetroidPrime/Player/CPlayerCameraBob.s | 4 + asm/MetroidPrime/Player/CPlayerDynamics.s | 4 + asm/MetroidPrime/Player/CPlayerGun.s | 4 + asm/MetroidPrime/Player/CPlayerOrbit.s | 4 + .../Player/CSamusFaceReflection.s | 4 + asm/MetroidPrime/Player/CWorldLayerState.s | 4 + asm/MetroidPrime/RumbleFxTable.s | 4 + .../ScriptObjects/CScriptCameraPitchVolume.s | 4 + .../ScriptObjects/CScriptGunTurret.s | 4 + .../ScriptObjects/CScriptRoomAcoustics.s | 4 + .../ScriptObjects/CScriptSpindleCamera.s | 4 + asm/MetroidPrime/TGameTypes.s | 4 + asm/MetroidPrime/Weapons/CEnergyProjectile.s | 4 + asm/MetroidPrime/Weapons/CFlameThrower.s | 4 + asm/MetroidPrime/Weapons/CNewFlameThrower.s | 4 + asm/MetroidPrime/Weapons/CPlasmaBeam.s | 4 + asm/MetroidPrime/Weapons/CPlasmaProjectile.s | 4 + asm/MetroidPrime/Weapons/CPowerBomb.s | 4 + asm/MetroidPrime/Weapons/CWaveBeam.s | 4 + asm/MetroidPrime/Weapons/CWaveBuster.s | 4 + asm/Runtime/NMWException.s | 44 ++ asm/Runtime/__init_cpp_exceptions.s | 27 +- asm/Runtime/abort_exit.s | 4 +- asm/Runtime/global_destructor_chain.s | 23 +- asm/Runtime/sdata.s | 5 - asm/Weapons/CDecal.s | 4 + asm/Weapons/IWeaponRenderer.s | 4 + asm/WorldFormat/CWorldLight.s | 4 + asm/ctors.s | 560 ------------------ asm/dtors.s | 449 +++++++++++++- asm/extab.s | 20 - asm/extabindex.s | 26 - asm/os/__ppc_eabi_init_text.s | 4 +- ldscript.lcf | 12 +- obj_files.mk | 14 +- 123 files changed, 981 insertions(+), 663 deletions(-) delete mode 100644 asm/ctors.s delete mode 100644 asm/extab.s delete mode 100644 asm/extabindex.s diff --git a/Makefile b/Makefile index afc7f817..40a81fdb 100644 --- a/Makefile +++ b/Makefile @@ -43,13 +43,13 @@ endif include obj_files.mk -O_FILES := $(INIT_O_FILES) $(EXTAB_O_FILES) $(EXTABINDEX_O_FILES) $(METROTRK_FILES) \ +O_FILES := $(INIT_O_FILES) $(METROTRK_FILES) \ $(METROIDPRIME) $(WORLDFORMAT) $(WEAPONS) $(METARENDER) $(GUISYS) $(COLLISION) \ $(KYOTO) $(AI_FILES) \ $(AR_FILES) $(BASE_FILES) $(DB_FILES) $(DSP_FILES) $(DVD_FILES) $(GX_FILES) $(MTX_FILES) \ $(OS_FILES) $(PAD_FILES) $(VI_FILES) $(MSL_PPCEABI_BARE_H) $(MUSYX_FILES) \ $(DTK_FILES) $(CARD_FILES) $(SI_FILES) $(EXI_FILES) $(THP_FILES) \ - $(GBA_FILES) $(CTORS_O_FILES) $(DTORS_O_FILES) + $(GBA_FILES) $(DTORS_O_FILES) DEPENDS := $(O_FILES:.o=.d) # If a specific .o file is passed as a target, also process its deps DEPENDS += $(MAKECMDGOALS:.o=.d) diff --git a/asm/Collision/CCollidableAABox.s b/asm/Collision/CCollidableAABox.s index b452bc28..8f4b30ad 100644 --- a/asm/Collision/CCollidableAABox.s +++ b/asm/Collision/CCollidableAABox.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CCollidableAABox_cpp + .section .data .global lbl_803ECAD0 diff --git a/asm/Collision/CCollidableSphere.s b/asm/Collision/CCollidableSphere.s index 9973506b..bf714def 100644 --- a/asm/Collision/CCollidableSphere.s +++ b/asm/Collision/CCollidableSphere.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CCollidableSphere_cpp + .section .data .global lbl_803ECAF8 diff --git a/asm/Collision/CCollisionPrimitive.s b/asm/Collision/CCollisionPrimitive.s index f3233939..1a688e7c 100644 --- a/asm/Collision/CCollisionPrimitive.s +++ b/asm/Collision/CCollisionPrimitive.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CCollisionPrimitive_cpp + .section .bss .global lbl_804794E0 diff --git a/asm/Collision/CMaterialFilter.s b/asm/Collision/CMaterialFilter.s index 75226dc7..89626e33 100644 --- a/asm/Collision/CMaterialFilter.s +++ b/asm/Collision/CMaterialFilter.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CMaterialFilter_cpp + .section .text, "ax" .global Passes__15CMaterialFilterCFRC13CMaterialList diff --git a/asm/Collision/CollisionUtil.s b/asm/Collision/CollisionUtil.s index 5bee3b31..cf459ea1 100644 --- a/asm/Collision/CollisionUtil.s +++ b/asm/Collision/CollisionUtil.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CollisionUtil_cpp + .section .bss .global lbl_80479510 diff --git a/asm/GuiSys/CGuiGroup.s b/asm/GuiSys/CGuiGroup.s index 5588101b..f404cb04 100644 --- a/asm/GuiSys/CGuiGroup.s +++ b/asm/GuiSys/CGuiGroup.s @@ -2,6 +2,10 @@ #TODO: Split this up properly (need to split CGuiCamera and CGuiCompoundWidget) +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CGuiFeeHelper_cpp + .section .sbss, "wa" .global lbl_805A91F8 diff --git a/asm/GuiSys/CGuiWidgetDrawParms.s b/asm/GuiSys/CGuiWidgetDrawParms.s index a70bfd59..d2c19b47 100644 --- a/asm/GuiSys/CGuiWidgetDrawParms.s +++ b/asm/GuiSys/CGuiWidgetDrawParms.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CGuiWidgetDrawParms_cpp + .section .text, "ax" .global __sinit_CGuiWidgetDrawParms_cpp diff --git a/asm/Kyoto/Alloc/CMemory.s b/asm/Kyoto/Alloc/CMemory.s index 0cc5d944..83d9b776 100644 --- a/asm/Kyoto/Alloc/CMemory.s +++ b/asm/Kyoto/Alloc/CMemory.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CMemory_cpp + .section .bss .global lbl_804BFD58 diff --git a/asm/Kyoto/Animation/DolphinCSkinnedModel.s b/asm/Kyoto/Animation/DolphinCSkinnedModel.s index d0893933..bae3514a 100644 --- a/asm/Kyoto/Animation/DolphinCSkinnedModel.s +++ b/asm/Kyoto/Animation/DolphinCSkinnedModel.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_DolphinCSkinnedModel_cpp + .section .data .global lbl_803EF718 diff --git a/asm/Kyoto/Audio/CDSPStreamManager.s b/asm/Kyoto/Audio/CDSPStreamManager.s index 24365033..419001c8 100644 --- a/asm/Kyoto/Audio/CDSPStreamManager.s +++ b/asm/Kyoto/Audio/CDSPStreamManager.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CDSPStreamManager_cpp + .section .bss #TODO: Figure out what's going on with these, they're referenced in various locations diff --git a/asm/Kyoto/Audio/CMidiManager.s b/asm/Kyoto/Audio/CMidiManager.s index 988cfe85..be953de9 100644 --- a/asm/Kyoto/Audio/CMidiManager.s +++ b/asm/Kyoto/Audio/CMidiManager.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CMidiManager_cpp + .section .data .global lbl_803EF788 diff --git a/asm/Kyoto/Audio/CSfxManager.s b/asm/Kyoto/Audio/CSfxManager.s index 66c31ba7..4464e93c 100644 --- a/asm/Kyoto/Audio/CSfxManager.s +++ b/asm/Kyoto/Audio/CSfxManager.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CSfxManager_cpp + .section .data .global lbl_803ECE10 diff --git a/asm/Kyoto/Audio/CStaticAudioPlayer.s b/asm/Kyoto/Audio/CStaticAudioPlayer.s index 6b82cbbc..a287b4b5 100644 --- a/asm/Kyoto/Audio/CStaticAudioPlayer.s +++ b/asm/Kyoto/Audio/CStaticAudioPlayer.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CStaticAudioPlayer_cpp + .section .sbss, "wa" .global lbl_805A96A0 diff --git a/asm/Kyoto/Audio/CStreamAudioManager.s b/asm/Kyoto/Audio/CStreamAudioManager.s index 743e4e81..e5c0ef67 100644 --- a/asm/Kyoto/Audio/CStreamAudioManager.s +++ b/asm/Kyoto/Audio/CStreamAudioManager.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CStreamAudioManager_cpp + .section .sdata .global lbl_805A8A30 diff --git a/asm/Kyoto/Audio/DolphinCAudioSys.s b/asm/Kyoto/Audio/DolphinCAudioSys.s index d7c2f0e2..c59e9a4c 100644 --- a/asm/Kyoto/Audio/DolphinCAudioSys.s +++ b/asm/Kyoto/Audio/DolphinCAudioSys.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_DolphinCAudioSys_cpp + .section .sdata .global lbl_805A8998 diff --git a/asm/Kyoto/Basics/CStopwatch.s b/asm/Kyoto/Basics/CStopwatch.s index e59918f4..562024f5 100644 --- a/asm/Kyoto/Basics/CStopwatch.s +++ b/asm/Kyoto/Basics/CStopwatch.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CStopwatch_cpp + .section .sbss, "wa" .global lbl_805A9238 diff --git a/asm/Kyoto/CARAMManager.s b/asm/Kyoto/CARAMManager.s index c018537c..76af4c91 100644 --- a/asm/Kyoto/CARAMManager.s +++ b/asm/Kyoto/CARAMManager.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CARAMManager_cpp + .section .sdata .balign 8 diff --git a/asm/Kyoto/CFrameDelayedKiller.s b/asm/Kyoto/CFrameDelayedKiller.s index 61b61cd7..9ba4057b 100644 --- a/asm/Kyoto/CFrameDelayedKiller.s +++ b/asm/Kyoto/CFrameDelayedKiller.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CFrameDelayedKiller_cpp + .section .bss .global lbl_80540A40 diff --git a/asm/Kyoto/DolphinCMemoryCardSys.s b/asm/Kyoto/DolphinCMemoryCardSys.s index 51bd32c3..2073c618 100644 --- a/asm/Kyoto/DolphinCMemoryCardSys.s +++ b/asm/Kyoto/DolphinCMemoryCardSys.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_DolphinCMemoryCardSys_cpp + .section .sdata .global lbl_805A89A8 diff --git a/asm/Kyoto/Graphics/CColor.s b/asm/Kyoto/Graphics/CColor.s index ee72e5d2..af43c6d7 100644 --- a/asm/Kyoto/Graphics/CColor.s +++ b/asm/Kyoto/Graphics/CColor.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CColor_cpp + .section .sbss, "wa" .global lbl_805A9568 diff --git a/asm/Kyoto/Graphics/CCubeMaterial.s b/asm/Kyoto/Graphics/CCubeMaterial.s index 3a121203..b4e0c65a 100644 --- a/asm/Kyoto/Graphics/CCubeMaterial.s +++ b/asm/Kyoto/Graphics/CCubeMaterial.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CCubeMaterial_cpp + .section .data .balign 8 diff --git a/asm/Kyoto/Graphics/CCubeSurface.s b/asm/Kyoto/Graphics/CCubeSurface.s index 9fdfc79f..af6ec5a4 100644 --- a/asm/Kyoto/Graphics/CCubeSurface.s +++ b/asm/Kyoto/Graphics/CCubeSurface.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CCubeSurface_cpp + .section .text, "ax" .global GetBounds__12CCubeSurfaceCFv diff --git a/asm/Kyoto/Graphics/CGX.s b/asm/Kyoto/Graphics/CGX.s index e5e2b6fc..47274cfa 100644 --- a/asm/Kyoto/Graphics/CGX.s +++ b/asm/Kyoto/Graphics/CGX.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CGX_cpp + .section .bss .global lbl_80479BD0 diff --git a/asm/Kyoto/Graphics/CLight.s b/asm/Kyoto/Graphics/CLight.s index 9250994d..550a1099 100644 --- a/asm/Kyoto/Graphics/CLight.s +++ b/asm/Kyoto/Graphics/CLight.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CLight_cpp + .section .sdata .global lbl_805A8810 diff --git a/asm/Kyoto/Graphics/CTevCombiners.s b/asm/Kyoto/Graphics/CTevCombiners.s index 1eea2124..1276f07b 100644 --- a/asm/Kyoto/Graphics/CTevCombiners.s +++ b/asm/Kyoto/Graphics/CTevCombiners.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CTevCombiners_cpp + .section .sdata .global lbl_805A8820 diff --git a/asm/Kyoto/Graphics/DolphinCGraphics.s b/asm/Kyoto/Graphics/DolphinCGraphics.s index 2a137693..00daefc1 100644 --- a/asm/Kyoto/Graphics/DolphinCGraphics.s +++ b/asm/Kyoto/Graphics/DolphinCGraphics.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_DolphinCGraphics_cpp + .section .data .global lbl_803ED910 diff --git a/asm/Kyoto/IObj.s b/asm/Kyoto/IObj.s index 948926da..3bd57cf3 100644 --- a/asm/Kyoto/IObj.s +++ b/asm/Kyoto/IObj.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_IObj_cpp + .section .sbss, "wa" .global lbl_805A9510 diff --git a/asm/Kyoto/Math/CAABox.s b/asm/Kyoto/Math/CAABox.s index 7bacbd4e..f205ff98 100644 --- a/asm/Kyoto/Math/CAABox.s +++ b/asm/Kyoto/Math/CAABox.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CAABox_cpp + .section .data .global lbl_803EE318 diff --git a/asm/Kyoto/Math/CMatrix3f.s b/asm/Kyoto/Math/CMatrix3f.s index 84e99f42..5a395ae7 100644 --- a/asm/Kyoto/Math/CMatrix3f.s +++ b/asm/Kyoto/Math/CMatrix3f.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CMatrix3f_cpp + .section .text, "ax" .global __as__9CMatrix3fFRC9CMatrix3f diff --git a/asm/Kyoto/Math/CMatrix4f.s b/asm/Kyoto/Math/CMatrix4f.s index 6afe6ff3..904d21a3 100644 --- a/asm/Kyoto/Math/CMatrix4f.s +++ b/asm/Kyoto/Math/CMatrix4f.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CMatrix4f_cpp + .section .text, "ax" .global MultiplyGetW__9CMatrix4fCFRC9CVector3f diff --git a/asm/Kyoto/Math/CQuaternion.s b/asm/Kyoto/Math/CQuaternion.s index 54fe3f92..bff1a80d 100644 --- a/asm/Kyoto/Math/CQuaternion.s +++ b/asm/Kyoto/Math/CQuaternion.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CQuaternion_cpp + .section .bss .global lbl_804BFD30 diff --git a/asm/Kyoto/Math/CTransform4f.s b/asm/Kyoto/Math/CTransform4f.s index 7e40acc1..c7c07cd8 100644 --- a/asm/Kyoto/Math/CTransform4f.s +++ b/asm/Kyoto/Math/CTransform4f.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CTransform4f_cpp + .section .text, "ax" .global GetInverse__12CTransform4fCFv diff --git a/asm/Kyoto/Math/CVector2f.s b/asm/Kyoto/Math/CVector2f.s index c0c85e25..b3f8f8a0 100644 --- a/asm/Kyoto/Math/CVector2f.s +++ b/asm/Kyoto/Math/CVector2f.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CVector2f_cpp + .section .sbss, "wa" # skZero2f .global lbl_805A9458 diff --git a/asm/Kyoto/Math/CVector3f.s b/asm/Kyoto/Math/CVector3f.s index 5bca0083..28941bc2 100644 --- a/asm/Kyoto/Math/CVector3f.s +++ b/asm/Kyoto/Math/CVector3f.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CVector3f_cpp + .section .text, "ax" .global IsEqu__9CVector3fCFRC9CVector3ff diff --git a/asm/Kyoto/Math/CloseEnough.s b/asm/Kyoto/Math/CloseEnough.s index 8f0122f4..e441b78f 100644 --- a/asm/Kyoto/Math/CloseEnough.s +++ b/asm/Kyoto/Math/CloseEnough.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CloseEnough_cpp + .section .sbss, "wa" .global lbl_805A9440 diff --git a/asm/Kyoto/Particles/CElementGen.s b/asm/Kyoto/Particles/CElementGen.s index ad421bf3..65587b54 100644 --- a/asm/Kyoto/Particles/CElementGen.s +++ b/asm/Kyoto/Particles/CElementGen.s @@ -2,6 +2,10 @@ #TODO: Resplit, this has CIntElement, CModVectorElement and CParticleDataFactory in it, that can't be right +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CElementGen_cpp + .section .data .global lbl_803EDA80 diff --git a/asm/Kyoto/rstl/RstlExtras.s b/asm/Kyoto/rstl/RstlExtras.s index 4c3f54dd..6a34b0d1 100644 --- a/asm/Kyoto/rstl/RstlExtras.s +++ b/asm/Kyoto/rstl/RstlExtras.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_RstlExtras_cpp + .section .bss .global lbl_804BFF30 diff --git a/asm/Kyoto/rstl/rstl_strings.s b/asm/Kyoto/rstl/rstl_strings.s index b43edb07..77ad407d 100644 --- a/asm/Kyoto/rstl/rstl_strings.s +++ b/asm/Kyoto/rstl/rstl_strings.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_rstl_strings_cpp + .section .sbss, "wa" .global "_EmptyString__Q24rstl66basic_string,Q24rstl17rmemory_allocator>" diff --git a/asm/MetaRender/CCubeRenderer.s b/asm/MetaRender/CCubeRenderer.s index 6f092676..b97152f2 100644 --- a/asm/MetaRender/CCubeRenderer.s +++ b/asm/MetaRender/CCubeRenderer.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CCubeRenderer_cpp + .section .sbss, "wa" .global lbl_805A91B0 diff --git a/asm/MetroidPrime/BodyState/CBSLocomotion.s b/asm/MetroidPrime/BodyState/CBSLocomotion.s index ff8cf2ef..71abfc09 100644 --- a/asm/MetroidPrime/BodyState/CBSLocomotion.s +++ b/asm/MetroidPrime/BodyState/CBSLocomotion.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CBSFlyerLocomotion_cpp + .section .data .global lbl_803E14C0 diff --git a/asm/MetroidPrime/CAnimData.s b/asm/MetroidPrime/CAnimData.s index 3a549367..e9c2b6b5 100644 --- a/asm/MetroidPrime/CAnimData.s +++ b/asm/MetroidPrime/CAnimData.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CAnimData_cpp + .section .data # These belong in Kyoto/Animation/C*POINode # Thanks to ODR they wound up here diff --git a/asm/MetroidPrime/CArtifactDoll.s b/asm/MetroidPrime/CArtifactDoll.s index 8743138d..19132f2a 100644 --- a/asm/MetroidPrime/CArtifactDoll.s +++ b/asm/MetroidPrime/CArtifactDoll.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CArtifactDoll_cpp + .section .sdata .global lbl_805A85D0 diff --git a/asm/MetroidPrime/CAxisAngle.s b/asm/MetroidPrime/CAxisAngle.s index ad212621..88e6a8f4 100644 --- a/asm/MetroidPrime/CAxisAngle.s +++ b/asm/MetroidPrime/CAxisAngle.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CAxisAngle_cpp + .section .text, "ax" .global __pl__FRC10CAxisAngleRC10CAxisAngle diff --git a/asm/MetroidPrime/CCollisionActor.s b/asm/MetroidPrime/CCollisionActor.s index 093a2c7a..5fd879e6 100644 --- a/asm/MetroidPrime/CCollisionActor.s +++ b/asm/MetroidPrime/CCollisionActor.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CCollisionActor_cpp + .section .data .global lbl_803E4B18 diff --git a/asm/MetroidPrime/CControlMapper.s b/asm/MetroidPrime/CControlMapper.s index 7125e6cc..c6c5a307 100644 --- a/asm/MetroidPrime/CControlMapper.s +++ b/asm/MetroidPrime/CControlMapper.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CControlMapper_cpp + .section .data .global lbl_803D8EB8 diff --git a/asm/MetroidPrime/CDamageVulnerability.s b/asm/MetroidPrime/CDamageVulnerability.s index 33703228..55fee149 100644 --- a/asm/MetroidPrime/CDamageVulnerability.s +++ b/asm/MetroidPrime/CDamageVulnerability.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CDamageVulnerability_cpp + .section .text, "ax" .global GetDeflectionType__20CDamageVulnerabilityCFRC11CWeaponMode diff --git a/asm/MetroidPrime/CDecalManager.s b/asm/MetroidPrime/CDecalManager.s index 17a2f09d..ae1f4d2c 100644 --- a/asm/MetroidPrime/CDecalManager.s +++ b/asm/MetroidPrime/CDecalManager.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CDecalManager_cpp + .section .bss .global lbl_8046C558 diff --git a/asm/MetroidPrime/CEntity.s b/asm/MetroidPrime/CEntity.s index f25a5071..f71769cf 100644 --- a/asm/MetroidPrime/CEntity.s +++ b/asm/MetroidPrime/CEntity.s @@ -1,9 +1,13 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CEntity_cpp + .section .data -.global lbl_803D9E30 -lbl_803D9E30: +.global __vt__7CEntity +__vt__7CEntity: # ROM: 0x3D6E30 .4byte 0 .4byte 0 @@ -185,9 +189,9 @@ __dt__7CEntityFv: /* 80051288 0004E1E8 93 C1 00 18 */ stw r30, 0x18(r1) /* 8005128C 0004E1EC 7C 7E 1B 79 */ or. r30, r3, r3 /* 80051290 0004E1F0 41 82 00 78 */ beq lbl_80051308 -/* 80051294 0004E1F4 3C 60 80 3E */ lis r3, lbl_803D9E30@ha +/* 80051294 0004E1F4 3C 60 80 3E */ lis r3, __vt__7CEntity@ha /* 80051298 0004E1F8 34 1E 00 20 */ addic. r0, r30, 0x20 -/* 8005129C 0004E1FC 38 03 9E 30 */ addi r0, r3, lbl_803D9E30@l +/* 8005129C 0004E1FC 38 03 9E 30 */ addi r0, r3, __vt__7CEntity@l /* 800512A0 0004E200 90 1E 00 00 */ stw r0, 0(r30) /* 800512A4 0004E204 41 82 00 44 */ beq lbl_800512E8 /* 800512A8 0004E208 80 1E 00 24 */ lwz r0, 0x24(r30) @@ -231,9 +235,9 @@ lbl_80051308: "__ct__7CEntityF9TUniqueIdRC11CEntityInfobRCQ24rstl66basic_string,Q24rstl17rmemory_allocator>": /* 80051324 0004E284 94 21 FF E0 */ stwu r1, -0x20(r1) /* 80051328 0004E288 7C 08 02 A6 */ mflr r0 -/* 8005132C 0004E28C 3D 00 80 3E */ lis r8, lbl_803D9E30@ha +/* 8005132C 0004E28C 3D 00 80 3E */ lis r8, __vt__7CEntity@ha /* 80051330 0004E290 90 01 00 24 */ stw r0, 0x24(r1) -/* 80051334 0004E294 38 08 9E 30 */ addi r0, r8, lbl_803D9E30@l +/* 80051334 0004E294 38 08 9E 30 */ addi r0, r8, __vt__7CEntity@l /* 80051338 0004E298 93 E1 00 1C */ stw r31, 0x1c(r1) /* 8005133C 0004E29C 7C DF 33 78 */ mr r31, r6 /* 80051340 0004E2A0 93 C1 00 18 */ stw r30, 0x18(r1) diff --git a/asm/MetroidPrime/CEulerAngles.s b/asm/MetroidPrime/CEulerAngles.s index 8889df6b..90dc38e7 100644 --- a/asm/MetroidPrime/CEulerAngles.s +++ b/asm/MetroidPrime/CEulerAngles.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CEulerAngles_cpp + .section .sdata2, "a" .global lbl_805A9F78 diff --git a/asm/MetroidPrime/CFrontEndUI.s b/asm/MetroidPrime/CFrontEndUI.s index d1baf66a..51061726 100644 --- a/asm/MetroidPrime/CFrontEndUI.s +++ b/asm/MetroidPrime/CFrontEndUI.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CFrontEndUI_cpp + .section .data .global lbl_803D9810 diff --git a/asm/MetroidPrime/CMFGame.s b/asm/MetroidPrime/CMFGame.s index 81836128..c86bf458 100644 --- a/asm/MetroidPrime/CMFGame.s +++ b/asm/MetroidPrime/CMFGame.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CMFGame_cpp + .section .bss .global lbl_8045A1A8 diff --git a/asm/MetroidPrime/CMapArea.s b/asm/MetroidPrime/CMapArea.s index 775b7c65..3b264548 100644 --- a/asm/MetroidPrime/CMapArea.s +++ b/asm/MetroidPrime/CMapArea.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CMapArea_cpp + .section .data .global lbl_803DAB80 diff --git a/asm/MetroidPrime/CMappableObject.s b/asm/MetroidPrime/CMappableObject.s index 3e1a003d..0f54e775 100644 --- a/asm/MetroidPrime/CMappableObject.s +++ b/asm/MetroidPrime/CMappableObject.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CMappableObject_cpp + .section .data .global lbl_803DFC10 diff --git a/asm/MetroidPrime/CModelData.s b/asm/MetroidPrime/CModelData.s index bbf01687..c249caf0 100644 --- a/asm/MetroidPrime/CModelData.s +++ b/asm/MetroidPrime/CModelData.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CModelData_cpp + .section .bss .global lbl_8046C538 diff --git a/asm/MetroidPrime/CSamusDoll.s b/asm/MetroidPrime/CSamusDoll.s index 4655f55e..58b5dc28 100644 --- a/asm/MetroidPrime/CSamusDoll.s +++ b/asm/MetroidPrime/CSamusDoll.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CSamusDoll_cpp + .section .sdata .global lbl_805A72C8 diff --git a/asm/MetroidPrime/CSlideShow.s b/asm/MetroidPrime/CSlideShow.s index 0af52d88..9b82608a 100644 --- a/asm/MetroidPrime/CSlideShow.s +++ b/asm/MetroidPrime/CSlideShow.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CSlideShow_cpp + .section .data .global lbl_803EBFB8 diff --git a/asm/MetroidPrime/CTargetReticles.s b/asm/MetroidPrime/CTargetReticles.s index ac3e26fa..ae5eebba 100644 --- a/asm/MetroidPrime/CTargetReticles.s +++ b/asm/MetroidPrime/CTargetReticles.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CTargetReticles_cpp + .section .sdata .global lbl_805A7230 diff --git a/asm/MetroidPrime/CWorld.s b/asm/MetroidPrime/CWorld.s index a2bc3cc4..89a6e99b 100644 --- a/asm/MetroidPrime/CWorld.s +++ b/asm/MetroidPrime/CWorld.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CWorld_cpp + .section .data .global lbl_803D9FC0 diff --git a/asm/MetroidPrime/Cameras/CBallCamera.s b/asm/MetroidPrime/Cameras/CBallCamera.s index 02a064dd..7ff27b64 100644 --- a/asm/MetroidPrime/Cameras/CBallCamera.s +++ b/asm/MetroidPrime/Cameras/CBallCamera.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CBallCamera_cpp + .section .data .global lbl_803DAB90 diff --git a/asm/MetroidPrime/Cameras/CCameraFilter.s b/asm/MetroidPrime/Cameras/CCameraFilter.s index 144125d8..d8ddfd6e 100644 --- a/asm/MetroidPrime/Cameras/CCameraFilter.s +++ b/asm/MetroidPrime/Cameras/CCameraFilter.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CCameraFilter_cpp + .section .data .global lbl_803DFCC0 diff --git a/asm/MetroidPrime/Cameras/CCameraShakeData.s b/asm/MetroidPrime/Cameras/CCameraShakeData.s index 907782ad..ee794ddb 100644 --- a/asm/MetroidPrime/Cameras/CCameraShakeData.s +++ b/asm/MetroidPrime/Cameras/CCameraShakeData.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CCameraShakeData_cpp + .section .sdata .global lbl_805A7888 diff --git a/asm/MetroidPrime/Cameras/CPathCamera.s b/asm/MetroidPrime/Cameras/CPathCamera.s index 0a06bdeb..c8c67571 100644 --- a/asm/MetroidPrime/Cameras/CPathCamera.s +++ b/asm/MetroidPrime/Cameras/CPathCamera.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CPathCamera_cpp + .section .data .global lbl_803E0C68 diff --git a/asm/MetroidPrime/Enemies/CAi.s b/asm/MetroidPrime/Enemies/CAi.s index 72243368..963a7e53 100644 --- a/asm/MetroidPrime/Enemies/CAi.s +++ b/asm/MetroidPrime/Enemies/CAi.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CAi_cpp + .section .data .global lbl_803DAF58 diff --git a/asm/MetroidPrime/Enemies/CBabygoth.s b/asm/MetroidPrime/Enemies/CBabygoth.s index 31ea4d40..c4bc0f0f 100644 --- a/asm/MetroidPrime/Enemies/CBabygoth.s +++ b/asm/MetroidPrime/Enemies/CBabygoth.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CBabygoth_cpp + .section .data diff --git a/asm/MetroidPrime/Enemies/CBurrower.s b/asm/MetroidPrime/Enemies/CBurrower.s index e3d63cc0..a88f70df 100644 --- a/asm/MetroidPrime/Enemies/CBurrower.s +++ b/asm/MetroidPrime/Enemies/CBurrower.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CBurrower_cpp + .section .data .global lbl_803EA790 diff --git a/asm/MetroidPrime/Enemies/CChozoGhost.s b/asm/MetroidPrime/Enemies/CChozoGhost.s index 22f01b35..7c375a57 100644 --- a/asm/MetroidPrime/Enemies/CChozoGhost.s +++ b/asm/MetroidPrime/Enemies/CChozoGhost.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CChozoGhost_cpp + .section .data diff --git a/asm/MetroidPrime/Enemies/CElitePirate.s b/asm/MetroidPrime/Enemies/CElitePirate.s index f5f1a112..d3ca83c0 100644 --- a/asm/MetroidPrime/Enemies/CElitePirate.s +++ b/asm/MetroidPrime/Enemies/CElitePirate.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CElitePirate_cpp + .section .data diff --git a/asm/MetroidPrime/Enemies/CFireFlea.s b/asm/MetroidPrime/Enemies/CFireFlea.s index 99f96c99..724dd944 100644 --- a/asm/MetroidPrime/Enemies/CFireFlea.s +++ b/asm/MetroidPrime/Enemies/CFireFlea.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CFireFlea_cpp + .section .data .global lbl_803E1C88 diff --git a/asm/MetroidPrime/Enemies/CFlaahgra.s b/asm/MetroidPrime/Enemies/CFlaahgra.s index 19600fd9..9ae1a60f 100644 --- a/asm/MetroidPrime/Enemies/CFlaahgra.s +++ b/asm/MetroidPrime/Enemies/CFlaahgra.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CFlaahgra_cpp + .section .data .global lbl_803E4D08 diff --git a/asm/MetroidPrime/Enemies/CFlyingPirate.s b/asm/MetroidPrime/Enemies/CFlyingPirate.s index 2aa9413c..f36c92d5 100644 --- a/asm/MetroidPrime/Enemies/CFlyingPirate.s +++ b/asm/MetroidPrime/Enemies/CFlyingPirate.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CFlyingPirate_cpp + .section .data .global lbl_803E67E8 diff --git a/asm/MetroidPrime/Enemies/CGrenadeLauncher.s b/asm/MetroidPrime/Enemies/CGrenadeLauncher.s index 53e8e4af..6c5168e6 100644 --- a/asm/MetroidPrime/Enemies/CGrenadeLauncher.s +++ b/asm/MetroidPrime/Enemies/CGrenadeLauncher.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CGrenadeLauncher_cpp + .section .data .global lbl_803E7F58 lbl_803E7F58: diff --git a/asm/MetroidPrime/Enemies/CIceSheegoth.s b/asm/MetroidPrime/Enemies/CIceSheegoth.s index bacef5bd..7d1d9cbe 100644 --- a/asm/MetroidPrime/Enemies/CIceSheegoth.s +++ b/asm/MetroidPrime/Enemies/CIceSheegoth.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CIceSheegoth_cpp + .section .data .global lbl_803E4728 diff --git a/asm/MetroidPrime/Enemies/CMagdolite.s b/asm/MetroidPrime/Enemies/CMagdolite.s index b6525eba..121b8e72 100644 --- a/asm/MetroidPrime/Enemies/CMagdolite.s +++ b/asm/MetroidPrime/Enemies/CMagdolite.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CMagdolite_cpp + .section .data .global lbl_803E81A0 diff --git a/asm/MetroidPrime/Enemies/CMetroid.s b/asm/MetroidPrime/Enemies/CMetroid.s index 8650feac..e09f9294 100644 --- a/asm/MetroidPrime/Enemies/CMetroid.s +++ b/asm/MetroidPrime/Enemies/CMetroid.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CMetroid_cpp + .section .data .global lbl_803E3AD8 diff --git a/asm/MetroidPrime/Enemies/CMetroidBeta.s b/asm/MetroidPrime/Enemies/CMetroidBeta.s index b3a9ea03..ffe8f083 100644 --- a/asm/MetroidPrime/Enemies/CMetroidBeta.s +++ b/asm/MetroidPrime/Enemies/CMetroidBeta.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CMetroidBeta_cpp + .section .data .global lbl_803E5388 diff --git a/asm/MetroidPrime/Enemies/CMetroidPrimeEssence.s b/asm/MetroidPrime/Enemies/CMetroidPrimeEssence.s index 00160eb2..7e63527b 100644 --- a/asm/MetroidPrime/Enemies/CMetroidPrimeEssence.s +++ b/asm/MetroidPrime/Enemies/CMetroidPrimeEssence.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CMetroidPrimeEssence_cpp + .section .data .global lbl_803EB1F0 diff --git a/asm/MetroidPrime/Enemies/CMetroidPrimeExo.s b/asm/MetroidPrime/Enemies/CMetroidPrimeExo.s index 4c7c8873..929a4b7b 100644 --- a/asm/MetroidPrime/Enemies/CMetroidPrimeExo.s +++ b/asm/MetroidPrime/Enemies/CMetroidPrimeExo.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CMetroidPrimeExo_cpp + .section .data .global lbl_803EAA90 diff --git a/asm/MetroidPrime/Enemies/CParasite.s b/asm/MetroidPrime/Enemies/CParasite.s index 583ce57a..f801c33c 100644 --- a/asm/MetroidPrime/Enemies/CParasite.s +++ b/asm/MetroidPrime/Enemies/CParasite.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CParasite_cpp + .section .data .global lbl_803E2FF8 diff --git a/asm/MetroidPrime/Enemies/CPatterned.s b/asm/MetroidPrime/Enemies/CPatterned.s index ce782a3d..c11af0ad 100644 --- a/asm/MetroidPrime/Enemies/CPatterned.s +++ b/asm/MetroidPrime/Enemies/CPatterned.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CPatterned_cpp + .section .data .global lbl_803DA5C8 diff --git a/asm/MetroidPrime/Enemies/CPuddleToadGamma.s b/asm/MetroidPrime/Enemies/CPuddleToadGamma.s index 5184e04f..097630ed 100644 --- a/asm/MetroidPrime/Enemies/CPuddleToadGamma.s +++ b/asm/MetroidPrime/Enemies/CPuddleToadGamma.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CPuddleToadGamma_cpp + .section .data .global lbl_803E24E0 diff --git a/asm/MetroidPrime/Enemies/CRidley.s b/asm/MetroidPrime/Enemies/CRidley.s index 9901bc17..f4cad9b9 100644 --- a/asm/MetroidPrime/Enemies/CRidley.s +++ b/asm/MetroidPrime/Enemies/CRidley.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CRidley_cpp + .section .data diff --git a/asm/MetroidPrime/Enemies/CSpacePirate.s b/asm/MetroidPrime/Enemies/CSpacePirate.s index 46598fe6..c6b77868 100644 --- a/asm/MetroidPrime/Enemies/CSpacePirate.s +++ b/asm/MetroidPrime/Enemies/CSpacePirate.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CSpacePirate_cpp + .section .data .global lbl_803E0700 diff --git a/asm/MetroidPrime/Enemies/CThardus.s b/asm/MetroidPrime/Enemies/CThardus.s index 37db6073..cca76280 100644 --- a/asm/MetroidPrime/Enemies/CThardus.s +++ b/asm/MetroidPrime/Enemies/CThardus.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CThardus_cpp + .section .data .global lbl_803E5CE0 diff --git a/asm/MetroidPrime/Enemies/CTryclops.s b/asm/MetroidPrime/Enemies/CTryclops.s index 6dab1f4c..a4950c3e 100644 --- a/asm/MetroidPrime/Enemies/CTryclops.s +++ b/asm/MetroidPrime/Enemies/CTryclops.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CTryclops_cpp + .section .data .global lbl_803E9A10 diff --git a/asm/MetroidPrime/HUD/CSamusHud.s b/asm/MetroidPrime/HUD/CSamusHud.s index f88e53e9..bbd83569 100644 --- a/asm/MetroidPrime/HUD/CSamusHud.s +++ b/asm/MetroidPrime/HUD/CSamusHud.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CSamusHud_cpp + .section .data .global lbl_803DA298 diff --git a/asm/MetroidPrime/Player/CMorphBall.s b/asm/MetroidPrime/Player/CMorphBall.s index 653ddd4f..fbbb2648 100644 --- a/asm/MetroidPrime/Player/CMorphBall.s +++ b/asm/MetroidPrime/Player/CMorphBall.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CMorphBall_cpp + .section .sdata .global lbl_805A73E8 diff --git a/asm/MetroidPrime/Player/CPlayer.s b/asm/MetroidPrime/Player/CPlayer.s index 4d90fe26..80dd2c2a 100644 --- a/asm/MetroidPrime/Player/CPlayer.s +++ b/asm/MetroidPrime/Player/CPlayer.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CPlayer_cpp + .section .data .global lbl_803D96E8 lbl_803D96E8: diff --git a/asm/MetroidPrime/Player/CPlayerCameraBob.s b/asm/MetroidPrime/Player/CPlayerCameraBob.s index 213283bf..24ba7be5 100644 --- a/asm/MetroidPrime/Player/CPlayerCameraBob.s +++ b/asm/MetroidPrime/Player/CPlayerCameraBob.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CPlayerCameraBob_cpp + .section .sdata .global lbl_805A7378 diff --git a/asm/MetroidPrime/Player/CPlayerDynamics.s b/asm/MetroidPrime/Player/CPlayerDynamics.s index f52466b7..79d0ce7e 100644 --- a/asm/MetroidPrime/Player/CPlayerDynamics.s +++ b/asm/MetroidPrime/Player/CPlayerDynamics.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CPlayerDynamics_cpp + .section .sdata .global lbl_805A84E8 diff --git a/asm/MetroidPrime/Player/CPlayerGun.s b/asm/MetroidPrime/Player/CPlayerGun.s index 9ec1aaa1..abe5b985 100644 --- a/asm/MetroidPrime/Player/CPlayerGun.s +++ b/asm/MetroidPrime/Player/CPlayerGun.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CPlayerGun_cpp + .section .data .global lbl_803D9D50 lbl_803D9D50: diff --git a/asm/MetroidPrime/Player/CPlayerOrbit.s b/asm/MetroidPrime/Player/CPlayerOrbit.s index bdf7474d..79f50f2b 100644 --- a/asm/MetroidPrime/Player/CPlayerOrbit.s +++ b/asm/MetroidPrime/Player/CPlayerOrbit.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CPlayerOrbit_cpp + .section .sdata .global lbl_805A7A08 diff --git a/asm/MetroidPrime/Player/CSamusFaceReflection.s b/asm/MetroidPrime/Player/CSamusFaceReflection.s index dde320be..f6967a00 100644 --- a/asm/MetroidPrime/Player/CSamusFaceReflection.s +++ b/asm/MetroidPrime/Player/CSamusFaceReflection.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CSamusFaceReflection_cpp + .section .sdata .global lbl_805A7868 diff --git a/asm/MetroidPrime/Player/CWorldLayerState.s b/asm/MetroidPrime/Player/CWorldLayerState.s index e302d80a..26fc386b 100644 --- a/asm/MetroidPrime/Player/CWorldLayerState.s +++ b/asm/MetroidPrime/Player/CWorldLayerState.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CScriptLayerManager_cpp + .section .sdata .global lbl_805A8200 diff --git a/asm/MetroidPrime/RumbleFxTable.s b/asm/MetroidPrime/RumbleFxTable.s index 8183c9a2..92afc6b8 100644 --- a/asm/MetroidPrime/RumbleFxTable.s +++ b/asm/MetroidPrime/RumbleFxTable.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_RumbleFxTable_cpp + .section .text, "ax" .global __sinit_RumbleFxTable_cpp diff --git a/asm/MetroidPrime/ScriptObjects/CScriptCameraPitchVolume.s b/asm/MetroidPrime/ScriptObjects/CScriptCameraPitchVolume.s index c05fbe1d..e7bdfe45 100644 --- a/asm/MetroidPrime/ScriptObjects/CScriptCameraPitchVolume.s +++ b/asm/MetroidPrime/ScriptObjects/CScriptCameraPitchVolume.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CScriptCameraPitchVolume_cpp + .section .data .global lbl_803E7A70 diff --git a/asm/MetroidPrime/ScriptObjects/CScriptGunTurret.s b/asm/MetroidPrime/ScriptObjects/CScriptGunTurret.s index 7867f49f..b1d85789 100644 --- a/asm/MetroidPrime/ScriptObjects/CScriptGunTurret.s +++ b/asm/MetroidPrime/ScriptObjects/CScriptGunTurret.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CScriptGunTurret_cpp + .section .data .global lbl_803E71D0 diff --git a/asm/MetroidPrime/ScriptObjects/CScriptRoomAcoustics.s b/asm/MetroidPrime/ScriptObjects/CScriptRoomAcoustics.s index f5cc4d0c..13b4f5a5 100644 --- a/asm/MetroidPrime/ScriptObjects/CScriptRoomAcoustics.s +++ b/asm/MetroidPrime/ScriptObjects/CScriptRoomAcoustics.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CScriptRoomAcoustics_cpp + .section .data .global lbl_803E4708 diff --git a/asm/MetroidPrime/ScriptObjects/CScriptSpindleCamera.s b/asm/MetroidPrime/ScriptObjects/CScriptSpindleCamera.s index ab08492a..272b5036 100644 --- a/asm/MetroidPrime/ScriptObjects/CScriptSpindleCamera.s +++ b/asm/MetroidPrime/ScriptObjects/CScriptSpindleCamera.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CScriptSpindleCamera_cpp + .section .data .global lbl_803E8670 diff --git a/asm/MetroidPrime/TGameTypes.s b/asm/MetroidPrime/TGameTypes.s index 5b2b1266..b46af0b2 100644 --- a/asm/MetroidPrime/TGameTypes.s +++ b/asm/MetroidPrime/TGameTypes.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_TGameTypes_cpp + .section .sbss # TGameTypes diff --git a/asm/MetroidPrime/Weapons/CEnergyProjectile.s b/asm/MetroidPrime/Weapons/CEnergyProjectile.s index cb389dba..c33dcbae 100644 --- a/asm/MetroidPrime/Weapons/CEnergyProjectile.s +++ b/asm/MetroidPrime/Weapons/CEnergyProjectile.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CEnergyProjectile_cpp + .section .data .global lbl_803E7158 diff --git a/asm/MetroidPrime/Weapons/CFlameThrower.s b/asm/MetroidPrime/Weapons/CFlameThrower.s index ac972ed3..fbf43109 100644 --- a/asm/MetroidPrime/Weapons/CFlameThrower.s +++ b/asm/MetroidPrime/Weapons/CFlameThrower.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CFlameThrower_cpp + .section .data .global lbl_803E45D8 diff --git a/asm/MetroidPrime/Weapons/CNewFlameThrower.s b/asm/MetroidPrime/Weapons/CNewFlameThrower.s index c860fa07..16fa8974 100644 --- a/asm/MetroidPrime/Weapons/CNewFlameThrower.s +++ b/asm/MetroidPrime/Weapons/CNewFlameThrower.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CNewFlameThrower_cpp + .section .data .global lbl_803E9D10 diff --git a/asm/MetroidPrime/Weapons/CPlasmaBeam.s b/asm/MetroidPrime/Weapons/CPlasmaBeam.s index baf6efa6..07d990df 100644 --- a/asm/MetroidPrime/Weapons/CPlasmaBeam.s +++ b/asm/MetroidPrime/Weapons/CPlasmaBeam.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CPlasmaBeam_cpp + .section .data .global lbl_803DF710 diff --git a/asm/MetroidPrime/Weapons/CPlasmaProjectile.s b/asm/MetroidPrime/Weapons/CPlasmaProjectile.s index 1e959b0c..32cb6633 100644 --- a/asm/MetroidPrime/Weapons/CPlasmaProjectile.s +++ b/asm/MetroidPrime/Weapons/CPlasmaProjectile.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CPlasmaProjectile_cpp + .section .data .global lbl_803E3F00 diff --git a/asm/MetroidPrime/Weapons/CPowerBomb.s b/asm/MetroidPrime/Weapons/CPowerBomb.s index ec6558b8..600b9697 100644 --- a/asm/MetroidPrime/Weapons/CPowerBomb.s +++ b/asm/MetroidPrime/Weapons/CPowerBomb.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CPowerBomb_cpp + .section .data .global lbl_803E2808 diff --git a/asm/MetroidPrime/Weapons/CWaveBeam.s b/asm/MetroidPrime/Weapons/CWaveBeam.s index 97dc5daf..195f3a87 100644 --- a/asm/MetroidPrime/Weapons/CWaveBeam.s +++ b/asm/MetroidPrime/Weapons/CWaveBeam.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CWaveBeam_cpp + .section .data .global lbl_803DF7A0 diff --git a/asm/MetroidPrime/Weapons/CWaveBuster.s b/asm/MetroidPrime/Weapons/CWaveBuster.s index 52ce274e..93bb37b1 100644 --- a/asm/MetroidPrime/Weapons/CWaveBuster.s +++ b/asm/MetroidPrime/Weapons/CWaveBuster.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CWaveBuster_cpp + .section .data .global lbl_803E5318 diff --git a/asm/Runtime/NMWException.s b/asm/Runtime/NMWException.s index 0a453725..9dfa929b 100644 --- a/asm/Runtime/NMWException.s +++ b/asm/Runtime/NMWException.s @@ -160,3 +160,47 @@ lbl_803898DC: /* 803898F0 00386850 7C 08 03 A6 */ mtlr r0 /* 803898F4 00386854 38 21 00 20 */ addi r1, r1, 0x20 /* 803898F8 00386858 4E 80 00 20 */ blr + +.section extab_, "wa" # 0x800035A0 - 0x800035E0 +.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 __dt__26__partial_array_destructorFv +.global __partial_array_destructor_extab +__partial_array_destructor_extab: + .4byte 0x18080000 + .4byte 0 + +.section extabindex_, "wa" # 0x800035E0 - 0x80003640 +lbl_extabindex: + # ROM: 0x3C8160 + .4byte __destroy_arr + .4byte 0x00000078 + .4byte __destroy_arr_extab + .4byte __construct_array + .4byte 0x000000F8 + .4byte __construct_array_extab + .4byte __dt__26__partial_array_destructorFv + .4byte 0x000000B8 + .4byte __partial_array_destructor_extab + +.global lbl_80003604 +lbl_80003604: + # ROM: 0x3C8184 + .4byte lbl_extabindex + .4byte lbl_80003604 + .4byte __destroy_arr + .4byte 0x00000228 + .4byte 0 + .4byte 0 + .4byte 0 + .4byte 0 diff --git a/asm/Runtime/__init_cpp_exceptions.s b/asm/Runtime/__init_cpp_exceptions.s index 0641604a..2e272a36 100644 --- a/asm/Runtime/__init_cpp_exceptions.s +++ b/asm/Runtime/__init_cpp_exceptions.s @@ -12,12 +12,12 @@ __fini_cpp_exceptions: /* 8038A0EC 0038704C 94 21 FF F0 */ stwu r1, -0x10(r1) /* 8038A0F0 00387050 7C 08 02 A6 */ mflr r0 /* 8038A0F4 00387054 90 01 00 14 */ stw r0, 0x14(r1) -/* 8038A0F8 00387058 80 6D 9F C8 */ lwz r3, lbl_805A8B88@sda21(r13) +/* 8038A0F8 00387058 80 6D 9F C8 */ lwz r3, fragmentID@sda21(r13) /* 8038A0FC 0038705C 2C 03 FF FE */ cmpwi r3, -2 /* 8038A100 00387060 41 82 00 10 */ beq lbl_8038A110 /* 8038A104 00387064 48 00 00 5D */ bl __unregister_fragment /* 8038A108 00387068 38 00 FF FE */ li r0, -2 -/* 8038A10C 0038706C 90 0D 9F C8 */ stw r0, lbl_805A8B88@sda21(r13) +/* 8038A10C 0038706C 90 0D 9F C8 */ stw r0, fragmentID@sda21(r13) lbl_8038A110: /* 8038A110 00387070 80 01 00 14 */ lwz r0, 0x14(r1) /* 8038A114 00387074 7C 08 03 A6 */ mtlr r0 @@ -29,7 +29,7 @@ __init_cpp_exceptions: /* 8038A120 00387080 94 21 FF F0 */ stwu r1, -0x10(r1) /* 8038A124 00387084 7C 08 02 A6 */ mflr r0 /* 8038A128 00387088 90 01 00 14 */ stw r0, 0x14(r1) -/* 8038A12C 0038708C 80 0D 9F C8 */ lwz r0, lbl_805A8B88@sda21(r13) +/* 8038A12C 0038708C 80 0D 9F C8 */ lwz r0, fragmentID@sda21(r13) /* 8038A130 00387090 2C 00 FF FE */ cmpwi r0, -2 /* 8038A134 00387094 40 82 00 1C */ bne lbl_8038A150 /* 8038A138 00387098 4B FF FF AD */ bl GetR2__Fv @@ -37,9 +37,28 @@ __init_cpp_exceptions: /* 8038A140 003870A0 7C 64 1B 78 */ mr r4, r3 /* 8038A144 003870A4 38 65 36 04 */ addi r3, r5, lbl_80003604@l /* 8038A148 003870A8 48 00 00 4D */ bl __register_fragment -/* 8038A14C 003870AC 90 6D 9F C8 */ stw r3, lbl_805A8B88@sda21(r13) +/* 8038A14C 003870AC 90 6D 9F C8 */ stw r3, fragmentID@sda21(r13) lbl_8038A150: /* 8038A150 003870B0 80 01 00 14 */ lwz r0, 0x14(r1) /* 8038A154 003870B4 7C 08 03 A6 */ mtlr r0 /* 8038A158 003870B8 38 21 00 10 */ addi r1, r1, 0x10 /* 8038A15C 003870BC 4E 80 00 20 */ blr + +.section .ctors, "wa" +.global __init_cpp_exceptions_reference +__init_cpp_exceptions_reference: + # ROM: 0x3C81C0 + .4byte __init_cpp_exceptions + +.section .dtors, "wa" +.global __destroy_global_chain_reference +__destroy_global_chain_reference: + .4byte __destroy_global_chain +.global __fini_cpp_exceptions_reference +__fini_cpp_exceptions_reference: + .4byte __fini_cpp_exceptions + +.section .sdata, "wa" +fragmentID: + .4byte 0xFFFFFFFE + .4byte 0 diff --git a/asm/Runtime/abort_exit.s b/asm/Runtime/abort_exit.s index f6d91d73..07d74c7e 100644 --- a/asm/Runtime/abort_exit.s +++ b/asm/Runtime/abort_exit.s @@ -31,8 +31,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, __destroy_global_chain_reference@ha -/* 8038A1EC 0038714C 38 03 B3 80 */ addi r0, r3, __destroy_global_chain_reference@l +/* 8038A1E8 00387148 3C 60 80 3D */ lis r3, _dtors@ha +/* 8038A1EC 0038714C 38 03 B3 80 */ addi r0, r3, _dtors@l /* 8038A1F0 00387150 7C 1F 03 78 */ mr r31, r0 /* 8038A1F4 00387154 48 00 00 10 */ b lbl_8038A204 lbl_8038A1F8: diff --git a/asm/Runtime/global_destructor_chain.s b/asm/Runtime/global_destructor_chain.s index 79f05329..fa082955 100644 --- a/asm/Runtime/global_destructor_chain.s +++ b/asm/Runtime/global_destructor_chain.s @@ -1,11 +1,5 @@ .include "macros.inc" -.section .sbss -.balign 4 -.global lbl_805A99B0 -lbl_805A99B0: - .skip 0x8 - .section .text, "ax" .global __destroy_global_chain @@ -17,13 +11,13 @@ __destroy_global_chain: lbl_80389654: /* 80389654 003865B4 80 03 00 00 */ lwz r0, 0(r3) /* 80389658 003865B8 38 80 FF FF */ li r4, -1 -/* 8038965C 003865BC 90 0D AD F0 */ stw r0, lbl_805A99B0@sda21(r13) +/* 8038965C 003865BC 90 0D AD F0 */ stw r0, __global_destructor_chain@sda21(r13) /* 80389660 003865C0 81 83 00 04 */ lwz r12, 4(r3) /* 80389664 003865C4 80 63 00 08 */ lwz r3, 8(r3) /* 80389668 003865C8 7D 89 03 A6 */ mtctr r12 /* 8038966C 003865CC 4E 80 04 21 */ bctrl lbl_80389670: -/* 80389670 003865D0 80 6D AD F0 */ lwz r3, lbl_805A99B0@sda21(r13) +/* 80389670 003865D0 80 6D AD F0 */ lwz r3, __global_destructor_chain@sda21(r13) /* 80389674 003865D4 28 03 00 00 */ cmplwi r3, 0 /* 80389678 003865D8 40 82 FF DC */ bne lbl_80389654 /* 8038967C 003865DC 80 01 00 14 */ lwz r0, 0x14(r1) @@ -33,9 +27,18 @@ lbl_80389670: .global __register_global_object __register_global_object: -/* 8038968C 003865EC 80 0D AD F0 */ lwz r0, lbl_805A99B0@sda21(r13) +/* 8038968C 003865EC 80 0D AD F0 */ lwz r0, __global_destructor_chain@sda21(r13) /* 80389690 003865F0 90 05 00 00 */ stw r0, 0(r5) /* 80389694 003865F4 90 85 00 04 */ stw r4, 4(r5) /* 80389698 003865F8 90 65 00 08 */ stw r3, 8(r5) -/* 8038969C 003865FC 90 AD AD F0 */ stw r5, lbl_805A99B0@sda21(r13) +/* 8038969C 003865FC 90 AD AD F0 */ stw r5, __global_destructor_chain@sda21(r13) /* 803896A0 00386600 4E 80 00 20 */ blr + +.section .dtors, "wa" # 0x8036FF80 - 0x8036FFA0 +__destroy_global_chain_reference: + .4byte __destroy_global_chain + +.section .sbss +.balign 4 +__global_destructor_chain: + .skip 0x8 diff --git a/asm/Runtime/sdata.s b/asm/Runtime/sdata.s index c81019ea..095ebf17 100644 --- a/asm/Runtime/sdata.s +++ b/asm/Runtime/sdata.s @@ -1,11 +1,6 @@ .section .sdata # TODO: Split this -.global lbl_805A8B88 -lbl_805A8B88: - # ROM: 0x3F6528 - .4byte 0xFFFFFFFE - .4byte 0 .global lbl_805A8B90 lbl_805A8B90: diff --git a/asm/Weapons/CDecal.s b/asm/Weapons/CDecal.s index 411fc2b4..58d566ed 100644 --- a/asm/Weapons/CDecal.s +++ b/asm/Weapons/CDecal.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CDecal_cpp + .section .sbss, "wa" .global sDecalRandom__6CDecal diff --git a/asm/Weapons/IWeaponRenderer.s b/asm/Weapons/IWeaponRenderer.s index 873c932a..25488458 100644 --- a/asm/Weapons/IWeaponRenderer.s +++ b/asm/Weapons/IWeaponRenderer.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_IWeaponRenderer_cpp + .section .data .global lbl_803EC528 diff --git a/asm/WorldFormat/CWorldLight.s b/asm/WorldFormat/CWorldLight.s index 3c47ec8a..edf4671e 100644 --- a/asm/WorldFormat/CWorldLight.s +++ b/asm/WorldFormat/CWorldLight.s @@ -1,5 +1,9 @@ .include "macros.inc" +.section .ctors, "wa" +lbl_ctor: +.4byte __sinit_CWorldLight_cpp + .section .sdata .global lbl_805A8610 diff --git a/asm/ctors.s b/asm/ctors.s deleted file mode 100644 index 38d2c687..00000000 --- a/asm/ctors.s +++ /dev/null @@ -1,560 +0,0 @@ -.include "macros.inc" - -.section .bss, "wa" - -.global lbl_8056A5A0 -lbl_8056A5A0: - .skip 0x48 -.global lbl_8056A5E8 -lbl_8056A5E8: - .skip 0xC -.global lbl_8056A5F4 -lbl_8056A5F4: - .skip 0xC -.global lbl_8056A600 -lbl_8056A600: - .skip 0x17F4 -.global lbl_8056BDF4 -lbl_8056BDF4: - .skip 0x4C4 -.global lbl_8056C2B8 -lbl_8056C2B8: - .skip 0x734 -.global lbl_8056C9EC -lbl_8056C9EC: - .skip 0x554 -.global lbl_8056CF40 -lbl_8056CF40: - .skip 0x4C4 -.global lbl_8056D404 -lbl_8056D404: - .skip 0xC -.global lbl_8056D410 -lbl_8056D410: - .skip 0x10 -.global lbl_8056D420 -lbl_8056D420: - .skip 0xD4 -.global lbl_8056D4F4 -lbl_8056D4F4: - .skip 0x84 -.global lbl_8056D578 -lbl_8056D578: - .skip 0x1A0 -.global lbl_8056D718 -lbl_8056D718: - .skip 0x68 -.global lbl_8056D780 -lbl_8056D780: - .skip 0x68 -.global lbl_8056D7E8 -lbl_8056D7E8: - .skip 0x68 -.global lbl_8056D850 -lbl_8056D850: - .skip 0x1F08 -.global lbl_8056F758 -lbl_8056F758: - .skip 0x104 -.global lbl_8056F85C -lbl_8056F85C: - .skip 0x38 -.global lbl_8056F894 -lbl_8056F894: - .skip 0x10 -.global lbl_8056F8A4 -lbl_8056F8A4: - .skip 0x10 -.global lbl_8056F8B4 -lbl_8056F8B4: - .skip 0x750 -.global lbl_80570004 -lbl_80570004: - .skip 0x948 -.global lbl_8057094C -lbl_8057094C: - .skip 0x1000 -.global lbl_8057194C -lbl_8057194C: - .skip 0x40 -.global lbl_8057198C -lbl_8057198C: - .skip 0x40 -.global lbl_805719CC -lbl_805719CC: - .skip 0x10 -.global lbl_805719DC -lbl_805719DC: - .skip 0xC -.global lbl_805719E8 -lbl_805719E8: - .skip 0x1A8 -.global lbl_80571B90 -lbl_80571B90: - .skip 0xD4 -.global lbl_80571C64 -lbl_80571C64: - .skip 0x208 -.global lbl_80571E6C -lbl_80571E6C: - .skip 0x68 -.global lbl_80571ED4 -lbl_80571ED4: - .skip 0x68 -.global lbl_80571F3C -lbl_80571F3C: - .skip 0x68 -.global lbl_80571FA4 -lbl_80571FA4: - .skip 0x68 -.global lbl_8057200C -lbl_8057200C: - .skip 0xC -.global lbl_80572018 -lbl_80572018: - .skip 0xC -.global lbl_80572024 -lbl_80572024: - .skip 0x18 -.global lbl_8057203C -lbl_8057203C: - .skip 0xC -.global lbl_80572048 -lbl_80572048: - .skip 0x18 -.global lbl_80572060 -lbl_80572060: - .skip 0xC -.global lbl_8057206C -lbl_8057206C: - .skip 0xC -.global lbl_80572078 -lbl_80572078: - .skip 0x60 -.global lbl_805720D8 -lbl_805720D8: - .skip 0x10 -.global lbl_805720E8 -lbl_805720E8: - .skip 0x10 -.global lbl_805720F8 -lbl_805720F8: - .skip 0x10 -.global lbl_80572108 -lbl_80572108: - .skip 0x10 -.global lbl_80572118 -lbl_80572118: - .skip 0x10 -.global lbl_80572128 -lbl_80572128: - .skip 0xC -.global lbl_80572134 -lbl_80572134: - .skip 0xC -.global lbl_80572140 -lbl_80572140: - .skip 0x2A0 -.global lbl_805723E0 -lbl_805723E0: - .skip 0x18 -.global lbl_805723F8 -lbl_805723F8: - .skip 0xC -.global lbl_80572404 -lbl_80572404: - .skip 0x110 -.global lbl_80572514 -lbl_80572514: - .skip 0x10 -.global lbl_80572524 -lbl_80572524: - .skip 0x10 -.global lbl_80572534 -lbl_80572534: - .skip 0x10 -.global lbl_80572544 -lbl_80572544: - .skip 0x68 -.global lbl_805725AC -lbl_805725AC: - .skip 0x68 -.global lbl_80572614 -lbl_80572614: - .skip 0x74 -.global lbl_80572688 -lbl_80572688: - .skip 0xC -.global lbl_80572694 -lbl_80572694: - .skip 0x68 -.global lbl_805726FC -lbl_805726FC: - .skip 0x4B0 -.global lbl_80572BAC -lbl_80572BAC: - .skip 0x19000 -.global lbl_8058BBAC -lbl_8058BBAC: - .skip 0xC000 -.global lbl_80597BAC -lbl_80597BAC: - .skip 0x8000 -.global lbl_8059FBAC -lbl_8059FBAC: - .skip 0x18 -.global lbl_8059FBC4 -lbl_8059FBC4: - .skip 0xC -.global lbl_8059FBD0 -lbl_8059FBD0: - .skip 0xA8 -.global lbl_8059FC78 -lbl_8059FC78: - .skip 0x18 -.global lbl_8059FC90 -lbl_8059FC90: - .skip 0x18 -.global lbl_8059FCA8 -lbl_8059FCA8: - .skip 0x18 -.global lbl_8059FCC0 -lbl_8059FCC0: - .skip 0x18 -.global lbl_8059FCD8 -lbl_8059FCD8: - .skip 0x18 -.global lbl_8059FCF0 -lbl_8059FCF0: - .skip 0x18 -.global lbl_8059FD08 -lbl_8059FD08: - .skip 0x10 -.global lbl_8059FD18 -lbl_8059FD18: - .skip 0x18 -.global mData__10CStopwatch -mData__10CStopwatch: - .skip 0x18 -.global lbl_8059FD48 -lbl_8059FD48: - .skip 0x2BC -.global lbl_805A0004 -lbl_805A0004: - .skip 0x2B5C -.global lbl_805A2B60 -lbl_805A2B60: - .skip 0x1604 -.global lbl_805A4164 -lbl_805A4164: - .skip 0xA04 -.global lbl_805A4B68 -lbl_805A4B68: - .skip 0x1E0 -.global lbl_805A4D48 -lbl_805A4D48: - .skip 0x9C -.global lbl_805A4DE4 -lbl_805A4DE4: - .skip 0x154 -.global lbl_805A4F38 -lbl_805A4F38: - .skip 0x60 -.global lbl_805A4F98 -lbl_805A4F98: - .skip 0x1E0 -.global lbl_805A5178 -lbl_805A5178: - .skip 0x9C -.global lbl_805A5214 -lbl_805A5214: - .skip 0x154 -.global lbl_805A5368 -lbl_805A5368: - .skip 0x60 -.global kDefaultPosition__6CLight -kDefaultPosition__6CLight: - .skip 0x18 -.global kDefaultDirection__6CLight -kDefaultDirection__6CLight: - .skip 0xC -.global lbl_805A53EC -lbl_805A53EC: - .skip 0x260 -.global lbl_805A564C -lbl_805A564C: - .skip 0x4C -.global lbl_805A5698 -lbl_805A5698: - .skip 0x7D8 -.global lbl_805A5E70 -lbl_805A5E70: - .skip 0x4C -.global lbl_805A5EBC -lbl_805A5EBC: - .skip 0x4C -.global lbl_805A5F08 -lbl_805A5F08: - .skip 0x4C -.global lbl_805A5F54 -lbl_805A5F54: - .skip 0x4C -.global lbl_805A5FA0 -lbl_805A5FA0: - .skip 0x4C -.global lbl_805A5FEC -lbl_805A5FEC: - .skip 0x4C -.global lbl_805A6038 -lbl_805A6038: - .skip 0x4C -.global lbl_805A6084 -lbl_805A6084: - .skip 0x4C -.global lbl_805A60D0 -lbl_805A60D0: - .skip 0xA0 -.global lbl_805A6170 -lbl_805A6170: - .skip 0x30 -.global lbl_805A61A0 -lbl_805A61A0: - .skip 0xC -.global lbl_805A61AC -lbl_805A61AC: - .skip 0xC -.global lbl_805A61B8 -lbl_805A61B8: - .skip 0x1C -.global lbl_805A61D4 -lbl_805A61D4: - .skip 0x30 -.global lbl_805A6204 -lbl_805A6204: - .skip 0x30 -.global lbl_805A6234 -lbl_805A6234: - .skip 0xC -.global lbl_805A6240 -lbl_805A6240: - .skip 0x200 -.global lbl_805A6440 -lbl_805A6440: - .skip 0x80 -.global lbl_805A64C0 -lbl_805A64C0: - .skip 0x40 -.global lbl_805A6500 -lbl_805A6500: - .skip 0x3C -.global lbl_805A653C -lbl_805A653C: - .skip 0x30 -.global lbl_805A656C -lbl_805A656C: - .skip 0x30 -.global lbl_805A659C -lbl_805A659C: - .skip 0x30 -.global lbl_805A65CC -lbl_805A65CC: - .skip 0x30 -.global lbl_805A65FC -lbl_805A65FC: - .skip 0x24 -.global lbl_805A6620 -lbl_805A6620: - .skip 0x40 -.global lbl_805A6660 -lbl_805A6660: - .skip 0x10 -.global skIdentity4f -skIdentity4f: - .skip 0x30 -.global skZero3f -skZero3f: - .skip 0xC -.skip 0x48 -.global lbl_805A66F4 -lbl_805A66F4: - .skip 0xC -.global lbl_805A6700 -lbl_805A6700: - .skip 0xC -.global lbl_805A670C -lbl_805A670C: - .skip 0xC -.global lbl_805A6718 -lbl_805A6718: - .skip 0xC -.global lbl_805A6724 -lbl_805A6724: - .skip 0xC -.global lbl_805A6730 -lbl_805A6730: - .skip 0xC -.global lbl_805A673C -lbl_805A673C: - .skip 0x18 -.global lbl_805A6754 -lbl_805A6754: - .skip 0x30 -.global lbl_805A6784 -lbl_805A6784: - .skip 0x18 -.global lbl_805A679C -lbl_805A679C: - .skip 0x18 -.global lbl_805A67B4 -lbl_805A67B4: - .skip 0xC -.global lbl_805A67C0 -lbl_805A67C0: - .skip 0xC -.global lbl_805A67CC -lbl_805A67CC: - .skip 0x10 -.global lbl_805A67DC -lbl_805A67DC: - .skip 0x20 -.global lbl_805A67FC -lbl_805A67FC: - .skip 0x10 -.global lbl_805A680C -lbl_805A680C: - .skip 0x1C -.global lbl_805A6828 -lbl_805A6828: - .skip 0x38 -.global lbl_805A6860 -lbl_805A6860: - .skip 0x300 -.global lbl_805A6B60 -lbl_805A6B60: - .skip 0x30 -.global lbl_805A6B90 -lbl_805A6B90: - .skip 0x10 -.global lbl_805A6BA0 -lbl_805A6BA0: - .skip 0x4 -.global lbl_805A6BA8 -lbl_805A6BA8: - .skip 0xC - -.section .ctors, "wa" # 0x803CB1C0 - 0x803CB380 -.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 __sinit_CPlayerDynamics_cpp - .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 __sinit_CElementGen_cpp - .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_CFrameDelayedKiller_cpp - .4byte 0 diff --git a/asm/dtors.s b/asm/dtors.s index 6aef9864..7b5cab32 100644 --- a/asm/dtors.s +++ b/asm/dtors.s @@ -1,10 +1,443 @@ .include "macros.inc" -.section .dtors, "wa" # 0x803CB380 - 0x803CB3A0 -.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 +.section .bss, "wa" + +.global lbl_8056A5A0 +lbl_8056A5A0: + .skip 0x48 +.global lbl_8056A5E8 +lbl_8056A5E8: + .skip 0xC +.global lbl_8056A5F4 +lbl_8056A5F4: + .skip 0xC +.global lbl_8056A600 +lbl_8056A600: + .skip 0x17F4 +.global lbl_8056BDF4 +lbl_8056BDF4: + .skip 0x4C4 +.global lbl_8056C2B8 +lbl_8056C2B8: + .skip 0x734 +.global lbl_8056C9EC +lbl_8056C9EC: + .skip 0x554 +.global lbl_8056CF40 +lbl_8056CF40: + .skip 0x4C4 +.global lbl_8056D404 +lbl_8056D404: + .skip 0xC +.global lbl_8056D410 +lbl_8056D410: + .skip 0x10 +.global lbl_8056D420 +lbl_8056D420: + .skip 0xD4 +.global lbl_8056D4F4 +lbl_8056D4F4: + .skip 0x84 +.global lbl_8056D578 +lbl_8056D578: + .skip 0x1A0 +.global lbl_8056D718 +lbl_8056D718: + .skip 0x68 +.global lbl_8056D780 +lbl_8056D780: + .skip 0x68 +.global lbl_8056D7E8 +lbl_8056D7E8: + .skip 0x68 +.global lbl_8056D850 +lbl_8056D850: + .skip 0x1F08 +.global lbl_8056F758 +lbl_8056F758: + .skip 0x104 +.global lbl_8056F85C +lbl_8056F85C: + .skip 0x38 +.global lbl_8056F894 +lbl_8056F894: + .skip 0x10 +.global lbl_8056F8A4 +lbl_8056F8A4: + .skip 0x10 +.global lbl_8056F8B4 +lbl_8056F8B4: + .skip 0x750 +.global lbl_80570004 +lbl_80570004: + .skip 0x948 +.global lbl_8057094C +lbl_8057094C: + .skip 0x1000 +.global lbl_8057194C +lbl_8057194C: + .skip 0x40 +.global lbl_8057198C +lbl_8057198C: + .skip 0x40 +.global lbl_805719CC +lbl_805719CC: + .skip 0x10 +.global lbl_805719DC +lbl_805719DC: + .skip 0xC +.global lbl_805719E8 +lbl_805719E8: + .skip 0x1A8 +.global lbl_80571B90 +lbl_80571B90: + .skip 0xD4 +.global lbl_80571C64 +lbl_80571C64: + .skip 0x208 +.global lbl_80571E6C +lbl_80571E6C: + .skip 0x68 +.global lbl_80571ED4 +lbl_80571ED4: + .skip 0x68 +.global lbl_80571F3C +lbl_80571F3C: + .skip 0x68 +.global lbl_80571FA4 +lbl_80571FA4: + .skip 0x68 +.global lbl_8057200C +lbl_8057200C: + .skip 0xC +.global lbl_80572018 +lbl_80572018: + .skip 0xC +.global lbl_80572024 +lbl_80572024: + .skip 0x18 +.global lbl_8057203C +lbl_8057203C: + .skip 0xC +.global lbl_80572048 +lbl_80572048: + .skip 0x18 +.global lbl_80572060 +lbl_80572060: + .skip 0xC +.global lbl_8057206C +lbl_8057206C: + .skip 0xC +.global lbl_80572078 +lbl_80572078: + .skip 0x60 +.global lbl_805720D8 +lbl_805720D8: + .skip 0x10 +.global lbl_805720E8 +lbl_805720E8: + .skip 0x10 +.global lbl_805720F8 +lbl_805720F8: + .skip 0x10 +.global lbl_80572108 +lbl_80572108: + .skip 0x10 +.global lbl_80572118 +lbl_80572118: + .skip 0x10 +.global lbl_80572128 +lbl_80572128: + .skip 0xC +.global lbl_80572134 +lbl_80572134: + .skip 0xC +.global lbl_80572140 +lbl_80572140: + .skip 0x2A0 +.global lbl_805723E0 +lbl_805723E0: + .skip 0x18 +.global lbl_805723F8 +lbl_805723F8: + .skip 0xC +.global lbl_80572404 +lbl_80572404: + .skip 0x110 +.global lbl_80572514 +lbl_80572514: + .skip 0x10 +.global lbl_80572524 +lbl_80572524: + .skip 0x10 +.global lbl_80572534 +lbl_80572534: + .skip 0x10 +.global lbl_80572544 +lbl_80572544: + .skip 0x68 +.global lbl_805725AC +lbl_805725AC: + .skip 0x68 +.global lbl_80572614 +lbl_80572614: + .skip 0x74 +.global lbl_80572688 +lbl_80572688: + .skip 0xC +.global lbl_80572694 +lbl_80572694: + .skip 0x68 +.global lbl_805726FC +lbl_805726FC: + .skip 0x4B0 +.global lbl_80572BAC +lbl_80572BAC: + .skip 0x19000 +.global lbl_8058BBAC +lbl_8058BBAC: + .skip 0xC000 +.global lbl_80597BAC +lbl_80597BAC: + .skip 0x8000 +.global lbl_8059FBAC +lbl_8059FBAC: + .skip 0x18 +.global lbl_8059FBC4 +lbl_8059FBC4: + .skip 0xC +.global lbl_8059FBD0 +lbl_8059FBD0: + .skip 0xA8 +.global lbl_8059FC78 +lbl_8059FC78: + .skip 0x18 +.global lbl_8059FC90 +lbl_8059FC90: + .skip 0x18 +.global lbl_8059FCA8 +lbl_8059FCA8: + .skip 0x18 +.global lbl_8059FCC0 +lbl_8059FCC0: + .skip 0x18 +.global lbl_8059FCD8 +lbl_8059FCD8: + .skip 0x18 +.global lbl_8059FCF0 +lbl_8059FCF0: + .skip 0x18 +.global lbl_8059FD08 +lbl_8059FD08: + .skip 0x10 +.global lbl_8059FD18 +lbl_8059FD18: + .skip 0x18 +.global mData__10CStopwatch +mData__10CStopwatch: + .skip 0x18 +.global lbl_8059FD48 +lbl_8059FD48: + .skip 0x2BC +.global lbl_805A0004 +lbl_805A0004: + .skip 0x2B5C +.global lbl_805A2B60 +lbl_805A2B60: + .skip 0x1604 +.global lbl_805A4164 +lbl_805A4164: + .skip 0xA04 +.global lbl_805A4B68 +lbl_805A4B68: + .skip 0x1E0 +.global lbl_805A4D48 +lbl_805A4D48: + .skip 0x9C +.global lbl_805A4DE4 +lbl_805A4DE4: + .skip 0x154 +.global lbl_805A4F38 +lbl_805A4F38: + .skip 0x60 +.global lbl_805A4F98 +lbl_805A4F98: + .skip 0x1E0 +.global lbl_805A5178 +lbl_805A5178: + .skip 0x9C +.global lbl_805A5214 +lbl_805A5214: + .skip 0x154 +.global lbl_805A5368 +lbl_805A5368: + .skip 0x60 +.global kDefaultPosition__6CLight +kDefaultPosition__6CLight: + .skip 0x18 +.global kDefaultDirection__6CLight +kDefaultDirection__6CLight: + .skip 0xC +.global lbl_805A53EC +lbl_805A53EC: + .skip 0x260 +.global lbl_805A564C +lbl_805A564C: + .skip 0x4C +.global lbl_805A5698 +lbl_805A5698: + .skip 0x7D8 +.global lbl_805A5E70 +lbl_805A5E70: + .skip 0x4C +.global lbl_805A5EBC +lbl_805A5EBC: + .skip 0x4C +.global lbl_805A5F08 +lbl_805A5F08: + .skip 0x4C +.global lbl_805A5F54 +lbl_805A5F54: + .skip 0x4C +.global lbl_805A5FA0 +lbl_805A5FA0: + .skip 0x4C +.global lbl_805A5FEC +lbl_805A5FEC: + .skip 0x4C +.global lbl_805A6038 +lbl_805A6038: + .skip 0x4C +.global lbl_805A6084 +lbl_805A6084: + .skip 0x4C +.global lbl_805A60D0 +lbl_805A60D0: + .skip 0xA0 +.global lbl_805A6170 +lbl_805A6170: + .skip 0x30 +.global lbl_805A61A0 +lbl_805A61A0: + .skip 0xC +.global lbl_805A61AC +lbl_805A61AC: + .skip 0xC +.global lbl_805A61B8 +lbl_805A61B8: + .skip 0x1C +.global lbl_805A61D4 +lbl_805A61D4: + .skip 0x30 +.global lbl_805A6204 +lbl_805A6204: + .skip 0x30 +.global lbl_805A6234 +lbl_805A6234: + .skip 0xC +.global lbl_805A6240 +lbl_805A6240: + .skip 0x200 +.global lbl_805A6440 +lbl_805A6440: + .skip 0x80 +.global lbl_805A64C0 +lbl_805A64C0: + .skip 0x40 +.global lbl_805A6500 +lbl_805A6500: + .skip 0x3C +.global lbl_805A653C +lbl_805A653C: + .skip 0x30 +.global lbl_805A656C +lbl_805A656C: + .skip 0x30 +.global lbl_805A659C +lbl_805A659C: + .skip 0x30 +.global lbl_805A65CC +lbl_805A65CC: + .skip 0x30 +.global lbl_805A65FC +lbl_805A65FC: + .skip 0x24 +.global lbl_805A6620 +lbl_805A6620: + .skip 0x40 +.global lbl_805A6660 +lbl_805A6660: + .skip 0x10 +.global skIdentity4f +skIdentity4f: + .skip 0x30 +.global skZero3f +skZero3f: + .skip 0xC +.skip 0x48 +.global lbl_805A66F4 +lbl_805A66F4: + .skip 0xC +.global lbl_805A6700 +lbl_805A6700: + .skip 0xC +.global lbl_805A670C +lbl_805A670C: + .skip 0xC +.global lbl_805A6718 +lbl_805A6718: + .skip 0xC +.global lbl_805A6724 +lbl_805A6724: + .skip 0xC +.global lbl_805A6730 +lbl_805A6730: + .skip 0xC +.global lbl_805A673C +lbl_805A673C: + .skip 0x18 +.global lbl_805A6754 +lbl_805A6754: + .skip 0x30 +.global lbl_805A6784 +lbl_805A6784: + .skip 0x18 +.global lbl_805A679C +lbl_805A679C: + .skip 0x18 +.global lbl_805A67B4 +lbl_805A67B4: + .skip 0xC +.global lbl_805A67C0 +lbl_805A67C0: + .skip 0xC +.global lbl_805A67CC +lbl_805A67CC: + .skip 0x10 +.global lbl_805A67DC +lbl_805A67DC: + .skip 0x20 +.global lbl_805A67FC +lbl_805A67FC: + .skip 0x10 +.global lbl_805A680C +lbl_805A680C: + .skip 0x1C +.global lbl_805A6828 +lbl_805A6828: + .skip 0x38 +.global lbl_805A6860 +lbl_805A6860: + .skip 0x300 +.global lbl_805A6B60 +lbl_805A6B60: + .skip 0x30 +.global lbl_805A6B90 +lbl_805A6B90: + .skip 0x10 +.global lbl_805A6BA0 +lbl_805A6BA0: + .skip 0x4 +.global lbl_805A6BA8 +lbl_805A6BA8: + .skip 0xC diff --git a/asm/extab.s b/asm/extab.s deleted file mode 100644 index 53890eae..00000000 --- a/asm/extab.s +++ /dev/null @@ -1,20 +0,0 @@ -.include "macros.inc" - -.section .extab, "wa" # 0x800035A0 - 0x800035E0 -.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 __dt__26__partial_array_destructorFv -.global __partial_array_destructor_extab -__partial_array_destructor_extab: - .4byte 0x18080000 - .4byte 0 diff --git a/asm/extabindex.s b/asm/extabindex.s deleted file mode 100644 index 821c5ce3..00000000 --- a/asm/extabindex.s +++ /dev/null @@ -1,26 +0,0 @@ -.include "macros.inc" - -.section .extabindex, "wa" # 0x800035E0 - 0x80003640 -lbl_extabindex: - # ROM: 0x3C8160 - .4byte __destroy_arr - .4byte 0x00000078 - .4byte __destroy_arr_extab - .4byte __construct_array - .4byte 0x000000F8 - .4byte __construct_array_extab - .4byte __dt__26__partial_array_destructorFv - .4byte 0x000000B8 - .4byte __partial_array_destructor_extab - -.global lbl_80003604 -lbl_80003604: - # ROM: 0x3C8184 - .4byte lbl_extabindex - .4byte lbl_80003604 - .4byte __destroy_arr - .4byte 0x00000228 - .4byte 0 - .4byte 0 - .4byte 0 - .4byte 0 diff --git a/asm/os/__ppc_eabi_init_text.s b/asm/os/__ppc_eabi_init_text.s index 3484b277..6ef1a0f9 100644 --- a/asm/os/__ppc_eabi_init_text.s +++ b/asm/os/__ppc_eabi_init_text.s @@ -21,8 +21,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, __init_cpp_exceptions_reference@ha -/* 80385858 003827B8 38 03 B1 C0 */ addi r0, r3, __init_cpp_exceptions_reference@l +/* 80385854 003827B4 3C 60 80 3D */ lis r3, _ctors@ha +/* 80385858 003827B8 38 03 B1 C0 */ addi r0, r3, _ctors@l /* 8038585C 003827BC 7C 1F 03 78 */ mr r31, r0 /* 80385860 003827C0 48 00 00 04 */ b lbl_80385864 lbl_80385864: diff --git a/ldscript.lcf b/ldscript.lcf index 63e9299a..5ca8cc44 100644 --- a/ldscript.lcf +++ b/ldscript.lcf @@ -8,8 +8,9 @@ SECTIONS GROUP: { .init ALIGN(0x20):{} - .extab ALIGN(0x20):{} - .extabindex ALIGN(0x20):{} + /* TODO: should be extab and extabindex */ + extab_ ALIGN(0x20):{} + extabindex_ ALIGN(0x20):{} .text ALIGN(0x20):{} .ctors ALIGN(0x20):{} .dtors ALIGN(0x20):{} @@ -34,10 +35,7 @@ SECTIONS FORCEFILES { - ctors.o - dtors.o - extab.o - extabindex.o + __init_cpp_exceptions.o uart_console_io.o mslsupp.o CBallFilter.o @@ -66,4 +64,6 @@ FORCEFILES CFactoryStore.o CFontImageDef.o CImageInstruction.o + RumbleFxTable.o + CGuiWidgetDrawParms.o } diff --git a/obj_files.mk b/obj_files.mk index feffa4d8..bd1c5e90 100644 --- a/obj_files.mk +++ b/obj_files.mk @@ -709,8 +709,7 @@ OS_FILES :=\ $(BUILD_DIR)/asm/Dolphin/os/OSThread.o\ $(BUILD_DIR)/asm/Dolphin/os/OSTime.o\ $(BUILD_DIR)/asm/os/__ppc_eabi_init_text.o - - + PAD_FILES :=\ $(BUILD_DIR)/asm/Dolphin/pad/PadClamp.o\ $(BUILD_DIR)/asm/Dolphin/pad/pad.o @@ -719,7 +718,6 @@ VI_FILES :=\ $(BUILD_DIR)/asm/Dolphin/vi.o MSL_PPCEABI_BARE_H :=\ - $(BUILD_DIR)/asm/Runtime/sdata.o\ $(BUILD_DIR)/asm/Runtime/__va_arg.o\ $(BUILD_DIR)/asm/Runtime/global_destructor_chain.o\ $(BUILD_DIR)/asm/Runtime/CPlusLibPPC.o\ @@ -727,6 +725,7 @@ MSL_PPCEABI_BARE_H :=\ $(BUILD_DIR)/asm/Runtime/ptmf.o\ $(BUILD_DIR)/asm/Runtime/runtime.o\ $(BUILD_DIR)/asm/Runtime/__init_cpp_exceptions.o\ + $(BUILD_DIR)/asm/Runtime/sdata.o\ $(BUILD_DIR)/asm/Runtime/Gecko_ExceptionPPC.o\ $(BUILD_DIR)/asm/Runtime/abort_exit.o\ $(BUILD_DIR)/asm/Runtime/alloc.o\ @@ -853,15 +852,6 @@ GBA_FILES :=\ $(BUILD_DIR)/asm/Dolphin/GBA/GBAWrite.o\ $(BUILD_DIR)/asm/Dolphin/GBA/GBAXfer.o\ $(BUILD_DIR)/asm/Dolphin/GBA/GBAKey.o - -EXTAB_O_FILES :=\ - $(BUILD_DIR)/asm/extab.o - -EXTABINDEX_O_FILES :=\ - $(BUILD_DIR)/asm/extabindex.o - -CTORS_O_FILES :=\ - $(BUILD_DIR)/asm/ctors.o DTORS_O_FILES :=\ $(BUILD_DIR)/asm/dtors.o