From d030d52da237cfe4159a06fe78564368bb837d71 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 11 Oct 2002 10:51:31 +0000 Subject: [PATCH] 2002-10-07 Roland McGrath * sysdeps/generic/errno.c: New file. * csu/Makefile (aux): New variable, list errno. * sysdeps/unix/sysv/linux/i386/sysdep.S (errno, _errno): Remove defns. * sysdeps/unix/sysv/linux/m68k/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/x86_64/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/arm/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/cris/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/hppa/sysdep.c: Likewise. * sysdeps/unix/sysv/linux/ia64/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/powerpc/sysdep.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/sh/sysdep.S: Likewise. * sysdeps/unix/alpha/sysdep.S: Likewise. * sysdeps/generic/start.c: Likewise. * sysdeps/unix/start.c: Likewise. * sysdeps/unix/arm/start.c: Likewise. * sysdeps/unix/bsd/ultrix4/mips/start.S: Likewise. * sysdeps/unix/sparc/start.c: Likewise. * sysdeps/unix/sysv/irix4/start.c: Likewise. * sysdeps/unix/sysv/linux/mips/sysdep.S: File removed. --- sysdeps/unix/alpha/sysdep.S | 13 ------------- sysdeps/unix/arm/start.c | 5 ----- sysdeps/unix/bsd/ultrix4/mips/start.S | 3 --- sysdeps/unix/sysv/irix4/start.c | 3 --- sysdeps/unix/sysv/linux/arm/sysdep.S | 7 ------- sysdeps/unix/sysv/linux/cris/sysdep.S | 8 -------- sysdeps/unix/sysv/linux/hppa/sysdep.c | 5 ----- sysdeps/unix/sysv/linux/m68k/sysdep.S | 13 ------------- sysdeps/unix/sysv/linux/mips/sysdep.S | 35 ----------------------------------- 9 files changed, 92 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/mips/sysdep.S diff --git a/sysdeps/unix/alpha/sysdep.S b/sysdeps/unix/alpha/sysdep.S index 5279b86..05c0091 100644 --- a/sysdeps/unix/alpha/sysdep.S +++ b/sysdeps/unix/alpha/sysdep.S @@ -20,19 +20,6 @@ #include #include - .section .bss - .globl errno - .align 2 -errno: .space 4 -#ifdef __ELF__ - .type errno, @object - .size errno, 4 -#endif - .globl __errno -__errno = errno - .globl _errno -_errno = errno - .text .align 2 diff --git a/sysdeps/unix/arm/start.c b/sysdeps/unix/arm/start.c index a8fea14..6088faa 100644 --- a/sysdeps/unix/arm/start.c +++ b/sysdeps/unix/arm/start.c @@ -28,11 +28,6 @@ int __data_start = 0; weak_alias (__data_start, data_start) #endif -#ifndef errno -volatile int __errno; -strong_alias (__errno, errno) -#endif - extern void __libc_init __P ((int argc, char **argv, char **envp)); extern int main __P ((int argc, char **argv, char **envp)); diff --git a/sysdeps/unix/bsd/ultrix4/mips/start.S b/sysdeps/unix/bsd/ultrix4/mips/start.S index df86229..c2fc488 100644 --- a/sysdeps/unix/bsd/ultrix4/mips/start.S +++ b/sysdeps/unix/bsd/ultrix4/mips/start.S @@ -19,9 +19,6 @@ #include -__errno: -.comm errno, 4 - ENTRY(__start) .set noreorder diff --git a/sysdeps/unix/sysv/irix4/start.c b/sysdeps/unix/sysv/irix4/start.c index 719d017..a88d0d4 100644 --- a/sysdeps/unix/sysv/irix4/start.c +++ b/sysdeps/unix/sysv/irix4/start.c @@ -27,9 +27,6 @@ /* The first piece of initialized data. */ int __data_start = 0; -__volatile int __errno = 0; -strong_alias (__errno, errno) - extern void __libc_init __P ((int argc, char **argv, char **envp)); extern int main __P ((int argc, char **argv, char **envp)); diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.S b/sysdeps/unix/sysv/linux/arm/sysdep.S index 48dcffa..1a4de2a 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.S +++ b/sysdeps/unix/sysv/linux/arm/sysdep.S @@ -18,13 +18,6 @@ #include -/* We define errno here, to be consistent with Linux/i386. */ - .bss - .globl C_SYMBOL_NAME(errno) - .type C_SYMBOL_NAME(errno),%object - .size C_SYMBOL_NAME(errno),4 -C_SYMBOL_NAME(errno): .zero 4 -weak_alias (errno, _errno) .text /* The syscall stubs jump here when they detect an error. diff --git a/sysdeps/unix/sysv/linux/cris/sysdep.S b/sysdeps/unix/sysv/linux/cris/sysdep.S index 64fb850..e53e7bb 100644 --- a/sysdeps/unix/sysv/linux/cris/sysdep.S +++ b/sysdeps/unix/sysv/linux/cris/sysdep.S @@ -18,14 +18,6 @@ #include -/* Make space for the errno variable. */ - - .globl C_SYMBOL_NAME(errno) - .type C_SYMBOL_NAME(errno),@object - .lcomm C_SYMBOL_NAME(errno),4 - -weak_alias (errno, _errno) - /* The syscall stubs jump here when they detect an error, bot for PIC and non-PIC. */ diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.c b/sysdeps/unix/sysv/linux/hppa/sysdep.c index b333b70..bf4d4af 100644 --- a/sysdeps/unix/sysv/linux/hppa/sysdep.c +++ b/sysdeps/unix/sysv/linux/hppa/sysdep.c @@ -28,11 +28,6 @@ __syscall_error (int err_no) return -1; } -/* We also have to have a 'real' definition of errno. */ -#undef errno -int errno = 0; -weak_alias (errno, _errno) - /* HPPA implements syscall() in 'C'; the assembler version would typically be in syscall.S. */ diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.S b/sysdeps/unix/sysv/linux/m68k/sysdep.S index 628335b..e4ec92d 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.S +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.S @@ -18,19 +18,6 @@ #include -/* The Linux version is in fact m68k/ELF and the start.? file for this - system (sysdeps/m68k/elf/start.S) is also used by The Hurd. This file - must not contain the definition of the `errno' variable, we have to - define it somewhere else. - - ...and this place is here. */ - .bss - .globl errno - .type errno,@object -errno: .space 4 - .size errno,4 -weak_alias (errno, _errno) - .text /* The following code is only used in the shared library when we compile the reentrant version. Otherwise each system call defines diff --git a/sysdeps/unix/sysv/linux/mips/sysdep.S b/sysdeps/unix/sysv/linux/mips/sysdep.S deleted file mode 100644 index 2584982..0000000 --- a/sysdeps/unix/sysv/linux/mips/sysdep.S +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright (C) 1998, 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 - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include - -/* The Linux version is in fact MIPS/ELF and the start.? file for this - system (sysdeps/mips/elf/start.S) is also used by The Hurd. This file - must not contain the definition of the `errno' variable, we have to - define it somewhere else. - - ...and this place is here. */ - .bss - .globl errno - .type errno,@object - .size errno,4 -errno: .word 4 - .text -weak_alias(errno, _errno) - -#include -- 2.7.4