about summary refs log tree commit diff
path: root/src/ldso/x32/start.s
diff options
context:
space:
mode:
Diffstat (limited to 'src/ldso/x32/start.s')
-rw-r--r--src/ldso/x32/start.s16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/ldso/x32/start.s b/src/ldso/x32/start.s
new file mode 100644
index 00000000..80c1d08d
--- /dev/null
+++ b/src/ldso/x32/start.s
@@ -0,0 +1,16 @@
+.text
+.global _start
+_start:
+	mov (%rsp),%rdi
+	lea 8(%rsp),%rsi
+	call __dynlink
+	pop %rdi
+1:	dec %edi
+	pop %rsi
+	cmp $-1,%rsi
+	jz 1b
+	inc %edi
+	push %rsi
+	push %rdi
+	xor %edx,%edx
+	jmp *%rax