summaryrefslogtreecommitdiff
path: root/src/kernel/entry.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/entry.c')
-rw-r--r--src/kernel/entry.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/kernel/entry.c b/src/kernel/entry.c
new file mode 100644
index 0000000..d0e75a7
--- /dev/null
+++ b/src/kernel/entry.c
@@ -0,0 +1,16 @@
+#include "kernel.h"
+
+// must be first entry in kernel.bin (0x8800) as stage 2 of
+// the boot loader expects the entry point to b here!
+//
+// compilers (at least gcc) mess with the order of functions when
+// compiling with optimization levels, so kernel_main ends up somewhere
+// in the first compilation unit. I didn't find an elegand way (but for
+// an ld script with custom section and some compiler specific attributes
+// how to solve this issue). This solution here is sort of a nice
+// workaround working no matter what the compilers try to do (of course
+// till we get optimization across compilation units that is)
+void kernel_entry( void )
+{
+ kernel_main( );
+}