diff options
author | peter <peter@FreeBSD.org> | 1996-05-05 07:56:21 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1996-05-05 07:56:21 +0000 |
commit | 4b7195c99191637bf59fd4ad626297296bf3610f (patch) | |
tree | bea8a07c70223c0e39939063c6dbbdf8eb9d0f17 /lib/libc/i386/sys | |
parent | 93f1aa601a7bda9bd9b83bf5098c3f05f6edd744 (diff) | |
download | FreeBSD-src-4b7195c99191637bf59fd4ad626297296bf3610f.zip FreeBSD-src-4b7195c99191637bf59fd4ad626297296bf3610f.tar.gz |
Add support to enable libc to be compiled in ELF format. (#ifdef __ELF__)
In a nutshell, this macroizes the local/global symbol scoping rules
that are different in a.out and ELF. It also makes the i386 assembler
stubs conform to i386 PIC calling conventions - the a.out ld.so didn't
object, but the ELF one needs it as it implements PIC jumps via PLT's as
well as calls. The a.out rtld only worked because it was accidently
snooping the grandparent calling function's return address off the stack..
This also affects the libc_r code a little, because of cpp macro nesting.
Diffstat (limited to 'lib/libc/i386/sys')
-rw-r--r-- | lib/libc/i386/sys/Ovfork.S | 28 | ||||
-rw-r--r-- | lib/libc/i386/sys/brk.S | 33 | ||||
-rw-r--r-- | lib/libc/i386/sys/cerror.S | 27 | ||||
-rw-r--r-- | lib/libc/i386/sys/exect.S | 9 | ||||
-rw-r--r-- | lib/libc/i386/sys/fork.S | 10 | ||||
-rw-r--r-- | lib/libc/i386/sys/pipe.S | 10 | ||||
-rw-r--r-- | lib/libc/i386/sys/ptrace.S | 13 | ||||
-rw-r--r-- | lib/libc/i386/sys/rfork.S | 10 | ||||
-rw-r--r-- | lib/libc/i386/sys/sbrk.S | 39 | ||||
-rw-r--r-- | lib/libc/i386/sys/setlogin.S | 10 | ||||
-rw-r--r-- | lib/libc/i386/sys/sigpending.S | 10 | ||||
-rw-r--r-- | lib/libc/i386/sys/sigprocmask.S | 11 | ||||
-rw-r--r-- | lib/libc/i386/sys/sigreturn.S | 19 | ||||
-rw-r--r-- | lib/libc/i386/sys/sigsuspend.S | 11 | ||||
-rw-r--r-- | lib/libc/i386/sys/syscall.S | 9 |
15 files changed, 134 insertions, 115 deletions
diff --git a/lib/libc/i386/sys/Ovfork.S b/lib/libc/i386/sys/Ovfork.S index 341b75c..2b69ca0 100644 --- a/lib/libc/i386/sys/Ovfork.S +++ b/lib/libc/i386/sys/Ovfork.S @@ -33,14 +33,15 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: Ovfork.S,v 1.2 1995/01/23 01:29:37 davidg Exp $ + * $Id: Ovfork.S,v 1.3 1996/01/22 00:00:56 julian Exp $ */ #if defined(SYSLIBC_RCS) && !defined(lint) .text - .asciz "$Id: Ovfork.S,v 1.2 1995/01/23 01:29:37 davidg Exp $" + .asciz "$Id: Ovfork.S,v 1.3 1996/01/22 00:00:56 julian Exp $" #endif /* SYSLIBC_RCS and not lint */ +#include "DEFS.h" #include "SYS.h" /* @@ -50,14 +51,11 @@ * %eax == pid of child in parent, %eax == pid of parent in child. * */ - .set vfork,66 -.globl _vfork -.type _vfork,@function -_vfork: +ENTRY(vfork) popl %ecx /* my rta into ecx */ - movl $vfork, %eax - LCALL(7,0) + lea SYS_vfork,%eax + KERNCALL jb verror vforkok: cmpl $0,%edx /* child process? */ @@ -67,14 +65,14 @@ vforkok: /* * Threaded version using __error(). */ - .globl ___error - .type ___error,@function + .globl CNAME(__error) + .type CNAME(__error),@function verror: pushl %eax #ifdef PIC - call PIC_PLT(___error) + call PIC_PLT(CNAME(__error)) #else - call ___error + call CNAME(__error) #endif popl %ecx movl %ecx,(%eax) @@ -84,15 +82,15 @@ verror: /* * Non-threaded version using global errno. */ - .globl _errno + .globl CNAME(errno) verror: #ifdef PIC PIC_PROLOGUE - movl PIC_GOT(_errno), %edx + movl PIC_GOT(CNAME(errno)), %edx movl %eax,(%edx) PIC_EPILOGUE #else - movl %eax,_errno + movl %eax,CNAME(errno) #endif movl $-1,%eax #endif /* !_THREAD_SAFE */ diff --git a/lib/libc/i386/sys/brk.S b/lib/libc/i386/sys/brk.S index c8311bb..1636858 100644 --- a/lib/libc/i386/sys/brk.S +++ b/lib/libc/i386/sys/brk.S @@ -33,20 +33,18 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: brk.S,v 1.1 1994/08/05 01:18:39 wollman Exp $ + * $Id: brk.S,v 1.2 1995/01/23 01:29:39 davidg Exp $ */ #if defined(SYSLIBC_RCS) && !defined(lint) .text - .asciz "$Id$" + .asciz "$Id: brk.S,v 1.2 1995/01/23 01:29:39 davidg Exp $" #endif /* SYSLIBC_RCS and not lint */ #include "SYS.h" -#define SYS_brk 17 - - .globl curbrk - .globl minbrk + .globl HIDENAME(curbrk) + .globl HIDENAME(minbrk) ENTRY(_brk) jmp ok @@ -54,39 +52,40 @@ ENTRY(brk) #ifdef PIC movl 4(%esp),%eax PIC_PROLOGUE - movl PIC_GOT(curbrk),%edx # set up GOT addressing - movl PIC_GOT(minbrk),%ecx # + movl PIC_GOT(HIDENAME(curbrk)),%edx # set up GOT addressing + movl PIC_GOT(HIDENAME(minbrk)),%ecx # cmpl %eax,(%ecx) PIC_EPILOGUE jl ok movl (%ecx),%eax movl %eax,4(%esp) ok: - lea SYS_brk,%eax - LCALL(7,0) + lea SYS_break,%eax + KERNCALL jb err movl 4(%esp),%eax movl %eax,(%edx) movl $0,%eax ret err: - jmp PIC_PLT(cerror) + PIC_PROLOGUE + jmp PIC_PLT(HIDENAME(cerror)) #else movl 4(%esp),%eax - cmpl %eax,minbrk + cmpl %eax,HIDENAME(minbrk) jl ok - movl minbrk,%eax + movl HIDENAME(minbrk),%eax movl %eax,4(%esp) ok: - lea SYS_brk,%eax - LCALL(7,0) + lea SYS_break,%eax + KERNCALL jb err movl 4(%esp),%eax - movl %eax,curbrk + movl %eax,HIDENAME(curbrk) movl $0,%eax ret err: - jmp cerror + jmp HIDENAME(cerror) #endif diff --git a/lib/libc/i386/sys/cerror.S b/lib/libc/i386/sys/cerror.S index 2cbb0f9..926dcd9 100644 --- a/lib/libc/i386/sys/cerror.S +++ b/lib/libc/i386/sys/cerror.S @@ -33,28 +33,31 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: cerror.S,v 1.3 1995/01/23 01:29:43 davidg Exp $ + * $Id: cerror.S,v 1.4 1996/01/22 00:00:57 julian Exp $ */ #if defined(SYSLIBC_RCS) && !defined(lint) .text - .asciz "$Id: cerror.S,v 1.3 1995/01/23 01:29:43 davidg Exp $" + .asciz "$Id: cerror.S,v 1.4 1996/01/22 00:00:57 julian Exp $" #endif /* SYSLIBC_RCS and not lint */ #include "SYS.h" + .globl HIDENAME(cerror) + #ifdef _THREAD_SAFE /* * Threaded version using __error(). */ - .globl ___error - .type ___error,@function -cerror: + .globl CNAME(__error) + .type CNAME(__error),@function +HIDENAME(cerror): pushl %eax #ifdef PIC - call PIC_PLT(___error) + /* The caller must execute the PIC prologue before jumping to cerror. */ + call PIC_PLT(CNAME(__error)) #else - call ___error + call CNAME(__error) #endif popl %ecx movl %ecx,(%eax) @@ -66,15 +69,15 @@ cerror: /* * Non-threaded version using global errno. */ - .globl _errno -cerror: + .globl CNAME(errno) +HIDENAME(cerror): #ifdef PIC - PIC_PROLOGUE - movl PIC_GOT(_errno),%ecx + /* The caller must execute the PIC prologue before jumping to cerror. */ + movl PIC_GOT(CNAME(errno)),%ecx movl %eax,(%ecx) PIC_EPILOGUE #else - movl %eax,_errno + movl %eax,CNAME(errno) #endif movl $-1,%eax movl $-1,%edx diff --git a/lib/libc/i386/sys/exect.S b/lib/libc/i386/sys/exect.S index 74a055b..59ce389 100644 --- a/lib/libc/i386/sys/exect.S +++ b/lib/libc/i386/sys/exect.S @@ -33,12 +33,12 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: exect.S,v 1.1 1994/08/05 01:18:42 wollman Exp $ + * $Id: exect.S,v 1.2 1995/01/23 01:29:46 davidg Exp $ */ #if defined(SYSLIBC_RCS) && !defined(lint) .text - .asciz "$Id$" + .asciz "$Id: exect.S,v 1.2 1995/01/23 01:29:46 davidg Exp $" #endif /* SYSLIBC_RCS and not lint */ #include "SYS.h" @@ -51,5 +51,6 @@ ENTRY(exect) orl $ PSL_T,%edx pushl %edx popf - LCALL(7,0) - jmp cerror /* exect(file, argv, env); */ + KERNCALL + PIC_PROLOGUE + jmp PIC_PLT(HIDENAME(cerror)) /* exect(file, argv, env); */ diff --git a/lib/libc/i386/sys/fork.S b/lib/libc/i386/sys/fork.S index 567aa4c..96cb4b6 100644 --- a/lib/libc/i386/sys/fork.S +++ b/lib/libc/i386/sys/fork.S @@ -33,17 +33,21 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: fork.S,v 1.2 1995/01/23 01:29:48 davidg Exp $ + * $Id: fork.S,v 1.3 1996/01/22 00:00:57 julian Exp $ */ #if defined(SYSLIBC_RCS) && !defined(lint) .text - .asciz "$Id: fork.S,v 1.2 1995/01/23 01:29:48 davidg Exp $" + .asciz "$Id: fork.S,v 1.3 1996/01/22 00:00:57 julian Exp $" #endif /* SYSLIBC_RCS and not lint */ #include "SYS.h" -PSYSCALL(fork) +#ifdef _THREAD_SAFE +PSYSCALL(fork,_thread_sys_fork) +#else +SYSCALL(fork) +#endif cmpl $0,%edx /* parent, since %edx == 0 in parent, 1 in child */ je 1f movl $0,%eax diff --git a/lib/libc/i386/sys/pipe.S b/lib/libc/i386/sys/pipe.S index 809445f..0dcf857 100644 --- a/lib/libc/i386/sys/pipe.S +++ b/lib/libc/i386/sys/pipe.S @@ -33,17 +33,21 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: pipe.S,v 1.2 1995/01/23 01:29:57 davidg Exp $ + * $Id: pipe.S,v 1.3 1996/01/22 00:00:58 julian Exp $ */ #if defined(SYSLIBC_RCS) && !defined(lint) .text - .asciz "$Id: pipe.S,v 1.2 1995/01/23 01:29:57 davidg Exp $" + .asciz "$Id: pipe.S,v 1.3 1996/01/22 00:00:58 julian Exp $" #endif /* SYSLIBC_RCS and not lint */ #include "SYS.h" -PSYSCALL(pipe) +#ifdef _THREAD_SAFE +PSYSCALL(pipe,_thread_sys_pipe) +#else +SYSCALL(pipe) +#endif movl 4(%esp),%ecx movl %eax,(%ecx) movl %edx,4(%ecx) diff --git a/lib/libc/i386/sys/ptrace.S b/lib/libc/i386/sys/ptrace.S index e3ac3a5..993c9be 100644 --- a/lib/libc/i386/sys/ptrace.S +++ b/lib/libc/i386/sys/ptrace.S @@ -33,12 +33,12 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: ptrace.S,v 1.1 1994/08/05 01:18:47 wollman Exp $ + * $Id: ptrace.S,v 1.2 1995/01/23 01:29:59 davidg Exp $ */ #if defined(SYSLIBC_RCS) && !defined(lint) .text - .asciz "$Id$" + .asciz "$Id: ptrace.S,v 1.2 1995/01/23 01:29:59 davidg Exp $" #endif /* SYSLIBC_RCS and not lint */ #include "SYS.h" @@ -47,15 +47,16 @@ ENTRY(ptrace) xorl %eax,%eax #ifdef PIC PIC_PROLOGUE - movl PIC_GOT(_errno),%edx + movl PIC_GOT(CNAME(errno)),%edx movl %eax,(%edx) PIC_EPILOGUE #else - movl %eax,_errno + movl %eax,CNAME(errno) #endif lea SYS_ptrace,%eax - LCALL(7,0) + KERNCALL jb err ret err: - jmp cerror + PIC_PROLOGUE + jmp PIC_PLT(HIDENAME(cerror)) diff --git a/lib/libc/i386/sys/rfork.S b/lib/libc/i386/sys/rfork.S index 189d399..c1e85e6 100644 --- a/lib/libc/i386/sys/rfork.S +++ b/lib/libc/i386/sys/rfork.S @@ -33,17 +33,21 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: rfork.S,v 1.1 1996/02/23 19:56:47 peter Exp $ */ #if defined(SYSLIBC_RCS) && !defined(lint) .text - .asciz "$Id$" + .asciz "$Id: rfork.S,v 1.1 1996/02/23 19:56:47 peter Exp $" #endif /* SYSLIBC_RCS and not lint */ #include "SYS.h" -PSYSCALL(rfork) +#ifdef _THREAD_SAFE +PSYSCALL(rfork,_thread_sys_rfork) +#else +SYSCALL(rfork) +#endif cmpl $0,%edx /* parent, since %edx == 0 in parent, 1 in child */ je 1f movl $0,%eax diff --git a/lib/libc/i386/sys/sbrk.S b/lib/libc/i386/sys/sbrk.S index 2d65b59..d5c48ddc 100644 --- a/lib/libc/i386/sys/sbrk.S +++ b/lib/libc/i386/sys/sbrk.S @@ -33,64 +33,63 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: sbrk.S,v 1.2 1995/01/23 01:30:04 davidg Exp $ + * $Id: sbrk.S,v 1.3 1995/10/04 15:58:57 phk Exp $ */ #if defined(SYSLIBC_RCS) && !defined(lint) .text - .asciz "$Id: sbrk.S,v 1.2 1995/01/23 01:30:04 davidg Exp $" + .asciz "$Id: sbrk.S,v 1.3 1995/10/04 15:58:57 phk Exp $" #endif /* SYSLIBC_RCS and not lint */ #include "SYS.h" -#define SYS_brk 17 - - .globl _end - .globl minbrk - .globl curbrk + .globl CNAME(end) + .globl HIDENAME(minbrk) + .globl HIDENAME(curbrk) .data -minbrk: .long _end -curbrk: .long _end +HIDENAME(minbrk): .long CNAME(end) +HIDENAME(curbrk): .long CNAME(end) .text ENTRY(sbrk) #ifdef PIC movl 4(%esp),%ecx PIC_PROLOGUE - movl PIC_GOT(curbrk),%edx + movl PIC_GOT(HIDENAME(curbrk)),%edx movl (%edx),%eax PIC_EPILOGUE testl %ecx,%ecx jz back addl %eax,4(%esp) - lea SYS_brk,%eax - LCALL(7,0) + lea SYS_break,%eax + KERNCALL jb err PIC_PROLOGUE - movl PIC_GOT(curbrk),%edx + movl PIC_GOT(HIDENAME(curbrk)),%edx movl (%edx),%eax addl %ecx,(%edx) PIC_EPILOGUE back: ret err: - jmp PIC_PLT(cerror) + PIC_PROLOGUE + jmp PIC_PLT(HIDENAME(cerror)) #else /* !PIC */ movl 4(%esp),%ecx - movl curbrk,%eax + movl HIDENAME(curbrk),%eax testl %ecx,%ecx jz back addl %eax,4(%esp) - lea SYS_brk,%eax - LCALL(7,0) + lea SYS_break,%eax + KERNCALL jb err - movl curbrk,%eax - addl %ecx,curbrk + movl HIDENAME(curbrk),%eax + addl %ecx,HIDENAME(curbrk) back: ret err: - jmp cerror + jmp HIDENAME(cerror) #endif /* PIC */ diff --git a/lib/libc/i386/sys/setlogin.S b/lib/libc/i386/sys/setlogin.S index 96c7886..1ec31b9 100644 --- a/lib/libc/i386/sys/setlogin.S +++ b/lib/libc/i386/sys/setlogin.S @@ -33,27 +33,27 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: setlogin.S,v 1.1 1994/08/05 01:18:50 wollman Exp $ + * $Id: setlogin.S,v 1.2 1995/01/23 01:30:06 davidg Exp $ */ #if defined(LIBC_RCS) && !defined(lint) .text - .asciz "$Id$" + .asciz "$Id: setlogin.S,v 1.2 1995/01/23 01:30:06 davidg Exp $" #endif /* LIBC_RCS and not lint */ #include "SYS.h" -.globl __logname_valid /* in getlogin() */ +.globl CNAME(_logname_valid) /* in getlogin() */ SYSCALL(setlogin) #ifdef PIC PIC_PROLOGUE pushl %eax - movl PIC_GOT(__logname_valid),%eax + movl PIC_GOT(CNAME(_logname_valid)),%eax movl $0,(%eax) popl %eax PIC_EPILOGUE #else - movl $0,__logname_valid + movl $0,CNAME(_logname_valid) #endif ret /* setlogin(name) */ diff --git a/lib/libc/i386/sys/sigpending.S b/lib/libc/i386/sys/sigpending.S index dba82ee..a56c8f7 100644 --- a/lib/libc/i386/sys/sigpending.S +++ b/lib/libc/i386/sys/sigpending.S @@ -33,17 +33,21 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: sigpending.S,v 1.2 1995/01/23 01:30:08 davidg Exp $ + * $Id: sigpending.S,v 1.3 1996/01/22 00:00:59 julian Exp $ */ #if defined(SYSLIBC_RCS) && !defined(lint) .text - .asciz "$Id: sigpending.S,v 1.2 1995/01/23 01:30:08 davidg Exp $" + .asciz "$Id: sigpending.S,v 1.3 1996/01/22 00:00:59 julian Exp $" #endif /* SYSLIBC_RCS and not lint */ #include "SYS.h" -PSYSCALL(sigpending) +#ifdef _THREAD_SAFE +PSYSCALL(sigpending,_thread_sys_sigpending) +#else +SYSCALL(sigpending) +#endif movl 4(%esp),%ecx # fetch pointer to... movl %eax,(%ecx) # store old mask xorl %eax,%eax diff --git a/lib/libc/i386/sys/sigprocmask.S b/lib/libc/i386/sys/sigprocmask.S index 69c50a4..1f48c6b 100644 --- a/lib/libc/i386/sys/sigprocmask.S +++ b/lib/libc/i386/sys/sigprocmask.S @@ -33,18 +33,19 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: sigprocmask.S,v 1.2 1995/01/23 01:30:11 davidg Exp $ + * $Id: sigprocmask.S,v 1.3 1996/01/22 00:00:59 julian Exp $ */ #if defined(SYSLIBC_RCS) && !defined(lint) .text - .asciz "$Id: sigprocmask.S,v 1.2 1995/01/23 01:30:11 davidg Exp $" + .asciz "$Id: sigprocmask.S,v 1.3 1996/01/22 00:00:59 julian Exp $" #endif /* SYSLIBC_RCS and not lint */ #include "SYS.h" err: - jmp cerror + PIC_PROLOGUE + jmp PIC_PLT(HIDENAME(cerror)) #ifdef _THREAD_SAFE ENTRY(_thread_sys_sigprocmask) @@ -59,8 +60,8 @@ ENTRY(sigprocmask) jmp 2f 1: movl (%ecx),%ecx # fetch indirect ... movl %ecx,8(%esp) # to new mask arg -2: movl $ SYS_sigprocmask , %eax - LCALL(0x7,0) +2: lea SYS_sigprocmask,%eax + KERNCALL jb err movl 12(%esp),%ecx # fetch old mask requested cmpl $0,%ecx # test if old mask requested diff --git a/lib/libc/i386/sys/sigreturn.S b/lib/libc/i386/sys/sigreturn.S index 6f3f571..cce518b 100644 --- a/lib/libc/i386/sys/sigreturn.S +++ b/lib/libc/i386/sys/sigreturn.S @@ -33,25 +33,24 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: sigreturn.S,v 1.2 1995/01/23 01:30:16 davidg Exp $ + * $Id: sigreturn.S,v 1.3 1996/01/22 00:01:00 julian Exp $ */ #if defined(SYSLIBC_RCS) && !defined(lint) .text - .asciz "$Id: sigreturn.S,v 1.2 1995/01/23 01:30:16 davidg Exp $" + .asciz "$Id: sigreturn.S,v 1.3 1996/01/22 00:01:00 julian Exp $" #endif /* SYSLIBC_RCS and not lint */ #include "SYS.h" /* - * We must preserve the state of the registers as the user has set them up. + * NOTE: If the profiling ENTRY() code ever changes any registers, they + * must be saved. On FreeBSD, this is not the case. */ -#ifdef PROF -#undef ENTRY -#define ENTRY(x) \ - .globl _/**/x; .align 2; _/**/x: pusha ; \ - .data; 1:; .long 0; .text; movl $1b,%eax; call mcount; popa ; nop -#endif /* PROF */ -PSYSCALL(sigreturn) +#ifdef _THREAD_SAFE +PSYSCALL(sigreturn,_thread_sys_sigreturn) +#else +SYSCALL(sigreturn) +#endif ret diff --git a/lib/libc/i386/sys/sigsuspend.S b/lib/libc/i386/sys/sigsuspend.S index 4d70ea6..3d64e48 100644 --- a/lib/libc/i386/sys/sigsuspend.S +++ b/lib/libc/i386/sys/sigsuspend.S @@ -33,18 +33,19 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: sigsuspend.S,v 1.2 1995/01/23 01:30:20 davidg Exp $ + * $Id: sigsuspend.S,v 1.3 1996/01/22 00:01:01 julian Exp $ */ #if defined(SYSLIBC_RCS) && !defined(lint) .text - .asciz "$Id: sigsuspend.S,v 1.2 1995/01/23 01:30:20 davidg Exp $" + .asciz "$Id: sigsuspend.S,v 1.3 1996/01/22 00:01:01 julian Exp $" #endif /* SYSLIBC_RCS and not lint */ #include "SYS.h" err: - jmp cerror + PIC_PROLOGUE + jmp PIC_PLT(HIDENAME(cerror)) #ifdef _THREAD_SAFE ENTRY(_thread_sys_sigsuspend) @@ -54,8 +55,8 @@ ENTRY(sigsuspend) movl 4(%esp),%eax # fetch mask arg movl (%eax),%eax # indirect to mask arg movl %eax,4(%esp) - movl $ SYS_sigsuspend ,%eax - LCALL(0x7,0) + lea SYS_sigsuspend,%eax + KERNCALL jb err xorl %eax,%eax # shouldn t happen ret diff --git a/lib/libc/i386/sys/syscall.S b/lib/libc/i386/sys/syscall.S index 8fcbec9..ccc1b93 100644 --- a/lib/libc/i386/sys/syscall.S +++ b/lib/libc/i386/sys/syscall.S @@ -33,12 +33,12 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: syscall.S,v 1.1 1994/08/05 01:18:55 wollman Exp $ + * $Id: syscall.S,v 1.2 1995/01/23 01:30:24 davidg Exp $ */ #if defined(SYSLIBC_RCS) && !defined(lint) .text - .asciz "$Id$" + .asciz "$Id: syscall.S,v 1.2 1995/01/23 01:30:24 davidg Exp $" #endif /* SYSLIBC_RCS and not lint */ #include "SYS.h" @@ -47,10 +47,11 @@ ENTRY(syscall) pop %ecx /* rta */ pop %eax /* syscall number */ push %ecx - LCALL(7,0) + KERNCALL push %ecx /* need to push a word to keep stack frame intact upon return; the word must be the return address. */ jb 1f ret 1: - jmp cerror + PIC_PROLOGUE + jmp PIC_PLT(HIDENAME(cerror)) |