* 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.
#include <sysdep.h>
#include <features.h>
- .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
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));
#include <sysdep.h>
-__errno:
-.comm errno, 4
-
ENTRY(__start)
.set noreorder
/* 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));
#include <sysdep.h>
-/* 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.
#include <sysdep.h>
-/* 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. */
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. */
#include <sysdep.h>
-/* 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
+++ /dev/null
-/* 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 <sysdep.h>
-
-/* 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 <sysdeps/unix/mips/sysdep.S>