* hurd/hurdstartup.c (_hurd_startup): Use new
authorRoland McGrath <roland@gnu.org>
Thu, 26 Oct 1995 03:59:27 +0000 (03:59 +0000)
committerRoland McGrath <roland@gnu.org>
Thu, 26 Oct 1995 03:59:27 +0000 (03:59 +0000)
exec_startup_get_info RPC from exec_startup.defs
in place of old exec_startup from exec.defs.  Remove kludge to
guess user entry and phdr locations, since the new RPC gives us
that info.

* sysdeps/generic/_strerror.c: Undo last change.

15 files changed:
ChangeLog
sysdeps/generic/_strerror.c
sysdeps/unix/configure.in
sysdeps/unix/sysv/linux/i386/brk.S
sysdeps/unix/sysv/linux/i386/mmap.S
sysdeps/unix/sysv/linux/i386/sbrk.S
sysdeps/unix/sysv/linux/i386/socket.S
sysdeps/unix/sysv/linux/i386/syscall.S
sysdeps/unix/sysv/linux/i386/sysdep.h
sysdeps/unix/sysv/linux/i386/xmknod.S
sysdeps/unix/sysv/linux/i386/xstat.S
sysdeps/unix/sysv/linux/sigaction.S [deleted file]
sysdeps/unix/sysv/linux/sigaction.h [new file with mode: 0644]
sysdeps/unix/sysv/linux/signal.S [deleted file]
sysdeps/unix/sysv/linux/syscall.h

index ec31329..9ca3239 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,13 @@
 Wed Oct 25 14:23:35 1995  Roland McGrath  <roland@churchy.gnu.ai.mit.edu>
 
+       * hurd/hurdstartup.c (_hurd_startup): Use new
+       exec_startup_get_info RPC from exec_startup.defs
+       in place of old exec_startup from exec.defs.  Remove kludge to
+       guess user entry and phdr locations, since the new RPC gives us
+       that info.
+
        * stdio/stdio.h (sys_errlist, _sys_errlist): Declare const.
+       * sysdeps/generic/_strerror.c: Undo last change.
 
        * sysdeps/unix/sysv/linux/stat.c: New file.
        * sysdeps/unix/sysv/linux/fstat.c: New file.
