summaryrefslogtreecommitdiff
path: root/arch/i386/crt_arch.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/i386/crt_arch.h')
-rw-r--r--arch/i386/crt_arch.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/i386/crt_arch.h b/arch/i386/crt_arch.h
new file mode 100644
index 00000000..ae694f99
--- /dev/null
+++ b/arch/i386/crt_arch.h
@@ -0,0 +1,13 @@
+__asm__("\
+.text \n\
+.global _start \n\
+_start: \n\
+ xor %ebp,%ebp \n\
+ mov %esp,%eax \n\
+ and $-16,%esp \n\
+ push %eax \n\
+ push %eax \n\
+ push %eax \n\
+ push %eax \n\
+ call __cstart \n\
+");