Skip to content

Instantly share code, notes, and snippets.

@ribbanya
Last active February 1, 2024 22:38
Show Gist options
  • Save ribbanya/7f26572fc42b6d1e9a81ee925bee979c to your computer and use it in GitHub Desktop.
Save ribbanya/7f26572fc42b6d1e9a81ee925bee979c to your computer and use it in GitHub Desktop.
Entry point: 0x8000522C
Sections:
Name | Address | Size | File Off
.init | 0x80003100 | 0x240C | 0x100
extab | 0x80005520 | 0x190 | 0x3B3E20
extabindex | 0x800056C0 | 0x278 | 0x3B3FC0
.text | 0x80005940 | 0x3B18F0 | 0x2520
.ctors | 0x803B7240 | 0xC | 0x3B4240
.dtors | 0x803B7260 | 0x10 | 0x3B4260
.rodata | 0x803B7280 | 0x25A6 | 0x3B4280
.data | 0x803B9840 | 0x77E80 | 0x3B6840
.bss | 0x804316C0 | 0xA1FD4 | 0x0
.sdata | 0x804D36A0 | 0x2CFC | 0x42E6C0
.sbss | 0x804D63A0 | 0x1629 | 0x0
.data9 | 0x804D79E0 | 0x7220 | 0x4313C0
Discovered symbols:
Section | Address | Size | Name
.init | 0x80003100 | 0x30 | memset
.init | 0x80003130 | 0xC4 | __fill_mem
.init | 0x800031F4 | 0x50 | memcpy
.init | 0x80003298 | ? | gTRKInterruptVectorTable
.init | 0x800051CC | ? | gTRKInterruptVectorTableEnd
.init | 0x800051EC | 0x40 | __check_pad3
.init | 0x8000522C | 0x114 | __start
.init | 0x80005340 | 0x1C | __init_registers
.init | 0x8000535C | 0xC0 | __init_data
.init | 0x8000541C | 0x20 | __init_hardware
.init | 0x8000543C | 0x34 | __flush_cache
.init | 0x80005470 | 0x84 | _rom_copy_info
.init | 0x800054F4 | 0x18 | _bss_init_info
extabindex | 0x80005918 | 0x20 | _eti_init_info
.text | 0x8015FEB4 | 0x310 | main
.text | 0x80322620 | 0xF4 | __va_arg
.text | 0x80322714 | 0x48 | __destroy_global_chain
.text | 0x8032275C | 0x34 | __unregister_fragment
.text | 0x80322790 | 0x3C | __register_fragment
.text | 0x8032291C | 0xEC | __div2u
.text | 0x80322B40 | 0xE4 | __mod2u
.text | 0x80322F20 | 0x8 | GetR2__Fv
.text | 0x80322F28 | 0x34 | __fini_cpp_exceptions
.text | 0x80322F5C | 0x40 | __init_cpp_exceptions
.text | 0x80322F9C | 0x10C | exit
.text | 0x8032345C | 0xCC | __flush_buffer
.text | 0x80323528 | 0x34 | __prep_buffer
.text | 0x8032355C | 0x4 | __kill_critical_regions
.text | 0x803235B0 | 0x2DC | fwrite
.text | 0x8032388C | 0x3C | wcstombs
.text | 0x8032390C | 0x2C | memchr
.text | 0x80323CF0 | 0x4 | __stdio_atexit
.text | 0x80323E38 | 0x7C | vprintf
.text | 0x80323FEC | 0x58 | __FileWrite
.text | 0x80324044 | 0x630 | __pformatter
.text | 0x80324674 | 0x638 | float2str
.text | 0x80324DE0 | 0x2E0 | longlong2str
.text | 0x803250C0 | 0x224 | long2str
.text | 0x803252E4 | 0x4D8 | parse_format
.text | 0x80325878 | 0x30 | strchr
.text | 0x80325B04 | 0x20 | strlen
.text | 0x80326098 | 0x80 | fwide
.text | 0x80326714 | 0x28 | TRKHandleRequestEvent
.text | 0x8032673C | 0x20 | TRKHandleSupportEvent
.text | 0x8032675C | 0x2C | TRKIdle
.text | 0x80326788 | 0xF4 | TRKNubMainLoop
.text | 0x8032687C | 0x5C | TRKInitializeEventQueue
.text | 0x803268FC | 0xC0 | TRKGetNextEvent
.text | 0x80326AB4 | 0x24 | TRKDestructEvent
.text | 0x80326AD8 | 0xD4 | TRKInitializeNub
.text | 0x80326BAC | 0x24 | TRKTerminateNub
.text | 0x80326BD0 | 0x28 | TRKNubWelcome
.text | 0x80326BF8 | 0x74 | TRKInitializeEndian
.text | 0x80326C9C | 0x78 | TRKInitializeMessageBuffers
.text | 0x803275AC | 0x7C | TRKGetInput
.text | 0x80327678 | 0x24 | TRKInitializeSerialHandler
.text | 0x803276A4 | 0x4 | usr_put_initialize
.text | 0x803276A8 | 0x14 | TRKInitializeDispatcher
.text | 0x803299EC | 0x194 | TRKInterruptHandler
.text | 0x80329B80 | 0x9C | TRKExceptionHandler
.text | 0x80329C1C | 0xB0 | TRKPostInterruptEvent
.text | 0x80329DE4 | 0x64 | TRKTargetInterrupt
.text | 0x8032A618 | 0x10 | TRKTargetSetInputPendingPtr
.text | 0x8032A628 | 0x94 | InitMetroTRK
.text | 0x8032A818 | 0x50 | TRKInitializeTarget
.text | 0x8032A868 | 0x1B8 | TRKSaveExtended1Block
.text | 0x8032ABE0 | 0x48 | TRK_main
.text | 0x8032AC28 | 0x88 | TRKLoadContext
.text | 0x8032ACB0 | 0x38 | TRKEXICallBack
.text | 0x8032ACE8 | 0xE8 | InitMetroTRKCommTable
.text | 0x8032ADD0 | 0x4 | TRKUARTInterruptHandler
.text | 0x8032ADD4 | 0x40 | TRKInitializeIntDrivenUART
.text | 0x8032AF5C | 0x24 | TRK_board_display
.text | 0x8032AFB4 | 0x4 | EXI2_Init
.text | 0x8032AFB8 | 0x4 | EXI2_EnableInterrupts
.text | 0x8032AFBC | 0x8 | EXI2_Poll
.text | 0x8032AFC4 | 0x8 | EXI2_ReadN
.text | 0x8032AFCC | 0x8 | EXI2_WriteN
.text | 0x8032AFD4 | 0x4 | EXI2_Reserve
.text | 0x8032AFD8 | 0x4 | EXI2_Unreserve
.text | 0x8032AFDC | 0x8 | AMC_IsStub
.text | 0x8032B608 | 0x78 | DBInitComm
.text | 0x8032B680 | 0x54 | DBInitInterrupts
.text | 0x8032B6D4 | 0x9C | DBQueryData
.text | 0x8032B770 | 0x8C | DBRead
.text | 0x8032B7FC | 0x260 | DBWrite
.text | 0x8032BA5C | 0x4 | DBOpen
.text | 0x8032BA60 | 0x4 | DBClose
.text | 0x8032BA64 | 0x8 | Hu_IsStub
.text | 0x80335E5C | 0x8 | PPCMfmsr
.text | 0x80335E64 | 0x8 | PPCMtmsr
.text | 0x80335E6C | 0x8 | PPCMfhid0
.text | 0x80335E74 | 0x8 | PPCMfl2cr
.text | 0x80335E7C | 0x8 | PPCMtl2cr
.text | 0x80335E94 | 0x14 | PPCHalt
.text | 0x80335EA8 | 0x8 | PPCMfhid2
.text | 0x80335EB0 | 0x8 | PPCMthid2
.text | 0x80335EB8 | 0x8 | PPCMtwpar
.text | 0x80335EC0 | 0x28 | DBInit
.text | 0x80335F4C | 0x10 | __DBExceptionDestination
.text | 0x80335F78 | 0x50 | DBPrintf
.text | 0x8033A780 | 0x7C0 | GXInit
.text | 0x8033AF40 | 0x848 | __GXInitGX
.text | 0x8033B8C4 | 0x6C | GXInitFifoBase
.text | 0x8033B9AC | 0x110 | GXSetCPUFifo
.text | 0x8033BABC | 0x178 | GXSetGPFifo
.text | 0x8033BC34 | 0x4C | __GXFifoInit
.text | 0x8033CFD0 | 0x80 | __GXPEInit
.text | 0x8033F108 | 0x120 | GXInitTexCacheRegion
.text | 0x8033F228 | 0x48 | GXInitTlutRegion
.text | 0x8033F518 | 0x240 | __GXSetTmemConfig
.text | 0x8033FDA0 | 0x24 | __GXFlushTextureState
.text | 0x80342FC8 | 0x344 | OSInit
.text | 0x803436D4 | 0x38 | __OSPSInit
.text | 0x803446F0 | 0xD8 | __OSStopAudioSystem
.text | 0x803447C8 | 0x14 | DCEnable
.text | 0x8034490C | 0x10 | ICFlashInvalidate
.text | 0x8034491C | 0x14 | ICEnable
.text | 0x80344A34 | 0x28 | LCDisable
.text | 0x80344B44 | 0x98 | L2GlobalInvalidate
.text | 0x80344BDC | 0x160 | DMAErrorHandler
.text | 0x80344D3C | 0xF4 | __OSCacheInit
.text | 0x80345334 | 0x2A8 | OSDumpContext
.text | 0x803456A8 | 0x80 | OSReport
.text | 0x80345854 | 0x1C | OSSetErrorHandler
.text | 0x80347364 | 0x14 | OSDisableInterrupts
.text | 0x80348144 | 0x1CC | __OSReboot
.text | 0x80348394 | 0x70 | Reset
.text | 0x8034844C | 0x268 | OSResetSystem
.text | 0x80348D3C | 0x5C | __OSLockSram
.text | 0x803490FC | 0x24 | __OSUnlockSram
.text | 0x80349144 | 0x10 | __OSSyncSram
.text | 0x8034AD48 | 0x40 | OSDisableScheduler
.text | 0x8034AD88 | 0x40 | OSEnableScheduler
.text | 0x8034B460 | 0x1BC | OSCancelThread
.text | 0x8034CABC | 0x20 | __init_user
.text | 0x8034CADC | 0x54 | __init_cpp
.text | 0x8034CB30 | 0x20 | _ExitProcess
.text | 0x8034E8E8 | 0x7C | __PADDisableRecalibration
.ctors | 0x803B7240 | 0x0 | _ctors
.ctors | 0x803B7240 | 0x4 | __init_cpp_exceptions_reference
.dtors | 0x803B7260 | 0x0 | _dtors
.dtors | 0x803B7260 | 0x4 | __destroy_global_chain_reference
.dtors | 0x803B7264 | 0x4 | __fini_cpp_exceptions_reference
.data | 0x80400430 | 0xD8 | __files
.data | 0x80400854 | 0x10 | gTRKExceptionStatus
.data | 0x804008B8 | 0x1C | gDBCommTable
.bss | 0x804A2F38 | 0xC | fragmentinfo
.bss | 0x804A2F48 | 0x100 | atexit_funcs
.bss | 0x804A3048 | 0x100 | __atexit_funcs
.bss | 0x804A4B3C | 0x4 | gTRKInputPendingPtr
.bss | 0x804A4B48 | 0x2 | TRK_saved_exceptionID
.bss | 0x804A4B4C | 0x94 | gTRKSaveState
.bss | 0x804A4BF0 | 0xA4 | gTRKState
.bss | 0x804A4C98 | 0x430 | gTRKCPUState
.bss | 0x804A50D0 | 0x4 | TRK_mainError
.bss | 0x804A76C8 | 0x4F4 | gxData
.bss | 0x804A7D60 | 0x54 | Scb
.sdata | 0x804D5B40 | 0x4 | fragmentID
.sdata | 0x804D5BA8 | 0x4 | gx
.sbss | 0x804D7058 | 0x4 | __global_destructor_chain
.sbss | 0x804D7060 | 0x4 | __aborting
.sbss | 0x804D7064 | 0x4 | atexit_curr_func
.sbss | 0x804D7068 | 0x4 | __atexit_curr_func
.sbss | 0x804D706C | 0x4 | __stdio_exit
.sbss | 0x804D7070 | 0x4 | __console_exit
.sbss | 0x804D7208 | 0x4 | __DBInterface
.sbss | 0x804D720C | 0x4 | DBVerbose
.sbss | 0x804D72F0 | 0x4 | __piReg
.sbss | 0x804D72F4 | 0x4 | __cpReg
.sbss | 0x804D72F8 | 0x4 | __peReg
.sbss | 0x804D72FC | 0x4 | __memReg
.sbss | 0x804D73A0 | 0x8 | ResetFunctionQueue
ABS | 0x804DB6A0 | 0x0 | _SDA_BASE_
ABS | 0x804DF9E0 | 0x0 | _SDA2_BASE_
ABS | 0x804EEC00 | 0x0 | _stack_addr
ABS | 0x804F0C00 | 0x0 | _db_stack_addr
54 discovered functions from exception table
❯ git rev-parse HEAD
8daa8eb261ccd111d7595bc73405607b2fb4cd5d
❯ dtk --version
dtk 0.7.2 4a84975648334144cba47a93867bec9ebbe9b9d7
❯ RUST_BACKTRACE=1 dtk dol split config/GALE01/config.yml build/GALE01
INFO Loading config/GALE01/config.yml
INFO Loading and analyzing 1 module (using 1 thread)
INFO Initial analysis completed in 12.511s (found 19830 functions)
INFO Rebuilding relocations and splitting
Failed: While processing object 'main.dol' (module ID 0)
Caused by:
Mismatched splits for .ctors 4:0x803B7244 (dolphin/os/init/__ppc_eabi_init.c) and function 3:0x80326578 (MSL/trig
f.c)
Stack backtrace:
0: anyhow::error::<impl anyhow::Error>::msg
at /REDACTED/.cargo/registry/src/index.crates.io-6f17d22bba15001f/anyhow-1.0.79/src/error.rs:83:36
1: dtk::util::split::split_ctors_dtors
at /REDACTED/.cargo/git/checkouts/decomp-toolkit-67de3bdb1343cc99/4a84975/src/util/split.rs:53:17
2: dtk::util::split::update_splits
at /REDACTED/.cargo/git/checkouts/decomp-toolkit-67de3bdb1343cc99/4a84975/src/util/split.rs:752:9
3: dtk::cmd::dol::split_write_obj
at /REDACTED/.cargo/git/checkouts/decomp-toolkit-67de3bdb1343cc99/4a84975/src/cmd/dol.rs:822:5
4: dtk::cmd::dol::split::{{closure}}::{{closure}}
at /REDACTED/.cargo/git/checkouts/decomp-toolkit-67de3bdb1343cc99/4a84975/src/cmd/dol.rs:1190:17
5: rayon_core::scope::Scope::spawn::{{closure}}::{{closure}}
at /REDACTED/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rayon-core-1.12.1/src/scope/mod.r
s:526:57
6: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panic/unwind_safe.rs:272:9
7: std::panicking::try::do_call
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:552:40
8: __rust_try
9: std::panicking::try
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:516:19
10: std::panic::catch_unwind
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panic.rs:142:14
11: rayon_core::unwind::halt_unwinding
at /REDACTED/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rayon-core-1.12.1/src/unwind.rs:1
7:5
12: rayon_core::scope::ScopeBase::execute_job_closure
at /REDACTED/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rayon-core-1.12.1/src/scope/mod.r
s:689:28
13: rayon_core::scope::ScopeBase::execute_job
at /REDACTED/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rayon-core-1.12.1/src/scope/mod.r
s:679:29
14: rayon_core::scope::Scope::spawn::{{closure}}
at /REDACTED/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rayon-core-1.12.1/src/scope/mod.r
s:526:13
15: <rayon_core::job::HeapJob<BODY> as rayon_core::job::Job>::execute
at /REDACTED/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rayon-core-1.12.1/src/job.rs:169:
9
16: rayon_core::job::JobRef::execute
at /REDACTED/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rayon-core-1.12.1/src/job.rs:64:9
17: rayon_core::registry::WorkerThread::execute
at /REDACTED/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rayon-core-1.12.1/src/registry.rs
:860:9
18: rayon_core::registry::WorkerThread::wait_until_cold
at /REDACTED/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rayon-core-1.12.1/src/registry.rs
:794:21
19: rayon_core::registry::WorkerThread::wait_until
at /REDACTED/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rayon-core-1.12.1/src/registry.rs
:769:13
20: rayon_core::registry::WorkerThread::wait_until_out_of_work
at /REDACTED/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rayon-core-1.12.1/src/registry.rs
:818:9
21: rayon_core::registry::main_loop
at /REDACTED/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rayon-core-1.12.1/src/registry.rs
:923:5
22: rayon_core::registry::ThreadBuilder::run
at /REDACTED/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rayon-core-1.12.1/src/registry.rs
:53:18
23: <rayon_core::registry::DefaultSpawn as rayon_core::registry::ThreadSpawn>::spawn::{{closure}}
at /REDACTED/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rayon-core-1.12.1/src/registry.rs
:98:20
24: std::sys_common::backtrace::__rust_begin_short_backtrace
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys_common/backtrace.rs:154:18
25: std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/thread/mod.rs:529:17
26: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panic/unwind_safe.rs:272:9
27: std::panicking::try::do_call
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:552:40
28: __rust_try
29: std::panicking::try
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:516:19
30: std::panic::catch_unwind
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panic.rs:142:14
31: std::thread::Builder::spawn_unchecked_::{{closure}}
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/thread/mod.rs:528:30
32: core::ops::function::FnOnce::call_once{{vtable.shim}}
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/ops/function.rs:250:5
33: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/alloc/src/boxed.rs:2007:9
34: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/alloc/src/boxed.rs:2007:9
35: std::sys::unix::thread::Thread::new::thread_start
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys/unix/thread.rs:108:17
36: start_thread
37: clone3
003207d8 0000a4 80326118 1 .text math_1.c.o
003207d8 00009c 80326118 4 frexp math_1.c.o
00320874 000008 803261b4 4 fabsf__ff math_1.c.o
0032087c 0003ec 803261bc 4 tanf trigf.s.o
003208c0 000020 80326200 4 cos__ff trigf.s.o
003208e0 000020 80326220 4 sin__ff trigf.s.o
00320900 000194 80326240 4 cosf trigf.s.o
00320a94 0001a4 803263d4 4 sinf trigf.s.o
00320c38 000030 80326578 4 __sinit_trigf_c trigf.s.o
00320c68 00016c 803265a8 4 logf math.s.o
__sinit_trigf_c = .text:0x80326578; // type:function size:0x30 scope:global
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment