]>
Commit | Line | Data |
---|---|---|
383354a9 MK |
1 | .\" Copyright (c) 2009 Linux Foundation, written by Michael Kerrisk |
2 | .\" <mtk.manpages@gmail.com> | |
3 | .\" | |
5fbde956 | 4 | .\" SPDX-License-Identifier: Linux-man-pages-copyleft |
383354a9 | 5 | .\" |
35deeb87 | 6 | .TH LIBC 7 2016-12-12 "Linux" "Linux Programmer's Manual" |
383354a9 | 7 | .SH NAME |
f68512e9 | 8 | libc \- overview of standard C libraries on Linux |
383354a9 MK |
9 | .SH DESCRIPTION |
10 | The term "libc" is commonly used as a shorthand for | |
11 | the "standard C library", | |
12 | a library of standard functions that can be used by all C programs | |
13 | (and sometimes by programs in other languages). | |
14 | Because of some history (see below), use of the term "libc" | |
15 | to refer to the standard C library is somewhat ambiguous on Linux. | |
16 | .SS glibc | |
17 | By far the most widely used C library on Linux is the GNU C Library | |
608bf950 SK |
18 | .UR http://www.gnu.org\:/software\:/libc/ |
19 | .UE , | |
383354a9 MK |
20 | often referred to as |
21 | .IR glibc . | |
22 | This is the C library that is nowadays used in all | |
23 | major Linux distributions. | |
24 | It is also the C library whose details are documented | |
25 | in the relevant pages of the | |
26 | .I man-pages | |
27 | project (primarily in Section 3 of the manual). | |
28 | Documentation of glibc is also available in the glibc manual, | |
29 | available via the command | |
30 | .IR "info libc" . | |
31 | Release 1.0 of glibc was made in September 1992. | |
32 | (There were earlier 0.x releases.) | |
33 | The next major release of glibc was 2.0, at the beginning of 1997. | |
a721e8b2 | 34 | .PP |
383354a9 MK |
35 | The pathname |
36 | .I /lib/libc.so.6 | |
37 | (or something similar) is normally a symbolic link that | |
38 | points to the location of the glibc library, | |
39 | and executing this pathname will cause glibc to display | |
40 | various information about the version installed on your system. | |
41 | .SS Linux libc | |
42 | In the early to mid 1990s, there was for a while | |
43 | .IR "Linux libc" , | |
44 | a fork of glibc 1.x created by Linux developers who felt that glibc | |
45 | development at the time was not sufficing for the needs of Linux. | |
46 | Often, this library was referred to (ambiguously) as just "libc". | |
e5fbb0bf MK |
47 | Linux libc released major versions 2, 3, 4, and 5, |
48 | as well as many minor versions of those releases. | |
49 | Linux libc4 was the last version to use the a.out binary format, | |
50 | and the first version to provide (primitive) shared library support. | |
51 | Linux libc 5 was the first version to support the ELF binary format; | |
52 | this version used the shared library soname | |
53 | .IR libc.so.5 . | |
383354a9 MK |
54 | For a while, |
55 | Linux libc was the standard C library in many Linux distributions. | |
a721e8b2 | 56 | .PP |
383354a9 | 57 | However, notwithstanding the original motivations of the Linux libc effort, |
a59ac1b5 MK |
58 | by the time glibc 2.0 was released (in 1997), |
59 | it was clearly superior to Linux libc, | |
383354a9 MK |
60 | and all major Linux distributions that had been using Linux libc |
61 | soon switched back to glibc. | |
961b7403 MK |
62 | To avoid any confusion with Linux libc versions, |
63 | glibc 2.0 and later used the shared library soname | |
64 | .IR libc.so.6 . | |
a721e8b2 | 65 | .PP |
dd964d66 | 66 | Since the switch from Linux libc to glibc 2.0 occurred long ago, |
383354a9 MK |
67 | .I man-pages |
68 | no longer takes care to document Linux libc details. | |
69 | Nevertheless, the history is visible in vestiges of information | |
59532730 | 70 | about Linux libc that remain in a few manual pages, |
383354a9 | 71 | in particular, references to |
1ae6b2c7 | 72 | .I libc4 |
383354a9 | 73 | and |
738dea65 | 74 | .IR libc5 . |
383354a9 MK |
75 | .SS Other C libraries |
76 | There are various other less widely used C libraries for Linux. | |
77 | These libraries are generally smaller than glibc, | |
78 | both in terms of features and memory footprint, | |
79 | and often intended for building small binaries, | |
80 | perhaps targeted at development for embedded Linux systems. | |
81 | Among such libraries are | |
fe8b1358 | 82 | .UR http://www.uclibc.org/ |
383354a9 | 83 | .I uClibc |
ab2b391a | 84 | .UE , |
fe8b1358 | 85 | .UR http://www.fefe.de/dietlibc/ |
383354a9 | 86 | .I dietlibc |
85dd46e8 | 87 | .UE , |
ba8b5873 | 88 | and |
5465ae95 | 89 | .UR http://www.musl\-libc.org/ |
ba8b5873 MK |
90 | .I "musl libc" |
91 | .UE . | |
2eaa5bec | 92 | Details of these libraries are covered by the |
383354a9 | 93 | .I man-pages |
2eaa5bec | 94 | project, where they are known. |
383354a9 | 95 | .SH SEE ALSO |
383354a9 | 96 | .BR syscalls (2), |
8e30d5ac MF |
97 | .BR getauxval (3), |
98 | .BR proc (5), | |
383354a9 | 99 | .BR feature_test_macros (7), |
28a4c58c | 100 | .BR man\-pages (7), |
8e30d5ac MF |
101 | .BR standards (7), |
102 | .BR vdso (7) |