summary refs log tree commit diff
path: root/sysdeps/unix/i386/sysdep.S
diff options
context:
space:
mode:
authorGreg McGary <greg@mcgary.org>2000-06-27 01:52:26 +0000
committerGreg McGary <greg@mcgary.org>2000-06-27 01:52:26 +0000
commitee63ca212c7a153b51c32182eb226f0bde04cc82 (patch)
tree20a41988972db16c585642823191249a2d4f2b48 /sysdeps/unix/i386/sysdep.S
parent58ff985dd485e6d2ae723f8568be24f37bac0bd2 (diff)
downloadglibc-ee63ca212c7a153b51c32182eb226f0bde04cc82.tar.gz
glibc-ee63ca212c7a153b51c32182eb226f0bde04cc82.tar.xz
glibc-ee63ca212c7a153b51c32182eb226f0bde04cc82.zip
* sysdeps/i386/bp-asm.h (POP_ERRNO_LOCATION_RETURN): Fold insns.
* sysdeps/unix/i386/sysdep.S (syscall_error): Push & pop space 
for BP return value & push implicit struct-return pointer to 
__errno_location. 
* sysdeps/unix/sysv/linux/i386/sysdep.h: Likewise. 
(SYSCALL_ERROR_HANDLER): Likewise. 
* sysdeps/unix/sysv/linux/i386/i686/sysdep.h 
(SYSCALL_ERROR_HANDLER): Likewise.
	* sysdeps/i386/bp-asm.h (POP_ERRNO_LOCATION_RETURN): Fold insns.
	* sysdeps/unix/i386/sysdep.S (syscall_error): Push & pop space
	for BP return value & push implicit struct-return pointer to
	__errno_location.
	* sysdeps/unix/sysv/linux/i386/sysdep.h: Likewise.
	(SYSCALL_ERROR_HANDLER): Likewise.
	* sysdeps/unix/sysv/linux/i386/i686/sysdep.h
	(SYSCALL_ERROR_HANDLER): Likewise.

	* Makeconfig (CPPFLAGS-.ob): Pass -fbounded-pointers
	for all files *.[cS].
Diffstat (limited to 'sysdeps/unix/i386/sysdep.S')
-rw-r--r--sysdeps/unix/i386/sysdep.S24
1 files changed, 15 insertions, 9 deletions
diff --git a/sysdeps/unix/i386/sysdep.S b/sysdeps/unix/i386/sysdep.S
index ff1fc0f431..4c1361849f 100644
--- a/sysdeps/unix/i386/sysdep.S
+++ b/sysdeps/unix/i386/sysdep.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 92, 93, 94, 95, 96, 97 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 2000 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
@@ -19,6 +19,8 @@
 #include <sysdep.h>
 #define _ERRNO_H
 #include <bits/errno.h>
+#include <bp-asm.h>
+#include <bp-sym.h>
 
 .globl C_SYMBOL_NAME(errno)
 .globl syscall_error
@@ -39,31 +41,35 @@ syscall_error:
 notb:
 #endif
 #ifndef	PIC
-#ifndef	_LIBC_REENTRANT
+# ifndef _LIBC_REENTRANT
 	movl %eax, C_SYMBOL_NAME(errno)
-#else
+# else
 	pushl %eax
-	call __errno_location
+	PUSH_ERRNO_LOCATION_RETURN
+	call BP_SYM (__errno_location)
+	POP_ERRNO_LOCATION_RETURN
 	popl %ecx
 	movl %ecx, (%eax)
-#endif
+# endif
 #else
 	/* The caller has pushed %ebx and then set it up to
 	   point to the GOT before calling us through the PLT.  */
-#ifndef	_LIBC_REENTRANT
+# ifndef _LIBC_REENTRANT
 	movl C_SYMBOL_NAME(errno@GOT)(%ebx), %ecx
 
 	/* Pop %ebx value saved before jumping here.  */
 	popl %ebx
 	movl %eax, (%ecx)
-#else
+# else
 	pushl %eax
-	call C_SYMBOL_NAME(__errno_location@PLT)
+	PUSH_ERRNO_LOCATION_RETURN
+	call C_SYMBOL_NAME (BP_SYM (__errno_location)@PLT)
+	POP_ERRNO_LOCATION_RETURN
 	popl %ecx
 	/* Pop %ebx value saved before jumping here.  */
 	popl %ebx
 	movl %ecx, (%eax)
-#endif
+# endif
 #endif
 	movl $-1, %eax
 	ret