From 522e3abc0a24d401c05ca2eb4e9c7e7af4bb7376 Mon Sep 17 00:00:00 2001 From: Philip Guenthe Date: Sun, 27 Sep 2009 22:52:17 +0000 Subject: rfork_thread() lacked PIC handling for CERROR, resulting in a text relocation pointed out by brad, ok djm@ --- lib/librthread/arch/i386/rfork_thread.S | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lib/librthread/arch/i386') 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 * 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 -- cgit v1.2.3