diff --git a/libctru/source/env.c b/libctru/source/env.c index 4eb24ba..3bfebaf 100644 --- a/libctru/source/env.c +++ b/libctru/source/env.c @@ -37,7 +37,7 @@ static int __name_cmp(const char* a, const char* b) { return 0; } -Handle envGetHandle(const char* name) { +Handle __attribute__((weak)) envGetHandle(const char* name) { if(__service_ptr == NULL) return 0; @@ -52,7 +52,7 @@ Handle envGetHandle(const char* name) { return 0; } -void envDestroyHandles(void) { +void __attribute__((weak)) envDestroyHandles(void) { if(__service_ptr == NULL) return; diff --git a/libctru/source/system/initArgv.c b/libctru/source/system/initArgv.c index 5e61582..c34843e 100644 --- a/libctru/source/system/initArgv.c +++ b/libctru/source/system/initArgv.c @@ -10,7 +10,7 @@ char** __system_argv; extern char* fake_heap_start; extern char* fake_heap_end; -void __system_initArgv(void) +void __attribute__((weak)) __system_initArgv(void) { int i; const char* arglist = envGetSystemArgList(); diff --git a/libctru/source/system/syscalls.c b/libctru/source/system/syscalls.c index 4d06f66..4bc77cf 100644 --- a/libctru/source/system/syscalls.c +++ b/libctru/source/system/syscalls.c @@ -35,7 +35,7 @@ static int __libctru_nanosleep(const struct timespec *req, struct timespec *rem) } -void __system_initSyscalls(void) +void __attribute__((weak)) __system_initSyscalls(void) { // Register newlib syscalls __syscalls.exit = __ctru_exit;