index 71fabe7..72ebb21 100644 (file)
@@ -31,9 +31,6 @@ _strerror_internal (errnum, buf, buflen)
      char *buf;
      size_t buflen;
 {
-  extern const char *const _sys_errlist[];
-  extern const int _sys_nerr;
-
   if (errnum < 0 || errnum > _sys_nerr)
     {
       int len = __snprintf (buf, buflen, _("Unknown error %d"), errnum);
index 37b6dca..6841a4f 100644 (file)
@@ -70,8 +70,8 @@ for unix_function in \
   dup2 lstat mkdir rmdir readlink symlink rename swapon \
   access select getgroups setgroups \
   getitimer setitimer \
-  getdomainname/getdomain=bsd/bsd4.4 \
-  setdomainname/setdomain=bsd/bsd4.4 \
+  getdomainname:getdomain=bsd/bsd4.4 \
+  setdomainname:setdomain=bsd/bsd4.4 \
   fchdir=bsd/bsd4.4 \
   profil=bsd readv=bsd writev=bsd \
   getpriority setpriority \
@@ -85,7 +85,7 @@ do
   unix_srcdir=common
   eval "unix_syscall=`echo $unix_function | \
                      sed -e 's@=\(.*\)$@ unix_srcdir=\1@' \
-                         -e 's@/\([^=/]*\)$@ unix_srcname=\1@'`"
+                         -e 's@:\(.*\)@ unix_srcname=\1@'`"
   test -z "$unix_srcname" && unix_srcname=$unix_syscall
 
   unix_implementor=none
index ef2f55d..2a9a2bc 100644 (file)
@@ -32,8 +32,8 @@ C_LABEL(__curbrk)
 #endif
 
 .text
-.globl C_SYMBOL_NAME(syscall_error)
 
+       SYSCALL_ERROR_HANDLER
 ENTRY (__brk)
        movl %ebx, %edx
        movl $SYS_ify(brk), %eax
index 96ea870..1d1d628 100644 (file)
@@ -18,7 +18,8 @@ Cambridge, MA 02139, USA.  */
 
 #include <sysdep.h>
 
-.globl syscall_error
+       .text
+       SYSCALL_ERROR_HANDLER
 
 ENTRY (__mmap)
 
index 7a0e940..e38e88f 100644 (file)
@@ -22,7 +22,7 @@ Cambridge, MA 02139, USA.  */
 .globl C_SYMBOL_NAME(__curbrk)
 
 .text
-.globl C_SYMBOL_NAME(syscall_error)
+       SYSCALL_ERROR_HANDLER
 
 ENTRY (__sbrk)
 
@@ -53,7 +53,7 @@ ENTRY (__sbrk)
        movl C_SYMBOL_NAME(__curbrk), %ebx
        movl %ebx, %eax
 #endif
-       
+
        addl 4(%esp), %ebx
        cmpl %ebx, %eax
        je .L2
index 3d3a672..b2e6b26 100644 (file)
@@ -22,7 +22,8 @@ Cambridge, MA 02139, USA.  */
 #define P(a, b) P2(a, b)
 #define P2(a, b) a##b
 
-.globl syscall_error
+       .text
+       SYSCALL_ERROR_HANDLER
 
 /* The socket-oriented system calls are handled unusally in Linux.
    They are all gated through the single `socketcall' system call number.
index 6e6aa5d..52eb48a 100644 (file)
@@ -18,14 +18,14 @@ Cambridge, MA 02139, USA.  */
 
 #include <sysdep.h>
 
-.globl syscall_error
+       .text
+       SYSCALL_ERROR_HANDLER   /* Define error handler for PIC.  */
 ENTRY (syscall)
-       popl %ecx               /* Pop return address into %ecx.  */
-       popl %eax               /* Pop syscall number into %eax.  */
-       pushl %ecx              /* Push back return address.  */
-       DO_CALL (5)             /* Frob the args and do the system call.  */
-       movl (%esp), %ecx
-       pushl %ecx
+       PUSHARGS_5              /* Save register contents.  */
+       _DOARGS_5(36)           /* Load arguments.  */
+       movl 16(%esp), %eax     /* Load syscall number into %eax.  */
+       int $0x80               /* Do the system call.  */
+       POPARGS_5               /* Restore register contents.  */
        testl %eax, %eax        /* Check %eax for error.  */
        jl JUMPTARGET(syscall_error) /* Jump to error handler if negative.  */
        ret                     /* Return to caller.  */
index 7bd910e..f6da272 100644 (file)
@@ -44,8 +44,7 @@ Cambridge, MA 02139, USA.  */
   .text;                                                                     \
   SYSCALL_ERROR_HANDLER                                                              \
   ENTRY (name)                                                               \
-    movl $SYS_ify (syscall_name), %eax;                                              \
-    DO_CALL (args);                                                          \
+    DO_CALL (args, syscall_name);                                            \
     testl %eax, %eax;                                                        \
     jl syscall_error;
 
@@ -62,7 +61,7 @@ syscall_error:                                                                      \
   movl errno@GOT(%ecx), %ecx;                                                \
   movl %eax, (%ecx);                                                         \
   movl $-1, %eax;                                                            \
-  ret
+  ret;
 #endif
 
 /* We define our own ENTRY macro because the alignment should be 16 for
@@ -119,9 +118,10 @@ syscall_error:                                                                   \
    i386 and i486 processors though.  */
 
 #undef DO_CALL
-#define DO_CALL(args)                                                        \
+#define DO_CALL(args, syscall_name)                                          \
     PUSHARGS_##args                                                          \
     DOARGS_##args                                                            \
+    movl $SYS_ify (syscall_name), %eax;                                              \
     int $0x80                                                                \
     POPARGS_##args
 
index fde3165..10778bd 100644 (file)
@@ -19,21 +19,20 @@ Cambridge, MA 02139, USA.  */
 #include <sysdep.h>
 #include <errnos.h>
 
-.globl syscall_error
+       .text
+       SYSCALL_ERROR_HANDLER   /* Error handler for PIC.  */
 ENTRY (__xmknod)
        popl %ecx               /* Pop return address into %eax.  */
        popl %edx               /* Pop version number into %edx.  */
        pushl %ecx              /* Push back the return address.  */
 
-       movl $SYS_ify(mknod), %eax
-                       /* Load syscall number for prev_stat in %eax.  */
        cmpl $1, %edx           /* Version 1 xstat call?  */
        je .L1                  /* Yes, do syscall.  */
 
        movl $-EINVAL, %eax     /* Load error code into %eax.  */
        jmp .L2
 
-.L1:   DO_CALL (3)             /* Do the syscall.   */
+.L1:   DO_CALL (3, mknod)      /* Do the syscall.   */
 
        movl (%esp), %ecx
        testl %eax, %eax        /* Check for error.  */
index 34822be..58c5f55 100644 (file)
@@ -19,23 +19,20 @@ Cambridge, MA 02139, USA.  */
 #include <sysdep.h>
 #include <errnos.h>
 
-#define SYS_expand(name) SYS_ify(name)
-
-.globl syscall_error
+       .text
+       SYSCALL_ERROR_HANDLER   /* Error handler for PIC.  */
 ENTRY (__xstat)
        popl %ecx               /* Pop return address into %eax.  */
        popl %edx               /* Pop version number into %edx.  */
        pushl %ecx              /* Push back the return address.  */
 
-       movl $SYS_expand(stat), %eax
-                       /* Load syscall number for prev_stat in %eax.  */
        cmpl $1, %edx           /* Version 1 xstat call?  */
        je .L1                  /* Yes, do syscall.  */
 
        movl $-EINVAL, %eax     /* Load error code into %eax.  */
        jmp .L2
 
-.L1:   DO_CALL (2)             /* Do the syscall.   */
+.L1:   DO_CALL (2, stat)       /* Do the syscall.   */
 
        movl (%esp), %ecx
        testl %eax, %eax        /* Check for error.  */
diff --git a/sysdeps/unix/sysv/linux/sigaction.S b/sysdeps/unix/sysv/linux/sigaction.S
deleted file mode 100644 (file)
index 0618d6e..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-/* Copyright (C) 1995 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
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB.  If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA.  */
-
-#include <sysdep.h>
-
-SYSCALL__ (sigaction, 3)
-       ret
-
-weak_alias (__sigaction, sigaction)
diff --git a/sysdeps/unix/sysv/linux/sigaction.h b/sysdeps/unix/sysv/linux/sigaction.h
new file mode 100644 (file)
index 0000000..d893078
--- /dev/null
@@ -0,0 +1,54 @@
+/* The proper definitions for Linux's sigaction.
+Copyright (C) 1993, 1994, 1995 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
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB.  If
+not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
+
+/* Structure describing the action to be taken when a signal arrives.  */
+struct sigaction
+  {
+    /* Signal handler.  */
+    __sighandler_t sa_handler;
+
+    /* Additional set of signals to be blocked.  */
+    __sigset_t sa_mask;
+
+    /* Special flags.  */
+    unsigned long sa_flags;
+
+    /* Restore handler.  */
+    void (*sa_restorer) __P ((void));
+  };
+
+/* Bits in `sa_flags'.  */
+#define        SA_NOCLDSTOP 1          /* Don't send SIGCHLD when children stop.  */
+#ifdef __USE_MISC
+#define SA_STACK     0x08000000        /* Use signal stack by using `sa_restorer'.  */
+#define SA_RESTART   0x10000000        /* Don't restart syscall on signal return.  */
+#define SA_INTERRUPT 0x20000000        /* Historical no-op.  */
+#define SA_NODEFER   0x40000000        /* Don't automatically block the signal when
+                                  its handler is being executed.  */
+#define SA_RESETHAND 0x80000000        /* Reset to SIG_DFL on entry to handler.  */
+
+/* Some aliases for the SA_ constants.  */
+#define SA_NOMASK      SA_NODEFER
+#define SA_ONESHOT     SA_RESETHAND
+#endif
+
+/* Values for the HOW argument to `sigprocmask'.  */
+#define        SIG_BLOCK       0       /* Block signals.  */
+#define        SIG_UNBLOCK     1       /* Unblock signals.  */
+#define        SIG_SETMASK     2       /* Set the set of blocked signals.  */
diff --git a/sysdeps/unix/sysv/linux/signal.S b/sysdeps/unix/sysv/linux/signal.S
deleted file mode 100644 (file)
index 68582a6..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#include <sysdeps/unix/sysv/signal.S>
-
-/* Used in siginterrupt() */
-
-       .data
-       .globl _sigintr
-_sigintr:
-       .long 0
index fe6cfcf..efe285c 100644 (file)
@@ -25,34 +25,10 @@ Cambridge, MA 02139, USA.  */
 #include <asm/unistd.h>
 
 /* Among the system calls defined there are
-       _dup2   
-       _mkdir  
-       _rmdir  
-       _readlink       
-       _symlink        
-       _rename         
-       _swapon         
-       _access         
-       _select         
-       _getgroups      
-       _setgroups      
-       _getitimer      
-       _setitimer      
        _setdomainname  
-       _getrlimit      
-       _setrlimit      
-       _getrusage      
-       _getpriority    
-       _setpriority    
-       _truncate       
-       _ftruncate      
-       _setpgid        
-       _fchmod 
        _fchdir 
-       _fchown 
-       _setregid       
-       _setreuid       
-       _vhangup        
+       _readv  
+       _writev 
    (This is a hack for the autoconf mechanism.  Don't change a single
     character, esp white spaces, unless you know what you are doing!)  */