From 8fb3e0079a0512e8525f6c5897c51563d57801e7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 3 Mar 1998 17:58:38 +0000 Subject: Update. 1998-03-03 17:55 Ulrich Drepper * elf/sprof.c: Cleanup a bit. 1998-03-03 08:01 H.J. Lu * sysdeps/generic/sysdep.h (L): New. Define. * sysdeps/unix/sysv/linux/i386/sysdep.h (L): New. Define. * sysdeps/i386/i586/addmul_1.S: Fix a typo. * sysdeps/unix/sysv/linux/i386/clone.S: Follow Intel's advice to have only one exit point for functions. * sysdeps/unix/sysv/linux/i386/mmap.S: Likewise. * sysdeps/unix/sysv/linux/i386/s_pread64.S: Likewise. * sysdeps/unix/sysv/linux/i386/s_pwrite64.S: Likewise. * sysdeps/unix/sysv/linux/i386/socket.S: Likewise. * sysdeps/unix/sysv/linux/i386/syscall.S: Likewise. 1998-03-03 Andreas Jaeger * sysdeps/unix/sysv/linux/sigaction.c (__sigaction): Safe and reset errno so that errno isn't set to ENOSYS in the first call. * sysdeps/unix/sysv/linux/i386/sigaction.c (__sigaction): Likewise. * sysdeps/unix/sysv/linux/sigsuspend.c (__sigsuspend): Likewise. * sysdeps/unix/sysv/linux/sigprocmask.c (__sigprocmask): Likewise. * sysdeps/unix/sysv/linux/sigpending.c (sigpending): Likewise. --- sysdeps/unix/sysv/linux/i386/clone.S | 3 ++- sysdeps/unix/sysv/linux/i386/mmap.S | 3 ++- sysdeps/unix/sysv/linux/i386/s_pread64.S | 5 +++-- sysdeps/unix/sysv/linux/i386/s_pwrite64.S | 5 +++-- sysdeps/unix/sysv/linux/i386/sigaction.c | 2 ++ sysdeps/unix/sysv/linux/i386/socket.S | 3 ++- sysdeps/unix/sysv/linux/i386/syscall.S | 3 ++- sysdeps/unix/sysv/linux/i386/sysdep.h | 3 +++ sysdeps/unix/sysv/linux/sigaction.c | 2 ++ sysdeps/unix/sysv/linux/sigpending.c | 2 ++ sysdeps/unix/sysv/linux/sigprocmask.c | 2 ++ sysdeps/unix/sysv/linux/sigsuspend.c | 2 ++ 12 files changed, 27 insertions(+), 8 deletions(-) (limited to 'sysdeps/unix/sysv/linux') diff --git a/sysdeps/unix/sysv/linux/i386/clone.S b/sysdeps/unix/sysv/linux/i386/clone.S index 0aec95e219..88d0e27549 100644 --- a/sysdeps/unix/sysv/linux/i386/clone.S +++ b/sysdeps/unix/sysv/linux/i386/clone.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@tamu.edu) @@ -59,6 +59,7 @@ ENTRY(__clone) jl syscall_error jz thread_start +L(pseudo_end): ret thread_start: diff --git a/sysdeps/unix/sysv/linux/i386/mmap.S b/sysdeps/unix/sysv/linux/i386/mmap.S index 30bbcdf80a..5c2449e961 100644 --- a/sysdeps/unix/sysv/linux/i386/mmap.S +++ b/sysdeps/unix/sysv/linux/i386/mmap.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1997, 1998 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 @@ -40,6 +40,7 @@ ENTRY (__mmap) ja syscall_error /* Successful; return the syscall's value. */ +L(pseudo_end): ret PSEUDO_END (__mmap) diff --git a/sysdeps/unix/sysv/linux/i386/s_pread64.S b/sysdeps/unix/sysv/linux/i386/s_pread64.S index 9e14aa815f..7f8816b3ba 100644 --- a/sysdeps/unix/sysv/linux/i386/s_pread64.S +++ b/sysdeps/unix/sysv/linux/i386/s_pread64.S @@ -1,5 +1,5 @@ /* pread64 syscall for Linux/ix86. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 1998 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 @@ -48,7 +48,8 @@ ENTRY (__syscall_pread64) POPARGS_5 /* Restore register contents. */ cmpl $-4095, %eax /* Check %eax for error. */ jae syscall_error /* Jump to error handler if error. */ - ret /* Return to caller. */ #endif + ret /* Return to caller. */ +L(pseudo_end): PSEUDO_END (__syscall_pread64) diff --git a/sysdeps/unix/sysv/linux/i386/s_pwrite64.S b/sysdeps/unix/sysv/linux/i386/s_pwrite64.S index a21fe2f99f..7b72d12f0b 100644 --- a/sysdeps/unix/sysv/linux/i386/s_pwrite64.S +++ b/sysdeps/unix/sysv/linux/i386/s_pwrite64.S @@ -1,5 +1,5 @@ /* pwrite64 syscall for Linux/ix86. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 1998 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 @@ -48,7 +48,8 @@ ENTRY (__syscall_pwrite64) POPARGS_5 /* Restore register contents. */ cmpl $-4095, %eax /* Check %eax for error. */ jae syscall_error /* Jump to error handler if error. */ - ret /* Return to caller. */ #endif +L(pseudo_end): + ret /* Return to caller. */ PSEUDO_END (__syscall_pwrite64) diff --git a/sysdeps/unix/sysv/linux/i386/sigaction.c b/sysdeps/unix/sysv/linux/i386/sigaction.c index a6d2b63634..0110a80a8a 100644 --- a/sysdeps/unix/sysv/linux/i386/sigaction.c +++ b/sysdeps/unix/sysv/linux/i386/sigaction.c @@ -48,6 +48,7 @@ __sigaction (int sig, const struct sigaction *act, struct sigaction *oact) if (!__libc_missing_rt_sigs) { struct kernel_sigaction kact, koact; + int saved_errno = errno; if (act) { @@ -76,6 +77,7 @@ __sigaction (int sig, const struct sigaction *act, struct sigaction *oact) return result; } + __set_errno (saved_errno); __libc_missing_rt_sigs = 1; } diff --git a/sysdeps/unix/sysv/linux/i386/socket.S b/sysdeps/unix/sysv/linux/i386/socket.S index f649470122..4326676bc2 100644 --- a/sysdeps/unix/sysv/linux/i386/socket.S +++ b/sysdeps/unix/sysv/linux/i386/socket.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1997, 1998 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 @@ -58,6 +58,7 @@ ENTRY (__socket) jae syscall_error /* Successful; return the syscall's value. */ +L(pseudo_end): ret PSEUDO_END (__socket) diff --git a/sysdeps/unix/sysv/linux/i386/syscall.S b/sysdeps/unix/sysv/linux/i386/syscall.S index 6a020e0d0e..349408de30 100644 --- a/sysdeps/unix/sysv/linux/i386/syscall.S +++ b/sysdeps/unix/sysv/linux/i386/syscall.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1996 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1998 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 @@ -31,6 +31,7 @@ ENTRY (syscall) POPARGS_5 /* Restore register contents. */ cmpl $-4095, %eax /* Check %eax for error. */ jae syscall_error /* Jump to error handler if error. */ +L(pseudo_end): ret /* Return to caller. */ PSEUDO_END (syscall) diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.h b/sysdeps/unix/sysv/linux/i386/sysdep.h index 7455e8d321..4ebcc6c852 100644 --- a/sysdeps/unix/sysv/linux/i386/sysdep.h +++ b/sysdeps/unix/sysv/linux/i386/sysdep.h @@ -30,6 +30,9 @@ #undef SYS_ify #define SYS_ify(syscall_name) __NR_##syscall_name +/* ELF-like local names start with `.L'. */ +#undef L +#define L(name) .L##name #ifdef ASSEMBLER diff --git a/sysdeps/unix/sysv/linux/sigaction.c b/sysdeps/unix/sysv/linux/sigaction.c index 49cb3b6a89..773bfa067f 100644 --- a/sysdeps/unix/sysv/linux/sigaction.c +++ b/sysdeps/unix/sysv/linux/sigaction.c @@ -50,6 +50,7 @@ __sigaction (sig, act, oact) if (!__libc_missing_rt_sigs) { struct kernel_sigaction kact, koact; + int saved_errno = errno; if (act) { @@ -80,6 +81,7 @@ __sigaction (sig, act, oact) return result; } + __set_errno (saved_errno); __libc_missing_rt_sigs = 1; } diff --git a/sysdeps/unix/sysv/linux/sigpending.c b/sysdeps/unix/sysv/linux/sigpending.c index 4d5514a1bc..1776fdd65f 100644 --- a/sysdeps/unix/sysv/linux/sigpending.c +++ b/sysdeps/unix/sysv/linux/sigpending.c @@ -40,11 +40,13 @@ sigpending (set) { /* XXX The size argument hopefully will have to be changed to the real size of the user-level sigset_t. */ + int saved_errno = errno; int result = __syscall_rt_sigpending (set, _NSIG / 8); if (result >= 0 || errno != ENOSYS) return result; + __set_errno (saved_errno); __libc_missing_rt_sigs = 1; } diff --git a/sysdeps/unix/sysv/linux/sigprocmask.c b/sysdeps/unix/sysv/linux/sigprocmask.c index 476f46a8e6..064179e2b8 100644 --- a/sysdeps/unix/sysv/linux/sigprocmask.c +++ b/sysdeps/unix/sysv/linux/sigprocmask.c @@ -41,11 +41,13 @@ __sigprocmask (how, set, oset) { /* XXX The size argument hopefully will have to be changed to the real size of the user-level sigset_t. */ + int saved_errno = errno; int result = __syscall_rt_sigprocmask (how, set, oset, _NSIG / 8); if (result >= 0 || errno != ENOSYS) return result; + __set_errno (saved_errno); __libc_missing_rt_sigs = 1; } diff --git a/sysdeps/unix/sysv/linux/sigsuspend.c b/sysdeps/unix/sysv/linux/sigsuspend.c index 197015401d..a5d2eb0ad7 100644 --- a/sysdeps/unix/sysv/linux/sigsuspend.c +++ b/sysdeps/unix/sysv/linux/sigsuspend.c @@ -40,11 +40,13 @@ __sigsuspend (set) { /* XXX The size argument hopefully will have to be changed to the real size of the user-level sigset_t. */ + int saved_errno = errno; int result = __syscall_rt_sigsuspend (set, _NSIG / 8); if (result >= 0 || errno != ENOSYS) return result; + __set_errno (saved_errno); __libc_missing_rt_sigs = 1; } -- cgit v1.2.3