about summary refs log tree commit diff
path: root/src/ldso/i386/start.s
diff options
context:
space:
mode:
Diffstat (limited to 'src/ldso/i386/start.s')
-rw-r--r--src/ldso/i386/start.s19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/ldso/i386/start.s b/src/ldso/i386/start.s
new file mode 100644
index 00000000..47c2748b
--- /dev/null
+++ b/src/ldso/i386/start.s
@@ -0,0 +1,19 @@
+.text
+.global _start
+_start:
+	xorl %ebp,%ebp
+	popl %ecx
+	movl %esp,%eax
+	andl $-16,%esp
+	movl %eax,%esi
+	movl %ecx,%edi
+	pushl %ebp
+	call 1f
+1:	addl $_GLOBAL_OFFSET_TABLE_,(%esp)
+	pushl %eax
+	pushl %ecx
+	call __dynlink
+	movl %esi,%esp
+	pushl %edi
+	xorl %edx,%edx
+	jmp *%eax