aboutsummaryrefslogtreecommitdiff
path: root/src/lib/libc/start.c
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2016-07-16 15:59:46 +0200
committerAlex Auvolat <alex@adnab.me>2016-07-16 15:59:46 +0200
commit3d6a857b9186ef6304ea6cf04627c2b787169f29 (patch)
tree756179ce1e1838f75c57e3efec2a570d72051594 /src/lib/libc/start.c
parent59000174aa50ed6b2d24a71576d15e6a53c5be0c (diff)
downloadkogata-3d6a857b9186ef6304ea6cf04627c2b787169f29.tar.gz
kogata-3d6a857b9186ef6304ea6cf04627c2b787169f29.zip
Make way for libc implementation
Diffstat (limited to 'src/lib/libc/start.c')
-rw-r--r--src/lib/libc/start.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/lib/libc/start.c b/src/lib/libc/start.c
index 49a6ca1..185d90f 100644
--- a/src/lib/libc/start.c
+++ b/src/lib/libc/start.c
@@ -1,17 +1,21 @@
#include <kogata/syscall.h>
+#include <stdio.h>
+
void malloc_setup();
int main(int, char**);
-void __libkogata_start() {
+void __libc_start() {
malloc_setup();
- // TODO : more setup ?
+ setup_libc_stdio();
+
+ // TODO : more setup ? yes, for args, for env...
int ret = main(0, 0);
- exit(ret);
+ sc_exit(ret);
}
/* vim: set ts=4 sw=4 tw=0 noet :*/