]>
Commit | Line | Data |
---|---|---|
d614a753 | 1 | /* Copyright (C) 1992-2020 Free Software Foundation, Inc. |
df4ef2ab | 2 | This file is part of the GNU C Library. |
28f540f4 | 3 | |
df4ef2ab | 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 | |
df4ef2ab 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 | 14 | You should have received a copy of the GNU Lesser General Public |
59ba27a6 | 15 | License along with the GNU C Library; if not, see |
5a82c748 | 16 | <https://www.gnu.org/licenses/>. */ |
28f540f4 | 17 | |
ce563359 | 18 | #include "version.h" |
013aafb7 | 19 | #include <tls.h> |
92ad15a8 | 20 | #include <libc-abis.h> |
dc30f461 UD |
21 | #include <gnu/libc-version.h> |
22 | ||
23 | static const char __libc_release[] = RELEASE; | |
24 | static const char __libc_version[] = VERSION; | |
28f540f4 | 25 | |
f332db02 | 26 | static const char banner[] = |
bedbd859 | 27 | "GNU C Library "PKGVERSION RELEASE" release version "VERSION".\n\ |
5f72f980 | 28 | Copyright (C) 2020 Free Software Foundation, Inc.\n\ |
28f540f4 RM |
29 | This is free software; see the source for copying conditions.\n\ |
30 | There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A\n\ | |
41df5ed4 RH |
31 | PARTICULAR PURPOSE.\n\ |
32 | Compiled by GNU CC version "__VERSION__".\n" | |
92ad15a8 UD |
33 | #ifdef LIBC_ABIS_STRING |
34 | LIBC_ABIS_STRING | |
35 | #endif | |
d40eb37a | 36 | "For bug reporting instructions, please see:\n\ |
8b748aed | 37 | "REPORT_BUGS_TO".\n"; |
f332db02 RM |
38 | |
39 | #include <unistd.h> | |
40 | ||
2f8a05d8 | 41 | extern void __libc_print_version (void) attribute_hidden; |
f332db02 RM |
42 | void |
43 | __libc_print_version (void) | |
44 | { | |
45 | __write (STDOUT_FILENO, banner, sizeof banner - 1); | |
28f540f4 | 46 | } |
463e148b | 47 | |
844b79a6 | 48 | extern const char *__gnu_get_libc_release (void); |
dc30f461 UD |
49 | const char * |
50 | __gnu_get_libc_release (void) | |
51 | { | |
52 | return __libc_release; | |
53 | } | |
54 | weak_alias (__gnu_get_libc_release, gnu_get_libc_release) | |
55 | ||
844b79a6 | 56 | extern const char *__gnu_get_libc_version (void); |
dc30f461 UD |
57 | const char * |
58 | __gnu_get_libc_version (void) | |
59 | { | |
60 | return __libc_version; | |
61 | } | |
62 | weak_alias (__gnu_get_libc_version, gnu_get_libc_version) | |
63 | ||
463e148b RM |
64 | /* This function is the entry point for the shared object. |
65 | Running the library as a program will get here. */ | |
66 | ||
17427edd | 67 | extern void __libc_main (void) __attribute__ ((noreturn)); |
463e148b RM |
68 | void |
69 | __libc_main (void) | |
70 | { | |
71 | __libc_print_version (); | |
f332db02 | 72 | _exit (0); |
463e148b | 73 | } |