From e2ee1bdd8df7637267f5daae74e2849f77751f6e Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Mon, 21 Feb 2011 22:26:31 -0500 Subject: make startup code PIE-compatible --- crt/i386/crt1.s | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'crt') 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 -- cgit v1.2.1