aboutsummaryrefslogtreecommitdiff
path: root/libpsn00b/libc/start.c
diff options
context:
space:
mode:
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.