summaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/sysdep.h8
-rw-r--r--sysdeps/unix/x86_64/sysdep.S8
2 files changed, 8 insertions, 8 deletions
diff --git a/sysdeps/unix/sysv/linux/x86_64/sysdep.h b/sysdeps/unix/sysv/linux/x86_64/sysdep.h
index 972fa20442..2b11d37ee3 100644
--- a/sysdeps/unix/sysv/linux/x86_64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/x86_64/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2002 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
@@ -73,7 +73,7 @@
#ifndef PIC
#define SYSCALL_ERROR_HANDLER /* Nothing here; code in sysdep.S is used. */
#else
-/* Store (- %rax) into errno through the GOT. */
+/* Store (- %rax) into errno through the GOT. Note that errno occupies 4 bytes. */
#ifdef _LIBC_REENTRANT
#define SYSCALL_ERROR_HANDLER \
0: \
@@ -84,7 +84,7 @@
call BP_SYM (__errno_location)@PLT; \
POP_ERRNO_LOCATION_RETURN; \
popq %rdx; \
- movq %rdx, (%rax); \
+ movl %edx, (%rax); \
orq $-1, %rax; \
jmp L(pseudo_end);
@@ -95,7 +95,7 @@
0:movq errno@GOTPCREL(%RIP), %rcx; \
xorq %rdx, %rdx; \
subq %rax, %rdx; \
- movq %rdx, (%rcx); \
+ movl %edx, (%rcx); \
orq $-1, %rax; \
jmp L(pseudo_end);
#endif /* _LIBC_REENTRANT */
diff --git a/sysdeps/unix/x86_64/sysdep.S b/sysdeps/unix/x86_64/sysdep.S
index b26b1db934..e7865914e1 100644
--- a/sysdeps/unix/x86_64/sysdep.S
+++ b/sysdeps/unix/x86_64/sysdep.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2002 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
@@ -49,19 +49,19 @@ notb:
call BP_SYM (__errno_location)
POP_ERRNO_LOCATION_RETURN
popq %rcx
- movq %rcx, (%rax)
+ movl %ecx, (%rax)
# endif
#else
# ifndef _LIBC_REENTRANT
movq C_SYMBOL_NAME(errno)@GOTPCREL(%rip), %rcx
- movq %rax, (%rcx)
+ movl %eax, (%rcx)
# else
pushq %rax
PUSH_ERRNO_LOCATION_RETURN
call C_SYMBOL_NAME (BP_SYM (__errno_location)@PLT)
POP_ERRNO_LOCATION_RETURN
popq %rcx
- movq %rcx, (%rax)
+ movl %ecx, (%rax)
# endif
#endif
movq $-1, %rax