about summary refs log tree commit diff
path: root/crt/i386/crt1.s
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011-02-21 22:26:31 -0500
committerRich Felker <dalias@aerifal.cx>2011-02-21 22:26:31 -0500
commite2ee1bdd8df7637267f5daae74e2849f77751f6e (patch)
treece98e1b635aaa98d4118197713b420c56514e013 /crt/i386/crt1.s
parentcfcbea1e4373ad5db085f7efed302e6f229e2171 (diff)
downloadmusl-e2ee1bdd8df7637267f5daae74e2849f77751f6e.tar.gz
musl-e2ee1bdd8df7637267f5daae74e2849f77751f6e.tar.xz
musl-e2ee1bdd8df7637267f5daae74e2849f77751f6e.zip
make startup code PIE-compatible
Diffstat (limited to 'crt/i386/crt1.s')
-rw-r--r--crt/i386/crt1.s6
1 files changed, 4 insertions, 2 deletions
diff --git a/crt/i386/crt1.s b/crt/i386/crt1.s
index 8702052a..4d5f572f 100644
--- a/crt/i386/crt1.s
+++ b/crt/i386/crt1.s
@@ -12,6 +12,8 @@ _start:
 	pushl %ebp
 	pushl %eax
 	pushl %ecx
-	pushl $main
+	call 1f
+1:	addl $[main-.],(%esp)
+	//pushl $main
 	call __libc_start_main
-.L0:	jmp .L0
+1:	jmp 1b