summaryrefslogtreecommitdiff
path: root/stdlib/entry.cpp
diff options
context:
space:
mode:
authorBenji Dial <benji@benjidial.net>2024-01-13 16:43:49 -0500
committerBenji Dial <benji@benjidial.net>2024-01-13 16:43:49 -0500
commit4130562b1555cabe441efe9420cebe12e7ed8d39 (patch)
treebeaf0012373aab2c3a13fe0147a5cda4af28ef78 /stdlib/entry.cpp
parent882e74b2191c059a9226cbd8bcb51c97da36247c (diff)
downloadhilbert-os-4130562b1555cabe441efe9420cebe12e7ed8d39.tar.gz
application loading
Diffstat (limited to 'stdlib/entry.cpp')
-rw-r--r--stdlib/entry.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/stdlib/entry.cpp b/stdlib/entry.cpp
new file mode 100644
index 0000000..5557c8a
--- /dev/null
+++ b/stdlib/entry.cpp
@@ -0,0 +1,14 @@
+int main(int argc, char **argv);
+
+extern "C" [[noreturn]] void _entry() {
+ //TODO: get command line via system call and populate argc and argv.
+ int argc = 0;
+ char **argv = 0;
+
+ int result = main(argc, argv);
+
+ //TODO: exit via system call and return result.
+ (void)result;
+ while (1)
+ ;
+}