X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/707c6653985f55463e8a59a58b248ba8af3b44b2..f8bd95b7a13dfe54d800e2d7ecdb0329f0798289:/lunaix-os/usr/uwrap.S?ds=inline diff --git a/lunaix-os/usr/uwrap.S b/lunaix-os/usr/uwrap.S index 1cd6515..c9e2bbc 100644 --- a/lunaix-os/usr/uwrap.S +++ b/lunaix-os/usr/uwrap.S @@ -1,17 +1,23 @@ #define __ASM__ #include +.section .data + .global environ + environ: + .long 0 + .section .text .global _u_start _u_start: - movl $2, %eax + 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