aboutsummaryrefslogtreecommitdiff
path: root/libpsn00b/libc/start.c
diff options
context:
space:
mode:
authorJohn "Lameguy" Wilbert Villamor <lameguy64@gmail.com>2022-09-26 16:49:56 +0800
committerGitHub <noreply@github.com>2022-09-26 16:49:56 +0800
commitc4a2533d21dfd05cde841ea48c67b05e0e6a853f (patch)
treec7ef61653b157b69fb0956709366996ddbc4ecfa /libpsn00b/libc/start.c
parenta8b404b3400c3ebd8e0b923dcaefcc49ea563e36 (diff)
parent86f0064afb8200e60dd80827535cac30d0eab028 (diff)
downloadpsn00bsdk-c4a2533d21dfd05cde841ea48c67b05e0e6a853f.tar.gz
Merge pull request #55 from spicyjpeg/psxmdec
Full MDEC support, C library refactors, cleanups and bugfixes (v0.20)
Diffstat (limited to 'libpsn00b/libc/start.c')
-rw-r--r--libpsn00b/libc/start.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libpsn00b/libc/start.c b/libpsn00b/libc/start.c
index fd6fe33..87ac951 100644
--- a/libpsn00b/libc/start.c
+++ b/libpsn00b/libc/start.c
@@ -62,10 +62,10 @@ extern uint8_t _end[];
// useful though to change the stack size and/or reinitialize the heap on
// systems that have more than 2 MB of RAM (e.g. emulators, devkits, PS1-based
// arcade boards).
-void _mem_init(int ram_size, int stack_max_size) {
- void *exe_end = _end + 4;
- int exe_size = (int) exe_end - (int) __text_start;
- int ram_used = (0x10000 + exe_size + stack_max_size) & 0xfffffffc;
+void _mem_init(size_t ram_size, size_t stack_max_size) {
+ void *exe_end = _end + 4;
+ size_t exe_size = (size_t) exe_end - (size_t) __text_start;
+ size_t ram_used = (0x10000 + exe_size + stack_max_size) & 0xfffffffc;
InitHeap(exe_end, ram_size - ram_used);
}
@@ -80,8 +80,8 @@ extern int main(int argc, const char* argv[]);
// Even though _start() usually takes no arguments, this implementation allows
// parent executables to pass args directly to child executables without having
// to overwrite the arg strings in kernel RAM.
-void _start(int32_t override_argc, const char **override_argv) {
- __asm__ volatile("la $gp, _gp;");
+void _start_inner(int32_t override_argc, const char **override_argv) {
+ //__asm__ volatile("la $gp, _gp;");
// Clear BSS 4 bytes at a time. BSS is always aligned to 4 bytes by the
// linker script.