1 /* Link-time constants for ARM EABI.
2 Copyright (C) 2005 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
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, write to the Free
34 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
37 /* The ARM EABI requires that we provide ISO compile-time constants as
38 link-time constants. Some portable applications may reference these. */
48 #define eabi_constant2(X,Y) const int __aeabi_##X attribute_hidden = Y
49 #define eabi_constant(X) const int __aeabi_##X attribute_hidden = X
52 eabi_constant (ERANGE);
53 eabi_constant (EILSEQ);
55 eabi_constant (MB_LEN_MAX);
57 eabi_constant (LC_COLLATE);
58 eabi_constant (LC_CTYPE);
59 eabi_constant (LC_MONETARY);
60 eabi_constant (LC_NUMERIC);
61 eabi_constant (LC_TIME);
62 eabi_constant (LC_ALL);
64 /* The value of __aeabi_JMP_BUF_SIZE is the number of doublewords in a
66 eabi_constant2 (JMP_BUF_SIZE, sizeof (jmp_buf) / 8);
68 eabi_constant (SIGABRT);
69 eabi_constant (SIGFPE);
70 eabi_constant (SIGILL);
71 eabi_constant (SIGINT);
72 eabi_constant (SIGSEGV);
73 eabi_constant (SIGTERM);
75 eabi_constant2 (IOFBF, _IOFBF);
76 eabi_constant2 (IOLBF, _IOLBF);
77 eabi_constant2 (IONBF, _IONBF);
78 eabi_constant (BUFSIZ);
79 eabi_constant (FOPEN_MAX);
80 eabi_constant (TMP_MAX);
81 eabi_constant (FILENAME_MAX);
82 eabi_constant (L_tmpnam);
84 FILE *__aeabi_stdin attribute_hidden;
85 FILE *__aeabi_stdout attribute_hidden;
86 FILE *__aeabi_stderr attribute_hidden;
88 static void __attribute__ ((used))
89 setup_aeabi_stdio (void)
91 __aeabi_stdin = stdin;
92 __aeabi_stdout = stdout;
93 __aeabi_stderr = stderr;
96 static void (*fp) (void) __attribute__ ((used, section (".preinit_array")))
99 eabi_constant (CLOCKS_PER_SEC);