git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Framework for exporting system header to user space (#59)
[lunaix-os.git]
/
lunaix-os
/
usr
/
libc
/
arch
/
i386
/
crt0.S
diff --git
a/lunaix-os/usr/libc/arch/i386/crt0.S
b/lunaix-os/usr/libc/arch/i386/crt0.S
index a449ac3547829fe84bede17edb319e43eb920c7f..49fbcb771026e35ff2f386df956563e1bab3ca7e 100644
(file)
--- a/
lunaix-os/usr/libc/arch/i386/crt0.S
+++ b/
lunaix-os/usr/libc/arch/i386/crt0.S
@@
-9,14
+9,22
@@
.section .text
.global _start
_start:
.section .text
.global _start
_start:
- xorl %eax, %eax
xorl %ebp, %ebp
xorl %ebp, %ebp
+ movl %esp, %eax
+ andl $-16, %esp
+
+ leal 4(%eax), %ebx
+ pushl %ebx
+ pushl (%eax)
+
fninit
fninit
+
+ xorl %eax, %eax
call main
1:
movl %eax, %ebx
call main
1:
movl %eax, %ebx
- movl $__
SYSCALL_
_exit, %eax
+ movl $__
NR__lxsys
_exit, %eax
int $33
ud2 // should not reach
\ No newline at end of file
int $33
ud2 // should not reach
\ No newline at end of file