make startup code PIE-compatible
authorRich Felker <dalias@aerifal.cx>
Tue, 22 Feb 2011 03:26:31 +0000 (22:26 -0500)
committerRich Felker <dalias@aerifal.cx>
Tue, 22 Feb 2011 03:26:31 +0000 (22:26 -0500)
crt/i386/crt1.s

index 8702052..4d5f572 100644 (file)
@@ -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