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