feat: dynamic boot medium probing and mounting
[lunaix-os.git] / lunaix-os / usr / uwrap.S
index 1f077228da8d889b3829a6c00b875686b98860a5..c9e2bbc20aa9a43ec6c512b3c9d27e59563ca11c 100644 (file)
@@ -1,16 +1,23 @@
 #define __ASM__
 #include <lunaix/syscall.h>
 
+.section .data
+    .global environ
+    environ:
+        .long 0
+
 .section .text
     .global _u_start
     _u_start:
+        movl (%esp), %eax
+        pushl %eax
         call usr_pre_init
         jnz 1f
 
         popl %eax
 
-        pushl (%eax)    // argc
         pushl 4(%eax)   // argv
+        pushl (%eax)    // argc
         
         xorl %eax, %eax
         call main