Browse Source

* more PIC fixes in OpenBSD's x86_64 cprt0.as

git-svn-id: trunk@41670 -
nickysn 6 years ago
parent
commit
cfa9410b56
1 changed files with 3 additions and 5 deletions
  1. 3 5
      rtl/openbsd/x86_64/cprt0.as

+ 3 - 5
rtl/openbsd/x86_64/cprt0.as

@@ -101,12 +101,10 @@ ___start:
 	movq	-16(%rbp), %rax
 	movb	$0, (%rax)
 .L2:
-	movl	$_mcleanup, %edi
+	leaq	_mcleanup(%rip), %rdi
 	call	atexit
-	movl	$_etext, %eax
-	movq	%rax, %rsi
-	movl	$_eprol, %eax
-	movq	%rax, %rdi
+	leaq	_etext(%rip), %rsi
+	leaq	_eprol(%rip), %rdi
 	call	monstartup
 	movl	$0, %eax
 	call	_init