m68k: update libm test ULPs
[glibc.git] / sysdeps / unix / arm / start.c
blobe9a032b9daacd0a96d1d6310ec367e50e782f993
1 /* Special startup code for ARM a.out binaries.
2 Copyright (C) 1998, 2004, 2012 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 In addition to the permissions in the GNU Lesser General Public
11 License, the Free Software Foundation gives you unlimited
12 permission to link the compiled version of this file with other
13 programs, and to distribute those programs without any restriction
14 coming from the use of this file. (The GNU Lesser General Public
15 License restrictions do apply in other respects; for example, they
16 cover modification of the file, and distribution when not linked
17 into another program.)
19 Note that people who make modified versions of this file are not
20 obligated to grant this special exception for their modified
21 versions; it is their choice whether to do so. The GNU Lesser
22 General Public License gives permission to release a modified
23 version without this exception; this exception also makes it
24 possible to release a modified version which carries forward this
25 exception.
27 The GNU C Library is distributed in the hope that it will be useful,
28 but WITHOUT ANY WARRANTY; without even the implied warranty of
29 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
30 Lesser General Public License for more details.
32 You should have received a copy of the GNU Lesser General Public
33 License along with the GNU C Library. If not, see
34 <http://www.gnu.org/licenses/>. */
36 #include <errno.h>
37 #include <stdlib.h>
38 #include <unistd.h>
39 #include <sysdep.h>
41 /* The first piece of initialized data. */
42 int __data_start = 0;
43 weak_alias (__data_start, data_start)
45 extern void __libc_init (int argc, char **argv, char **envp);
46 extern int main (int argc, char **argv, char **envp);
48 /* N.B.: It is important that this be the first function.
49 This file is the first thing in the text section. */
51 /* If this was in C it might create its own stack frame and
52 screw up the arguments. */
53 asm (".text; .globl _start; _start: B start1");
55 /* Fool gcc into thinking that more args are passed. This makes it look
56 on the stack (correctly) for the real arguments. It causes somewhat
57 strange register usage in start1(), but we aren't too bothered about
58 that at the moment. */
59 #define DUMMIES a1, a2, a3, a4
61 #ifdef DUMMIES
62 #define ARG_DUMMIES DUMMIES,
63 #define DECL_DUMMIES int DUMMIES;
64 #else
65 #define ARG_DUMMIES
66 #define DECL_DUMMIES
67 #endif
69 /* ARGSUSED */
70 static void
71 start1 (ARG_DUMMIES argc, argv, envp)
72 DECL_DUMMIES
73 int argc;
74 char **argv;
75 char **envp;
77 /* Store a pointer to the environment. */
78 __environ = envp;
80 /* Do C library initializations. */
81 __libc_init (argc, argv, __environ);
83 /* Call the user program. */
84 exit (main (argc, argv, __environ));