Architectural Support: x86_64 (#37)
[lunaix-os.git] / lunaix-os / usr / libc / arch / i386 / crt0.S
index eec9ee9e0e435c00cee3ba94a1141c79fe1f9f23..1418068d4a32aceb63be88dc0383905bc727a1cc 100644 (file)
@@ -8,9 +8,18 @@
 
 .section .text
     .global _start
-    _start:        
-        xorl %eax, %eax
+    _start:      
+        xorl %ebp, %ebp
+        movl %esp, %eax
+        andl $-16, %esp
+        
+        leal 4(%eax), %ebx
+        pushl %ebx
+        pushl (%eax)
+
         fninit
+
+        xorl %eax, %eax
         call main
         
     1: