summaryrefslogtreecommitdiffhomepage
path: root/dev/launch/src
diff options
context:
space:
mode:
Diffstat (limited to 'dev/launch/src')
-rw-r--r--dev/launch/src/CRT0.S17
-rw-r--r--dev/launch/src/LaunchSrv.cc5
2 files changed, 20 insertions, 2 deletions
diff --git a/dev/launch/src/CRT0.S b/dev/launch/src/CRT0.S
new file mode 100644
index 00000000..ffc7398a
--- /dev/null
+++ b/dev/launch/src/CRT0.S
@@ -0,0 +1,17 @@
+/* -------------------------------------------
+
+ Copyright (C) 2025, Amlal El Mahrouss, all rights reserved.
+
+ ------------------------------------------- */
+
+ .text
+
+.extern nelaunch_startup_fn
+
+_NeMain:
+ push %rbp
+ movq %rsp, %rbp
+ callq nelaunch_startup_fn
+ popq %rbp
+
+ retq
diff --git a/dev/launch/src/LaunchSrv.cc b/dev/launch/src/LaunchSrv.cc
index 40027f65..f5c9ee3c 100644
--- a/dev/launch/src/LaunchSrv.cc
+++ b/dev/launch/src/LaunchSrv.cc
@@ -7,10 +7,11 @@
#include <LaunchKit/LaunchKit.h>
#include <libSystem/SystemKit/Err.h>
-SInt32 _NeMain(Void) {
+/// @note This called by _NeMain from its own runtime.
+extern "C" SInt32 nelaunch_startup_fn(Void) {
/// @todo Start LaunchServices.fwrk services, make the launcher manageable too (via mgmt.launch)
- NELAUNCH_INFO("Starting services...");
+ NELAUNCH_INFO("Starting NeKernel services...");
return kErrorSuccess;
}