diff options
| author | spicyjpeg <thatspicyjpeg@gmail.com> | 2022-10-19 14:15:28 +0200 |
|---|---|---|
| committer | spicyjpeg <thatspicyjpeg@gmail.com> | 2022-10-19 14:15:28 +0200 |
| commit | 783014e53254fe17102a34c30120eeabf5227a47 (patch) | |
| tree | 6c3e498295ddd293769b85e7b7cbecd80ce32be7 /libpsn00b/libc/_stubs.s | |
| parent | e08a3d9366f8ca14a76b3dd569dac1fb9f569748 (diff) | |
| download | psn00bsdk-783014e53254fe17102a34c30120eeabf5227a47.tar.gz | |
Clean up SDK debug logging, fix getTPage()
Diffstat (limited to 'libpsn00b/libc/_stubs.s')
| -rw-r--r-- | libpsn00b/libc/_stubs.s | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/libpsn00b/libc/_stubs.s b/libpsn00b/libc/_stubs.s new file mode 100644 index 0000000..aa7bfbe --- /dev/null +++ b/libpsn00b/libc/_stubs.s @@ -0,0 +1,27 @@ +# PSn00bSDK _start() trampoline and logging endpoint +# (C) 2022 spicyjpeg - MPL licensed +# +# This file provides a weak function that can be easily overridden to e.g. set +# $sp or perform additional initialization before the "real" _start() function +# (_start_inner()) is called. The _sdk_log_inner() function called by other +# libraries to log debug messages can also be overridden in a similar way. + +.set noreorder + +.section .text._start +.global _start +.type _start, @function +.weak _start +_start: + la $gp, _gp + j _start_inner + nop + +.section .text._sdk_log_inner +.global _sdk_log_inner +.type _sdk_log_inner, @function +.weak _sdk_log_inner +_sdk_log_inner: + li $t2, 0xa0 + jr $t2 + li $t1, 0x3f |
