git://scm.lunaixsky.com
/
lunaix-os.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
regression: elf loading
[lunaix-os.git]
/
lunaix-os
/
usr
/
uwrap.S
1
#define __ASM__
2
#include <lunaix/syscall.h>
3
4
.section .text
5
.global _u_start
6
_u_start:
7
movl $2, %eax
8
call usr_pre_init
9
jnz 1f
10
11
popl %eax
12
13
pushl (%eax) // argc
14
pushl 4(%eax) // argv
15
16
xorl %eax, %eax
17
call main
18
19
1:
20
movl %eax, %ebx
21
movl $__SYSCALL__exit, %eax
22
int $LUNAIX_SYS_CALL
23
24
ud2 // should not reach