summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormrb0nk500 <b0nk@b0nk.xyz>2023-01-30 11:22:41 -0400
committermrb0nk500 <b0nk@b0nk.xyz>2023-01-30 11:22:41 -0400
commit5c7f3b06b3c04b461c93f8bc03fd7981b041bbd6 (patch)
treebf6737c8067fa3805767ee66525d5714235ca9e6 /src
parent9943fe31f61f4f632064cbc3c4fce9bd7bfe21ae (diff)
Makefile: Add `TEST_LD` env var for testing out linking
Diffstat (limited to 'src')
-rw-r--r--src/Dolphin/os/__start.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Dolphin/os/__start.c b/src/Dolphin/os/__start.c
index cebb086..4cb44e2 100644
--- a/src/Dolphin/os/__start.c
+++ b/src/Dolphin/os/__start.c
@@ -12,6 +12,7 @@ void __check_pad3(void)
return;
}
+#ifndef LD_TEST
// clang-format off
__declspec (weak) asm void __start(void)
@@ -116,6 +117,16 @@ _skip_crc:
bl main
b exit
}
+#else
+__declspec(weak) void __start() {
+ int ret;
+ int argc = 0;
+ char **argv = NULL;
+ __init_user();
+ ret = main(argc, argv);
+ exit(ret);
+}
+#endif
asm static void __init_registers(void)
{