From: Rich Felker Date: Tue, 22 Feb 2011 03:26:31 +0000 (-0500) Subject: make startup code PIE-compatible X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=commitdiff_plain;h=e2ee1bdd8df7637267f5daae74e2849f77751f6e make startup code PIE-compatible --- 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