diff options
Diffstat (limited to 'sysdeps/i386/setjmp.S')
-rw-r--r-- | sysdeps/i386/setjmp.S | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/sysdeps/i386/setjmp.S b/sysdeps/i386/setjmp.S index e01d32b..56c3994 100644 --- a/sysdeps/i386/setjmp.S +++ b/sysdeps/i386/setjmp.S @@ -1,5 +1,6 @@ /* setjmp for i386. - Copyright (C) 1995, 1996, 1997, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1995,1996,1997,2000,2001,2005,2006 + Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -18,9 +19,7 @@ 02111-1307 USA. */ #include <sysdep.h> -#define _ASM -#define _SETJMP_H -#include <bits/setjmp.h> +#include <jmpbuf-offsets.h> #include <asm-syntax.h> #include "bp-sym.h" #include "bp-asm.h" @@ -40,12 +39,24 @@ ENTRY (BP_SYM (__sigsetjmp)) movl %esi, (JB_SI*4)(%eax) movl %edi, (JB_DI*4)(%eax) leal JMPBUF(%esp), %ecx /* Save SP as it will be after we return. */ +#ifdef PTR_MANGLE + PTR_MANGLE (%ecx) +#endif movl %ecx, (JB_SP*4)(%eax) movl PCOFF(%esp), %ecx /* Save PC we are returning to now. */ +#ifdef PTR_MANGLE + PTR_MANGLE (%ecx) +#endif movl %ecx, (JB_PC*4)(%eax) LEAVE /* pop frame pointer to prepare for tail-call. */ movl %ebp, (JB_BP*4)(%eax) /* Save caller's frame pointer. */ +#if defined NOT_IN_libc && defined IS_IN_rtld + /* In ld.so we never save the signal mask. */ + xorl %eax, %eax + ret +#else /* Make a tail call to __sigjmp_save; it takes the same args. */ - jmp BP_SYM (__sigjmp_save) + jmp __sigjmp_save +#endif END (BP_SYM (__sigsetjmp)) |