diff options
author | Ulrich Drepper <drepper@redhat.com> | 2009-07-30 21:50:14 -0700 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2009-07-30 21:50:14 -0700 |
commit | da97dfdcfa0ecbbf2d455c54a08bb9223ce1fc18 (patch) | |
tree | 87fdb1a2e49cdf5f15ffd72122531f2abc6ec3c0 /sysdeps/i386/__longjmp.S | |
parent | 98b1e6c8668259044a20a016a5a5957b226ce04b (diff) | |
download | glibc-da97dfdcfa0ecbbf2d455c54a08bb9223ce1fc18.tar.gz glibc-da97dfdcfa0ecbbf2d455c54a08bb9223ce1fc18.tar.xz glibc-da97dfdcfa0ecbbf2d455c54a08bb9223ce1fc18.zip |
Add sigstack handling to Linux ____longjmp_chk on i386.
All other i386 ports need to provide their own versions.
Diffstat (limited to 'sysdeps/i386/__longjmp.S')
-rw-r--r-- | sysdeps/i386/__longjmp.S | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/sysdeps/i386/__longjmp.S b/sysdeps/i386/__longjmp.S index 8b0732056a..f2eeeec04e 100644 --- a/sysdeps/i386/__longjmp.S +++ b/sysdeps/i386/__longjmp.S @@ -21,20 +21,11 @@ #include <sysdep.h> #include <jmpbuf-offsets.h> #include <asm-syntax.h> -#include <bp-sym.h> -#include <bp-asm.h> - -#define PARMS LINKAGE /* no space for saved regs */ -#define JBUF PARMS -#define VAL JBUF+PTR_SIZE .text -ENTRY (BP_SYM (__longjmp)) - ENTER - +ENTRY (__longjmp) #ifdef PTR_DEMANGLE - movl JBUF(%esp), %eax /* User's jmp_buf in %eax. */ - CHECK_BOUNDS_BOTH_WIDE (%eax, JBUF(%esp), $JB_SIZE) + movl 4(%esp), %eax /* User's jmp_buf in %eax. */ /* Save the return address now. */ movl (JB_PC*4)(%eax), %edx @@ -62,18 +53,17 @@ ENTRY (BP_SYM (__longjmp)) cfi_restore(%edi) cfi_restore(%ebp) - movl VAL(%esp), %eax /* Second argument is return value. */ + movl 8(%esp), %eax /* Second argument is return value. */ movl %ecx, %esp #else - movl JBUF(%esp), %ecx /* User's jmp_buf in %ecx. */ - CHECK_BOUNDS_BOTH_WIDE (%ecx, JBUF(%esp), $JB_SIZE) + movl 4(%esp), %ecx /* User's jmp_buf in %ecx. */ # ifdef CHECK_ESP movl (JB_SP*4)(%ecx), %eax CHECK_ESP (%eax) # endif - movl VAL(%esp), %eax /* Second argument is return value. */ + movl 8(%esp), %eax /* Second argument is return value. */ /* Save the return address now. */ movl (JB_PC*4)(%ecx), %edx /* Restore registers. */ @@ -85,4 +75,4 @@ ENTRY (BP_SYM (__longjmp)) #endif /* Jump to saved PC. */ jmp *%edx -END (BP_SYM (__longjmp)) +END (__longjmp) |