diff options
author | Philip Guenthe <guenther@cvs.openbsd.org> | 2009-09-27 22:52:17 +0000 |
---|---|---|
committer | Philip Guenthe <guenther@cvs.openbsd.org> | 2009-09-27 22:52:17 +0000 |
commit | 522e3abc0a24d401c05ca2eb4e9c7e7af4bb7376 (patch) | |
tree | 121dc658020c3eacd8fc1387661a98c450174217 /lib | |
parent | 23864e84141ca15f7593aa022c715fe3bfb946d9 (diff) |
rfork_thread() lacked PIC handling for CERROR, resulting in a text relocation
pointed out by brad, ok djm@
Diffstat (limited to 'lib')
-rw-r--r-- | lib/librthread/arch/i386/rfork_thread.S | 9 |
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 |