summaryrefslogtreecommitdiff
path: root/lib/librthread/arch/i386
diff options
context:
space:
mode:
Diffstat (limited to 'lib/librthread/arch/i386')
-rw-r--r--lib/librthread/arch/i386/rfork_thread.S9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/librthread/arch/i386/rfork_thread.S b/lib/librthread/arch/i386/rfork_thread.S
index 4ab79f20938..e86484a13c2 100644
--- a/lib/librthread/arch/i386/rfork_thread.S
+++ b/lib/librthread/arch/i386/rfork_thread.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: rfork_thread.S,v 1.2 2005/12/25 00:45:29 tedu Exp $ */
+/* $OpenBSD: rfork_thread.S,v 1.3 2009/09/27 22:52:16 guenther Exp $ */
/*-
* Copyright (c) 2000 Peter Wemm <peter@FreeBSD.org>
* All rights reserved.
@@ -112,4 +112,11 @@ ENTRY(rfork_thread)
popl %esi
movl %ebp, %esp
popl %ebp
+#ifdef PIC
+ PIC_PROLOGUE
+ movl PIC_GOT(CERROR), %ecx
+ PIC_EPILOGUE
+ jmp *%ecx
+#else
jmp CERROR
+#endif