Explorar o código

make startup code PIE-compatible

Rich Felker %!s(int64=14) %!d(string=hai) anos
pai
achega
e2ee1bdd8d
Modificáronse 1 ficheiros con 4 adicións e 2 borrados
  1. 4 2
      crt/i386/crt1.s

+ 4 - 2
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