From da97dfdcfa0ecbbf2d455c54a08bb9223ce1fc18 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 30 Jul 2009 21:50:14 -0700 Subject: Add sigstack handling to Linux ____longjmp_chk on i386. All other i386 ports need to provide their own versions. --- sysdeps/i386/__longjmp.S | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) (limited to 'sysdeps/i386/__longjmp.S') 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 #include #include -#include -#include - -#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) -- cgit v1.2.3