]>
Commit | Line | Data |
---|---|---|
739d440d | 1 | /* Copyright (C) 1995, 1996, 1997, 1998, 2002 Free Software Foundation, Inc. |
b5791037 | 2 | This file is part of the GNU C Library. |
28f540f4 | 3 | |
b5791037 | 4 | The GNU C Library is free software; you can redistribute it and/or |
41bdb6e2 AJ |
5 | modify it under the terms of the GNU Lesser General Public |
6 | License as published by the Free Software Foundation; either | |
7 | version 2.1 of the License, or (at your option) any later version. | |
28f540f4 | 8 | |
b5791037 UD |
9 | The GNU C Library is distributed in the hope that it will be useful, |
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
41bdb6e2 | 12 | Lesser General Public License for more details. |
28f540f4 | 13 | |
41bdb6e2 AJ |
14 | You should have received a copy of the GNU Lesser General Public |
15 | License along with the GNU C Library; if not, write to the Free | |
16 | Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | |
17 | 02111-1307 USA. */ | |
28f540f4 | 18 | |
ec4b0518 | 19 | #include <sysdep.h> |
739d440d | 20 | #include <tls.h> |
ec4b0518 | 21 | |
d2f5be2a UD |
22 | /* Because the Linux version is in fact i386/ELF and the start.? file |
23 | for this system (sysdeps/i386/elf/start.S) is also used by The Hurd | |
24 | and therefore this files must not contain the definition of the | |
25 | `errno' variable (I don't know why, ask Roland), we have to define | |
26 | it somewhere else. | |
27 | ||
cabcc273 | 28 | ...and this place is here. */ |
739d440d UD |
29 | #if USE_TLS && HAVE___THREAD |
30 | .section .tbss | |
31 | #else | |
dc30f461 | 32 | .bss |
739d440d | 33 | #endif |
566efee2 | 34 | .globl errno |
dc30f461 UD |
35 | .type errno,@object |
36 | .size errno,4 | |
739d440d UD |
37 | .globl _errno |
38 | .type _errno,@object | |
39 | .size _errno,4 | |
40 | .align 4 | |
566efee2 | 41 | errno: |
739d440d | 42 | _errno: |
dc30f461 | 43 | .space 4 |
03a75825 | 44 | |
edf5b2d7 UD |
45 | /* The following code is only used in the shared library when we |
46 | compile the reentrant version. Otherwise each system call defines | |
47 | each own version. */ | |
03a75825 | 48 | |
edf5b2d7 | 49 | #ifndef PIC |
03a75825 RM |
50 | |
51 | /* The syscall stubs jump here when they detect an error. | |
52 | The code for Linux is almost identical to the canonical Unix/i386 | |
53 | code, except that the error number in %eax is negated. */ | |
54 | ||
5ae9d168 UD |
55 | #undef CALL_MCOUNT |
56 | #define CALL_MCOUNT /* Don't insert the profiling call, it clobbers %eax. */ | |
57 | ||
566efee2 | 58 | .text |
ec4b0518 | 59 | ENTRY (__syscall_error) |
03a75825 RM |
60 | negl %eax |
61 | ||
62 | #define __syscall_error __syscall_error_1 | |
63 | #include <sysdeps/unix/i386/sysdep.S> | |
64 | ||
edf5b2d7 | 65 | #endif /* !PIC */ |