summaryrefslogtreecommitdiff
path: root/lib/librthread/arch
diff options
context:
space:
mode:
authorPhilip Guenthe <guenther@cvs.openbsd.org>2009-09-27 22:52:17 +0000
committerPhilip Guenthe <guenther@cvs.openbsd.org>2009-09-27 22:52:17 +0000
commit522e3abc0a24d401c05ca2eb4e9c7e7af4bb7376 (patch)
tree121dc658020c3eacd8fc1387661a98c450174217 /lib/librthread/arch
parent23864e84141ca15f7593aa022c715fe3bfb946d9 (diff)
rfork_thread() lacked PIC handling for CERROR, resulting in a text relocation
pointed out by brad, ok djm@
Diffstat (limited to 'lib/librthread/arch')
-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