diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2012-05-23 05:53:20 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2012-05-23 06:12:41 -0700 |
commit | 70c161f555c0400ecc606829a0cf6ef1816a5037 (patch) | |
tree | 15c7dce86e82423430ea141c68295e287deed2f9 | |
parent | 3d8fdb9d1097a9683a16846ea00e337607982e15 (diff) | |
download | glibc-70c161f555c0400ecc606829a0cf6ef1816a5037.tar.gz glibc-70c161f555c0400ecc606829a0cf6ef1816a5037.tar.xz glibc-70c161f555c0400ecc606829a0cf6ef1816a5037.zip |
Fix x32 sched_getcpu.S error code
-rw-r--r-- | ChangeLog.x32 | 6 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/x86_64/x32/sched_getcpu.S | 12 |
2 files changed, 14 insertions, 4 deletions
diff --git a/ChangeLog.x32 b/ChangeLog.x32 index 45f03a6458..7ece534cbf 100644 --- a/ChangeLog.x32 +++ b/ChangeLog.x32 @@ -1,5 +1,11 @@ 2012-05-23 H.J. Lu <hongjiu.lu@intel.com> + * sysdeps/unix/sysv/linux/x86_64/x32/sched_getcpu.S: Rearrange + code so that pseudo_end is just ret and the stack pointer is + correct also for static library in error case. + +2012-05-23 H.J. Lu <hongjiu.lu@intel.com> + * sysdeps/unix/sysv/linux/i386/sysdep.h (SYSCALL_ERROR_HANDLER): Replace "jmp L(pseudo_end)" with "ret". * sysdeps/unix/sysv/linux/x86_64/sysdep.h (SYSCALL_ERROR_HANDLER): diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/sched_getcpu.S b/sysdeps/unix/sysv/linux/x86_64/x32/sched_getcpu.S index f3ba9f1c9f..789552ebbb 100644 --- a/sysdeps/unix/sysv/linux/x86_64/x32/sched_getcpu.S +++ b/sysdeps/unix/sysv/linux/x86_64/x32/sched_getcpu.S @@ -33,14 +33,18 @@ ENTRY (sched_getcpu) call __getcpu + /* Local variable is result if the call is successful. */ + mov (%rsp), %edx + /* Restore stack pointer before we might jump to + SYSCALL_ERROR_LABEL which returns to the caller. */ + add $0x8, %esp + cfi_adjust_cfa_offset(-8) + cmp $-4095, %eax jae SYSCALL_ERROR_LABEL - mov (%rsp), %eax - + mov %edx, %eax L(pseudo_end): - add $0x8, %esp - cfi_adjust_cfa_offset(-8) ret PSEUDO_END(sched_getcpu) #endif |