summaryrefslogtreecommitdiff
path: root/libraries/euler/entry.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/euler/entry.cpp')
-rw-r--r--libraries/euler/entry.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/libraries/euler/entry.cpp b/libraries/euler/entry.cpp
new file mode 100644
index 0000000..0bbffda
--- /dev/null
+++ b/libraries/euler/entry.cpp
@@ -0,0 +1,19 @@
+#include <euler/syscall.hpp>
+
+int main(int argc, char **argv);
+
+extern "C" [[noreturn]] void _entry() {
+
+ //TODO: static constructors
+
+ //TODO: get command line via system call and populate argc and argv.
+ int argc = 0;
+ char **argv = 0;
+
+ int result = main(argc, argv);
+
+ //TODO: static destructors
+
+ _syscall_end_this_process(result);
+
+}