source: chapter08/glibc.xml@ 7b54528

12.1 12.1-rc1 12.2 12.2-rc1 multilib trunk xry111/arm64 xry111/clfs-ng xry111/loongarch xry111/loongarch-12.1 xry111/loongarch-12.2 xry111/mips64el xry111/multilib
Last change on this file since 7b54528 was 343ab13, checked in by Xi Ruoyao <xry111@…>, 8 months ago

Add info about how to upgrade Glibc on a running system

Let's change our policy to match other "rolling release" distros and
ease the procedure to fix Glibc security vulnerabilities.

Squashed the commits in xry111/update-glibc branch to keep the history
clean.

Co-Authored-By: Pierre Labastie <pierre.labastie@…>
Co-Authored-By: Douglas R. Reno <renodr@…>

  • Property mode set to 100644
File size: 40.5 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../general.ent">
5 %general-entities;
6]>
7
8<sect1 id="ch-system-glibc" role="wrap">
9 <?dbhtml filename="glibc.html"?>
10
11 <sect1info condition="script">
12 <productname>glibc</productname>
13 <productnumber>&glibc-version;</productnumber>
14 <address>&glibc-url;</address>
15 </sect1info>
16
17 <title>Glibc-&glibc-version;</title>
18
19 <indexterm zone="ch-system-glibc">
20 <primary sortas="a-Glibc">Glibc</primary>
21 </indexterm>
22
23 <sect2 role="package">
24 <title/>
25
26 <para>The Glibc package contains the main C library. This library provides
27 the basic routines for allocating memory, searching directories, opening and
28 closing files, reading and writing files, string handling, pattern matching,
29 arithmetic, and so on.</para>
30
31 <segmentedlist>
32 <segtitle>&buildtime;</segtitle>
33 <segtitle>&diskspace;</segtitle>
34
35 <seglistitem>
36 <seg>&glibc-fin-sbu;</seg>
37 <seg>&glibc-fin-du;</seg>
38 </seglistitem>
39 </segmentedlist>
40
41 </sect2>
42
43 <sect2 role="installation">
44 <title>Installation of Glibc</title>
45
46 <para>Some of the Glibc programs use the non-FHS compliant
47 <filename class="directory">/var/db</filename> directory to store
48 their runtime data. Apply the following patch to make such programs
49 store their runtime data in the FHS-compliant locations:</para>
50
51<screen><userinput remap="pre">patch -Np1 -i ../&glibc-fhs-patch;</userinput></screen>
52<!--
53 <para>Now fix two security vulnerabilities and a regression causing the
54 posix_memalign() function very slow in some conditions:</para>
55
56<screen><userinput remap="pre">patch -Np1 -i ../&glibc-upstream-fixes-patch;</userinput></screen>
57-->
58 <para>The Glibc documentation recommends building Glibc
59 in a dedicated build directory:</para>
60
61<screen><userinput remap="pre">mkdir -v build
62cd build</userinput></screen>
63
64 <para>Ensure that the <command>ldconfig</command> and <command>sln</command>
65 utilities will be installed into
66 <filename class="directory">/usr/sbin</filename>:</para>
67
68<screen><userinput remap="pre">echo "rootsbindir=/usr/sbin" &gt; configparms</userinput></screen>
69
70 <para>Prepare Glibc for compilation:</para>
71
72<screen><userinput remap="configure">../configure --prefix=/usr \
73 --disable-werror \
74 --enable-kernel=&min-kernel; \
75 --enable-stack-protector=strong \
76 --disable-nscd \
77 libc_cv_slibdir=/usr/lib</userinput></screen>
78
79 <variablelist>
80 <title>The meaning of the configure options:</title>
81
82 <varlistentry>
83 <term><parameter>--disable-werror</parameter></term>
84 <listitem>
85 <para>This option disables the -Werror option passed to
86 GCC. This is necessary for running the test suite.</para>
87 </listitem>
88 </varlistentry>
89
90 <varlistentry>
91 <term><parameter>--enable-kernel=&min-kernel;</parameter></term>
92 <listitem>
93 <para>This option tells the build system that this Glibc may
94 be used with kernels as old as &min-kernel;. This means generating
95 workarounds in case a system call introduced in a later version
96 cannot be used.</para>
97 </listitem>
98 </varlistentry>
99
100 <varlistentry>
101 <term><parameter>--enable-stack-protector=strong</parameter></term>
102 <listitem>
103 <para>This option increases system security by adding
104 extra code to check for buffer overflows, such as stack
105 smashing attacks. Note that Glibc always explicitly overrides
106 the default of GCC, so this option is still needed even though
107 we've already specified <option>--enable-default-ssp</option> for
108 GCC.</para>
109 </listitem>
110 </varlistentry>
111
112 <varlistentry>
113 <term><parameter>--disable-nscd</parameter></term>
114 <listitem>
115 <para>Do not build the name service cache daemon which is no
116 longer used.</para>
117 </listitem>
118 </varlistentry>
119
120 <varlistentry>
121 <term><parameter>libc_cv_slibdir=/usr/lib</parameter></term>
122 <listitem>
123 <para>This variable sets the correct library for all
124 systems. We do not want lib64 to be used.</para>
125 </listitem>
126 </varlistentry>
127
128 </variablelist>
129
130 <para>Compile the package:</para>
131
132<screen><userinput remap="make">make</userinput></screen>
133
134 <important>
135 <para>In this section, the test suite for Glibc is considered critical.
136 Do not skip it under any circumstance.</para>
137 </important>
138
139 <para>Generally a few tests do not pass. The test failures listed below
140 are usually safe to ignore.</para>
141
142<!-- Use remap="make" here to work around a jhalfs issue. -->
143<!--<screen><userinput remap="make">case $(uname -m) in
144 i?86) ln -sfnv $PWD/elf/ld-linux.so.2 /lib ;;
145 x86_64) ln -sfnv $PWD/elf/ld-linux-x86-64.so.2 /lib ;;
146esac</userinput></screen>
147
148 <note><para>The symbolic link above is needed to run the tests at this
149 stage of building in the chroot environment. It will be overwritten
150 in the install phase below.</para></note>
151-->
152<screen><userinput remap="test">make check</userinput></screen>
153
154 <para>You may see some test failures. The Glibc test suite is
155 somewhat dependent on the host system. A few failures out of
156 over 5000 tests can generally be ignored. This is a list of the
157 most common issues seen for recent versions of LFS:</para>
158
159 <itemizedlist>
160
161 <listitem>
162 <para><emphasis>io/tst-lchmod</emphasis>
163 is known to fail in the LFS chroot environment.</para>
164 </listitem>
165
166<!-- Did not fail with glibc-2.38
167 <listitem>
168 <para><emphasis>misc/tst-ttyname</emphasis>
169 is known to fail in the LFS chroot environment.</para>
170 </listitem>
171-->
172
173 <!-- https://sourceware.org/pipermail/libc-alpha/2022-August/141567.html -->
174 <listitem>
175 <para>The <emphasis>stdlib/tst-arc4random-thread</emphasis>
176 test is known to fail if the host kernel is relatively old.</para>
177 </listitem>
178
179 <listitem>
180 <para>Some tests, for example
181 <emphasis>nss/tst-nss-files-hosts-multi</emphasis>,
182 are known to fail on relatively slow systems due to an internal
183 timeout.</para>
184 </listitem>
185
186 <listitem>
187 <para>Additionally, some tests may fail with a relatively old CPU
188 model or host kernel version.</para>
189 </listitem>
190 </itemizedlist>
191
192 <para>Though it is a harmless message, the install stage of Glibc will
193 complain about the absence of <filename>/etc/ld.so.conf</filename>.
194 Prevent this warning with:</para>
195
196<screen><userinput remap="install">touch /etc/ld.so.conf</userinput></screen>
197
198 <!-- https://sourceware.org/bugzilla/show_bug.cgi?id=21911 -->
199 <para>Fix the Makefile to skip an outdated sanity check
200 that fails with a modern Glibc configuration:</para>
201
202<screen><userinput remap="install">sed '/test-installation/s@$(PERL)@echo not running@' -i ../Makefile</userinput></screen>
203
204 <important>
205 <para>
206 If upgrading Glibc to a new minor version (for example, from
207 Glibc-2.36 to Glibc-&glibc-version;) on a running LFS system, you
208 need to take some extra precautions to avoid breaking the system:
209 </para>
210
211 <itemizedlist>
212 <listitem>
213 <!-- There are two reasons we don't support this:
214 1. Upgrading on a system with separate /lib and /usr/lib is
215 tricky.
216 2. With Glibc prior to 2.34 libc.so.6 etc. are symlinks to
217 libc-2.33.so etc., again causing the upgradation tricky.
218 The Glibc NEWS file explicit states they no longer use
219 symlinks for the ABI names to avoid upgradation
220 issues. -->
221 <para>
222 Upgrading Glibc on a LFS system prior to 11.0 (exclusive) is
223 not supported. Rebuild LFS if you are running such an old LFS
224 system but you need a newer Glibc.
225 </para>
226 </listitem>
227
228 <!-- https://sourceware.org/pipermail/libc-alpha/2024-January/154095.html -->
229 <listitem>
230 <para>
231 If upgrading on a LFS system prior to 12.0 (exclusive), install
232 <application>Libxcrypt</application> following
233 <xref role='.' linkend='ch-system-libxcrypt'/> In addition to
234 a normal <application>Libxcrypt</application> installation,
235 <emphasis role='bold'>you MUST follow the note in Libxcrypt
236 section to install
237 <filename class='libraryfile'>libcrypt.so.1*</filename>
238 (overwritting
239 <filename class='libraryfile'>libcrypt.so.1</filename> from the
240 prior Glibc installation)</emphasis>.
241 </para>
242 </listitem>
243
244 <!-- Otherwise on lfs-systemd nscd will fail to start on boot,
245 and on both lfs-sysv and lfs-systemd useradd etc. will try
246 to start nscd, then nscd will fail to start as well and
247 produce some spurious error message. -->
248 <listitem>
249 <para>
250 If upgrading on a LFS system prior to 12.1 (exclusive),
251 remove the <command>nscd</command> program:
252 </para>
253
254 <screen role='nodump'><userinput>rm -f /usr/sbin/nscd</userinput></screen>
255
256 <para>
257 If this system (prior to LFS 12.1, exclusive) is based on
258 Systemd, it's also needed to disable and stop the
259 <command>nscd</command> service now:
260 </para>
261
262 <screen revision='systemd' role='nodump'><userinput>systemctl disable --now nscd</userinput></screen>
263 </listitem>
264
265 <listitem>
266 <para>
267 Upgrade the kernel and reboot if it's older than &min-kernel;
268 (check the current version with <command>uname -r</command>)
269 or if you want to upgrade it anyway, following
270 <xref linkend='ch-bootable-kernel' role='.'/>
271 </para>
272 </listitem>
273
274 <listitem>
275 <para>
276 Upgrade the kernel API headers if it's older than &min-kernel;
277 (check the current version with
278 <command>cat /usr/include/linux/version.h</command>)
279 or if you want to upgrade it anyway, following
280 <xref linkend='ch-tools-linux-headers'/> (but removing
281 <envar>$LFS</envar> from the <command>cp</command> command).
282 </para>
283 </listitem>
284
285 <!-- This is to ensure we don't start a process at the time point
286 where some Glibc shared libraries are updated but the others
287 are not. Such mismatches can cause programs crash on startup,
288 esp. a mismatch between ld-linux-x86-64.so.2 and
289 libc.so.6. Note that a crash in the installation process
290 will leave the system in a state with the mismatch forever,
291 unrecoverable without the help of another distro. -->
292 <listitem>
293 <para>
294 Perform a <envar>DESTDIR</envar> installation and upgrade
295 the Glibc shared libraries on the system using one single
296 <command>install</command> command:
297 </para>
298
299 <screen role='nodump'><userinput>make DESTDIR=$PWD/dest install
300install -vm755 dest/usr/lib/*.so.* /usr/lib</userinput></screen>
301 </listitem>
302 </itemizedlist>
303
304 <para>
305 It's imperative to strictly follow these steps above unless you
306 completely understand what you are doing.
307 <emphasis role='bold'>Any unexpected deviation may render the
308 system completely unusable. YOU ARE WARNED.</emphasis>
309 </para>
310
311 <para>
312 Then continue to run the <command>make install</command> command
313 and the <command>sed</command> command against
314 <filename>/usr/bin/ldd</filename>. Once they are finished, reboot
315 the system immediately.
316 </para>
317 </important>
318
319 <para>Install the package:</para>
320
321<screen><userinput remap="install">make install</userinput></screen>
322
323 <para>Fix a hardcoded path to the executable loader in the
324 <command>ldd</command> script:</para>
325
326<screen><userinput remap="install">sed '/RTLDLIST=/s@/usr@@g' -i /usr/bin/ldd</userinput></screen>
327<!--
328 <para>Install the configuration file and runtime directory for
329 <command>nscd</command>:</para>
330
331<screen><userinput remap="install">cp -v ../nscd/nscd.conf /etc/nscd.conf
332mkdir -pv /var/cache/nscd</userinput></screen>
333
334 <para revision="systemd">Install the systemd support files for
335 <command>nscd</command>:</para>
336
337 <screen revision="systemd"><userinput remap="install">install -v -Dm644 ../nscd/nscd.tmpfiles /usr/lib/tmpfiles.d/nscd.conf
338install -v -Dm644 ../nscd/nscd.service /usr/lib/systemd/system/nscd.service</userinput></screen>
339-->
340 <para>Next, install the locales that can make the system respond in a
341 different language. None of these locales are required, but if some of them
342 are missing, the test suites of some packages will skip important
343 test cases.</para>
344
345 <para>Individual locales can be installed using the
346 <command>localedef</command> program. E.g., the second
347 <command>localedef</command> command below combines the
348 <filename>/usr/share/i18n/locales/cs_CZ</filename>
349 charset-independent locale definition with the
350 <filename>/usr/share/i18n/charmaps/UTF-8.gz</filename>
351 charmap definition and appends the result to the
352 <filename>/usr/lib/locale/locale-archive</filename> file.
353 The following instructions will install the minimum set of
354 locales necessary for the optimal coverage of tests:</para>
355
356<screen role="nodump"><userinput remap="locale-test">mkdir -pv /usr/lib/locale
357localedef -i C -f UTF-8 C.UTF-8
358localedef -i cs_CZ -f UTF-8 cs_CZ.UTF-8
359localedef -i de_DE -f ISO-8859-1 de_DE
360localedef -i de_DE@euro -f ISO-8859-15 de_DE@euro
361localedef -i de_DE -f UTF-8 de_DE.UTF-8
362localedef -i el_GR -f ISO-8859-7 el_GR
363localedef -i en_GB -f ISO-8859-1 en_GB
364localedef -i en_GB -f UTF-8 en_GB.UTF-8
365localedef -i en_HK -f ISO-8859-1 en_HK
366localedef -i en_PH -f ISO-8859-1 en_PH
367localedef -i en_US -f ISO-8859-1 en_US
368localedef -i en_US -f UTF-8 en_US.UTF-8
369localedef -i es_ES -f ISO-8859-15 es_ES@euro
370localedef -i es_MX -f ISO-8859-1 es_MX
371localedef -i fa_IR -f UTF-8 fa_IR
372localedef -i fr_FR -f ISO-8859-1 fr_FR
373localedef -i fr_FR@euro -f ISO-8859-15 fr_FR@euro
374localedef -i fr_FR -f UTF-8 fr_FR.UTF-8
375localedef -i is_IS -f ISO-8859-1 is_IS
376localedef -i is_IS -f UTF-8 is_IS.UTF-8
377localedef -i it_IT -f ISO-8859-1 it_IT
378localedef -i it_IT -f ISO-8859-15 it_IT@euro
379localedef -i it_IT -f UTF-8 it_IT.UTF-8
380localedef -i ja_JP -f EUC-JP ja_JP
381localedef -i ja_JP -f SHIFT_JIS ja_JP.SJIS 2> /dev/null || true
382localedef -i ja_JP -f UTF-8 ja_JP.UTF-8
383localedef -i nl_NL@euro -f ISO-8859-15 nl_NL@euro
384localedef -i ru_RU -f KOI8-R ru_RU.KOI8-R
385localedef -i ru_RU -f UTF-8 ru_RU.UTF-8
386localedef -i se_NO -f UTF-8 se_NO.UTF-8
387localedef -i ta_IN -f UTF-8 ta_IN.UTF-8
388localedef -i tr_TR -f UTF-8 tr_TR.UTF-8
389localedef -i zh_CN -f GB18030 zh_CN.GB18030
390localedef -i zh_HK -f BIG5-HKSCS zh_HK.BIG5-HKSCS
391localedef -i zh_TW -f UTF-8 zh_TW.UTF-8</userinput></screen>
392
393 <para>In addition, install the locale for your own country, language and
394 character set.</para>
395
396 <para>Alternatively, install all the locales listed in the
397 <filename>glibc-&glibc-version;/localedata/SUPPORTED</filename> file
398 (it includes every locale listed above and many more) at once with the
399 following time-consuming command:</para>
400
401<screen><userinput remap="locale-full">make localedata/install-locales</userinput></screen>
402
403 <para>Then use the <command>localedef</command> command to create and
404 install locales not listed in the
405 <filename>glibc-&glibc-version;/localedata/SUPPORTED</filename> file
406 when you need them. For instance, the following two locales are
407 needed for some tests later in this chapter:</para>
408
409<screen role="nodump"><userinput remap="locale-full">localedef -i C -f UTF-8 C.UTF-8
410localedef -i ja_JP -f SHIFT_JIS ja_JP.SJIS 2> /dev/null || true</userinput></screen>
411
412 <note><para>Glibc now uses libidn2 when resolving internationalized
413 domain names. This is a run time dependency. If this capability
414 is needed, the instructions for installing libidn2 are in the
415 <ulink url="&blfs-book;general/libidn2.html">BLFS libidn2 page</ulink>.
416 </para></note>
417
418 </sect2>
419
420 <sect2 id="conf-glibc" role="configuration">
421 <title>Configuring Glibc</title>
422
423 <indexterm zone="conf-glibc">
424 <primary sortas="e-/etc/nsswitch.conf">/etc/nsswitch.conf</primary>
425 </indexterm>
426
427 <indexterm zone="conf-glibc">
428 <primary sortas="e-/etc/localtime">/etc/localtime</primary>
429 </indexterm>
430
431 <sect3>
432 <title>Adding nsswitch.conf</title>
433
434 <para>The <filename>/etc/nsswitch.conf</filename> file needs to be created
435 because the Glibc defaults do not work well in a networked environment.
436 </para>
437
438 <para>Create a new file <filename>/etc/nsswitch.conf</filename> by running the
439 following:</para>
440
441<screen revision='sysv'><userinput>cat &gt; /etc/nsswitch.conf &lt;&lt; "EOF"
442<literal># Begin /etc/nsswitch.conf
443
444passwd: files
445group: files
446shadow: files
447
448hosts: files dns
449networks: files
450
451protocols: files
452services: files
453ethers: files
454rpc: files
455
456# End /etc/nsswitch.conf</literal>
457EOF</userinput></screen>
458
459<screen revision='systemd'><userinput>cat &gt; /etc/nsswitch.conf &lt;&lt; "EOF"
460<literal># Begin /etc/nsswitch.conf
461
462passwd: files systemd
463group: files systemd
464shadow: files systemd
465
466hosts: mymachines resolve [!UNAVAIL=return] files myhostname dns
467networks: files
468
469protocols: files
470services: files
471ethers: files
472rpc: files
473
474# End /etc/nsswitch.conf</literal>
475EOF</userinput></screen>
476
477 </sect3>
478
479 <sect3>
480 <title>Adding Time Zone Data</title>
481
482 <para>Install and set up the time zone data with the following:</para>
483<screen><userinput>tar -xf ../../tzdata&tzdata-version;.tar.gz
484
485ZONEINFO=/usr/share/zoneinfo
486mkdir -pv $ZONEINFO/{posix,right}
487
488for tz in etcetera southamerica northamerica europe africa antarctica \
489 asia australasia backward; do
490 zic -L /dev/null -d $ZONEINFO ${tz}
491 zic -L /dev/null -d $ZONEINFO/posix ${tz}
492 zic -L leapseconds -d $ZONEINFO/right ${tz}
493done
494
495cp -v zone.tab zone1970.tab iso3166.tab $ZONEINFO
496zic -d $ZONEINFO -p America/New_York
497unset ZONEINFO</userinput></screen>
498
499 <variablelist>
500 <title>The meaning of the zic commands:</title>
501
502 <varlistentry>
503 <term><parameter>zic -L /dev/null ...</parameter></term>
504 <listitem>
505 <para>This creates posix time zones without any leap seconds. It is
506 conventional to put these in both
507 <filename class="directory">zoneinfo</filename> and
508 <filename class="directory">zoneinfo/posix</filename>. It is
509 necessary to put the POSIX time zones in
510 <filename class="directory">zoneinfo</filename>, otherwise various
511 test suites will report errors. On an embedded system, where space is
512 tight and you do not intend to ever update the time zones, you could save
513 1.9 MB by not using the <filename class="directory">posix</filename>
514 directory, but some applications or test suites might produce some
515 failures.</para>
516 </listitem>
517 </varlistentry>
518 <varlistentry>
519 <term><parameter>zic -L leapseconds ...</parameter></term>
520 <listitem>
521 <para>This creates right time zones, including leap seconds. On an
522 embedded system, where space is tight and you do not intend to
523 ever update the time zones, or care about the correct time, you could
524 save 1.9MB by omitting the <filename class="directory">right</filename>
525 directory.</para>
526 </listitem>
527 </varlistentry>
528 <varlistentry>
529 <term><parameter>zic ... -p ...</parameter></term>
530 <listitem>
531 <para>This creates the <filename>posixrules</filename> file. We use
532 New York because POSIX requires the daylight savings time rules
533 to be in accordance with US rules.</para>
534 </listitem>
535 </varlistentry>
536 </variablelist>
537
538
539 <para>One way to determine the local time zone is to run the following
540 script:</para>
541
542<screen role="nodump"><userinput>tzselect</userinput></screen>
543
544 <para>After answering a few questions about the location, the script will
545 output the name of the time zone (e.g.,
546 <emphasis>America/Edmonton</emphasis>). There are also some other possible
547 time zones listed in <filename
548 class='directory'>/usr/share/zoneinfo</filename> such as
549 <emphasis>Canada/Eastern</emphasis> or <emphasis>EST5EDT</emphasis> that
550 are not identified by the script but can be used.</para>
551
552 <para>Then create the <filename>/etc/localtime</filename> file by
553 running:</para>
554
555<screen><userinput>ln -sfv /usr/share/zoneinfo/<replaceable>&lt;xxx&gt;</replaceable> /etc/localtime</userinput></screen>
556
557 <para>Replace <replaceable>&lt;xxx&gt;</replaceable> with the name of the
558 time zone selected (e.g., Canada/Eastern).</para>
559
560 </sect3>
561
562 <sect3 id="conf-ld" role="configuration">
563 <title>Configuring the Dynamic Loader</title>
564
565 <indexterm zone="conf-ld">
566 <primary sortas="e-/etc/ld.so.conf">/etc/ld.so.conf</primary>
567 </indexterm>
568
569 <para>By default, the dynamic loader (<filename
570 class="libraryfile">/lib/ld-linux.so.2</filename>) searches through
571 <filename class="directory">/usr/lib</filename> for dynamic libraries
572 that are needed by programs as they are run. However, if there are
573 libraries in directories other than
574 <filename class="directory">/usr/lib</filename>, these need to be added
575 to the <filename>/etc/ld.so.conf</filename> file in order for the
576 dynamic loader to find them. Two directories that are commonly known
577 to contain additional libraries are <filename
578 class="directory">/usr/local/lib</filename> and <filename
579 class="directory">/opt/lib</filename>, so add those directories to the
580 dynamic loader's search path.</para>
581
582 <para>Create a new file <filename>/etc/ld.so.conf</filename> by running the
583 following:</para>
584
585<screen><userinput>cat &gt; /etc/ld.so.conf &lt;&lt; "EOF"
586<literal># Begin /etc/ld.so.conf
587/usr/local/lib
588/opt/lib
589</literal>
590EOF</userinput></screen>
591
592 <para>If desired, the dynamic loader can also search a directory and
593 include the contents of files found there. Generally the files in
594 this include directory are one line specifying the desired library path.
595 To add this capability run the following commands:</para>
596
597<screen role="nodump"><userinput>cat &gt;&gt; /etc/ld.so.conf &lt;&lt; "EOF"
598<literal># Add an include directory
599include /etc/ld.so.conf.d/*.conf
600</literal>
601EOF
602mkdir -pv /etc/ld.so.conf.d</userinput></screen>
603
604 </sect3>
605 </sect2>
606
607 <sect2 id="contents-glibc" role="content">
608 <title>Contents of Glibc</title>
609
610 <segmentedlist>
611 <segtitle>Installed programs</segtitle>
612 <segtitle>Installed libraries</segtitle>
613 <segtitle>Installed directories</segtitle>
614
615 <seglistitem>
616 <seg>gencat, getconf, getent, iconv, iconvconfig, ldconfig,
617 ldd, lddlibc4,
618 ld.so (symlink to ld-linux-x86-64.so.2 or ld-linux.so.2),
619 locale, localedef, makedb, mtrace,
620 pcprofiledump, pldd, sln, sotruss, sprof, tzselect, xtrace,
621 zdump, and zic</seg>
622 <seg>ld-linux-x86-64.so.2, ld-linux.so.2,
623 libBrokenLocale.{a,so}, libanl.{a,so},
624 libc.{a,so}, libc_nonshared.a, libc_malloc_debug.so,
625 libdl.{a,so.2}, libg.a, libm.{a,so},
626 libmcheck.a, libmemusage.so, libmvec.{a,so}, libnsl.so.1,
627 libnss_compat.so, libnss_dns.so, libnss_files.so, libnss_hesiod.so,
628 libpcprofile.so, libpthread.{a,so.0},
629 libresolv.{a,so}, librt.{a,so.1},
630 libthread_db.so, and libutil.{a,so.1}</seg>
631 <seg>/usr/include/arpa, /usr/include/bits, /usr/include/gnu,
632 /usr/include/net, /usr/include/netash, /usr/include/netatalk,
633 /usr/include/netax25, /usr/include/neteconet, /usr/include/netinet,
634 /usr/include/netipx, /usr/include/netiucv, /usr/include/netpacket,
635 /usr/include/netrom, /usr/include/netrose, /usr/include/nfs,
636 /usr/include/protocols, /usr/include/rpc,
637 /usr/include/sys, /usr/lib/audit, /usr/lib/gconv, /usr/lib/locale,
638 /usr/libexec/getconf, /usr/share/i18n, /usr/share/zoneinfo,
639 and /var/lib/nss_db</seg>
640 </seglistitem>
641 </segmentedlist>
642
643 <variablelist>
644 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
645 <?dbfo list-presentation="list"?>
646 <?dbhtml list-presentation="table"?>
647
648 <varlistentry id="gencat">
649 <term><command>gencat</command></term>
650 <listitem>
651 <para>Generates message catalogues</para>
652 <indexterm zone="ch-system-glibc gencat">
653 <primary sortas="b-gencat">gencat</primary>
654 </indexterm>
655 </listitem>
656 </varlistentry>
657
658 <varlistentry id="getconf">
659 <term><command>getconf</command></term>
660 <listitem>
661 <para>Displays the system configuration values for file system
662 specific variables</para>
663 <indexterm zone="ch-system-glibc getconf">
664 <primary sortas="b-getconf">getconf</primary>
665 </indexterm>
666 </listitem>
667 </varlistentry>
668
669 <varlistentry id="getent">
670 <term><command>getent</command></term>
671 <listitem>
672 <para>Gets entries from an administrative database</para>
673 <indexterm zone="ch-system-glibc getent">
674 <primary sortas="b-getent">getent</primary>
675 </indexterm>
676 </listitem>
677 </varlistentry>
678
679 <varlistentry id="iconv">
680 <term><command>iconv</command></term>
681 <listitem>
682 <para>Performs character set conversion</para>
683 <indexterm zone="ch-system-glibc iconv">
684 <primary sortas="b-iconv">iconv</primary>
685 </indexterm>
686 </listitem>
687 </varlistentry>
688
689 <varlistentry id="iconvconfig">
690 <term><command>iconvconfig</command></term>
691 <listitem>
692 <para>Creates fastloading <command>iconv</command> module configuration
693 files</para>
694 <indexterm zone="ch-system-glibc iconvconfig">
695 <primary sortas="b-iconvconfig">iconvconfig</primary>
696 </indexterm>
697 </listitem>
698 </varlistentry>
699
700 <varlistentry id="ldconfig">
701 <term><command>ldconfig</command></term>
702 <listitem>
703 <para>Configures the dynamic linker runtime bindings</para>
704 <indexterm zone="ch-system-glibc ldconfig">
705 <primary sortas="b-ldconfig">ldconfig</primary>
706 </indexterm>
707 </listitem>
708 </varlistentry>
709
710 <varlistentry id="ldd">
711 <term><command>ldd</command></term>
712 <listitem>
713 <para>Reports which shared libraries are required
714 by each given program or shared library</para>
715 <indexterm zone="ch-system-glibc ldd">
716 <primary sortas="b-ldd">ldd</primary>
717 </indexterm>
718 </listitem>
719 </varlistentry>
720
721 <varlistentry id="lddlibc4">
722 <term><command>lddlibc4</command></term>
723 <listitem>
724 <para>Assists <command>ldd</command> with object files.
725 It does not exist on newer architectures like x86_64</para>
726 <indexterm zone="ch-system-glibc lddlibc4">
727 <primary sortas="b-lddlibc4">lddlibc4</primary>
728 </indexterm>
729 </listitem>
730 </varlistentry>
731
732 <varlistentry id="locale">
733 <term><command>locale</command></term>
734 <listitem>
735 <para>Prints various information about the current locale</para>
736 <indexterm zone="ch-system-glibc locale">
737 <primary sortas="b-locale">locale</primary>
738 </indexterm>
739 </listitem>
740 </varlistentry>
741
742 <varlistentry id="localedef">
743 <term><command>localedef</command></term>
744 <listitem>
745 <para>Compiles locale specifications</para>
746 <indexterm zone="ch-system-glibc localedef">
747 <primary sortas="b-localedef">localedef</primary>
748 </indexterm>
749 </listitem>
750 </varlistentry>
751
752 <varlistentry id="makedb">
753 <term><command>makedb</command></term>
754 <listitem>
755 <para>Creates a simple database from textual input</para>
756 <indexterm zone="ch-system-glibc makedb">
757 <primary sortas="b-makedb">makedb</primary>
758 </indexterm>
759 </listitem>
760 </varlistentry>
761
762 <varlistentry id="mtrace">
763 <term><command>mtrace</command></term>
764 <listitem>
765 <para>Reads and interprets a memory trace file and displays a summary
766 in human-readable format</para>
767 <indexterm zone="ch-system-glibc mtrace">
768 <primary sortas="b-mtrace">mtrace</primary>
769 </indexterm>
770 </listitem>
771 </varlistentry>
772
773 <varlistentry id="pcprofiledump">
774 <term><command>pcprofiledump</command></term>
775 <listitem>
776 <para>Dump information generated by PC profiling</para>
777 <indexterm zone="ch-system-glibc pcprofiledump">
778 <primary sortas="b-pcprofiledump">pcprofiledump</primary>
779 </indexterm>
780 </listitem>
781 </varlistentry>
782
783 <varlistentry id="pldd">
784 <term><command>pldd</command></term>
785 <listitem>
786 <para>Lists dynamic shared objects used by running processes</para>
787 <indexterm zone="ch-system-glibc pldd">
788 <primary sortas="b-pldd">pldd</primary>
789 </indexterm>
790 </listitem>
791 </varlistentry>
792
793 <varlistentry id="sln">
794 <term><command>sln</command></term>
795 <listitem>
796 <para>A statically linked <command>ln</command> program</para>
797 <indexterm zone="ch-system-glibc sln">
798 <primary sortas="b-sln">sln</primary>
799 </indexterm>
800 </listitem>
801 </varlistentry>
802
803 <varlistentry id="sotruss">
804 <term><command>sotruss</command></term>
805 <listitem>
806 <para>Traces shared library procedure calls of a specified command</para>
807 <indexterm zone="ch-system-glibc sotruss">
808 <primary sortas="b-sotruss">sotruss</primary>
809 </indexterm>
810 </listitem>
811 </varlistentry>
812
813 <varlistentry id="sprof">
814 <term><command>sprof</command></term>
815 <listitem>
816 <para>Reads and displays shared object profiling data</para>
817 <indexterm zone="ch-system-glibc sprof">
818 <primary sortas="b-sprof">sprof</primary>
819 </indexterm>
820 </listitem>
821 </varlistentry>
822
823 <varlistentry id="tzselect">
824 <term><command>tzselect</command></term>
825 <listitem>
826 <para>Asks the user about the location of the system and reports
827 the corresponding time zone description</para>
828 <indexterm zone="ch-system-glibc tzselect">
829 <primary sortas="b-tzselect">tzselect</primary>
830 </indexterm>
831 </listitem>
832 </varlistentry>
833
834 <varlistentry id="xtrace">
835 <term><command>xtrace</command></term>
836 <listitem>
837 <para>Traces the execution of a program by printing the currently
838 executed function</para>
839 <indexterm zone="ch-system-glibc xtrace">
840 <primary sortas="b-xtrace">xtrace</primary>
841 </indexterm>
842 </listitem>
843 </varlistentry>
844
845 <varlistentry id="zdump">
846 <term><command>zdump</command></term>
847 <listitem>
848 <para>The time zone dumper</para>
849 <indexterm zone="ch-system-glibc zdump">
850 <primary sortas="b-zdump">zdump</primary>
851 </indexterm>
852 </listitem>
853 </varlistentry>
854
855 <varlistentry id="zic">
856 <term><command>zic</command></term>
857 <listitem>
858 <para>The time zone compiler</para>
859 <indexterm zone="ch-system-glibc zic">
860 <primary sortas="b-zic">zic</primary>
861 </indexterm>
862 </listitem>
863 </varlistentry>
864
865 <varlistentry id="ld.so">
866 <term><filename class="libraryfile">ld-*.so</filename></term>
867 <listitem>
868 <para>The helper program for shared library executables</para>
869 <indexterm zone="ch-system-glibc ld.so">
870 <primary sortas="c-ld.so">ld-&glibc-version;.so</primary>
871 </indexterm>
872 </listitem>
873 </varlistentry>
874
875 <varlistentry id="libBrokenLocale">
876 <term><filename class="libraryfile">libBrokenLocale</filename></term>
877 <listitem>
878 <para>Used internally by Glibc as a gross hack to get broken programs
879 (e.g., some Motif applications) running. See comments in
880 <filename>glibc-&glibc-version;/locale/broken_cur_max.c</filename>
881 for more information</para>
882 <indexterm zone="ch-system-glibc libBrokenLocale">
883 <primary sortas="c-libBrokenLocale">libBrokenLocale</primary>
884 </indexterm>
885 </listitem>
886 </varlistentry>
887
888 <varlistentry id="libanl">
889 <term><filename class="libraryfile">libanl</filename></term>
890 <listitem>
891 <para>Dummy library containing no functions. Previously was the
892 asynchronous name lookup library, whose functions are now in
893 <filename class='libraryfile'>libc</filename></para>
894 <indexterm zone="ch-system-glibc libanl">
895 <primary sortas="c-libanl">libanl</primary>
896 </indexterm>
897 </listitem>
898 </varlistentry>
899
900 <varlistentry id="libc">
901 <term><filename class="libraryfile">libc</filename></term>
902 <listitem>
903 <para>The main C library</para>
904 <indexterm zone="ch-system-glibc libc">
905 <primary sortas="c-libc">libc</primary>
906 </indexterm>
907 </listitem>
908 </varlistentry>
909
910 <varlistentry id="libc_malloc_debug">
911 <term><filename class="libraryfile">libc_malloc_debug</filename></term>
912 <listitem>
913 <para>Turns on memory allocation checking when preloaded</para>
914 <indexterm zone="ch-system-glibc libc_malloc_debug">
915 <primary sortas="c-libc_malloc_debug">libc_malloc_debug</primary>
916 </indexterm>
917 </listitem>
918 </varlistentry>
919
920 <varlistentry id="libdl">
921 <term><filename class="libraryfile">libdl</filename></term>
922 <listitem>
923 <para>Dummy library containing no functions. Previously was the
924 dynamic linking interface library, whose functions are now in
925 <filename class="libraryfile">libc</filename></para>
926 <indexterm zone="ch-system-glibc libdl">
927 <primary sortas="c-libdl">libdl</primary>
928 </indexterm>
929 </listitem>
930 </varlistentry>
931
932 <varlistentry id="libg">
933 <term><filename class="libraryfile">libg</filename></term>
934 <listitem>
935 <para>Dummy library containing no functions. Previously was a runtime
936 library for <command>g++</command></para>
937 <indexterm zone="ch-system-glibc libg">
938 <primary sortas="c-libg">libg</primary>
939 </indexterm>
940 </listitem>
941 </varlistentry>
942
943 <varlistentry id="libm">
944 <term><filename class="libraryfile">libm</filename></term>
945 <listitem>
946 <para>The mathematical library</para>
947 <indexterm zone="ch-system-glibc libm">
948 <primary sortas="c-libm">libm</primary>
949 </indexterm>
950 </listitem>
951 </varlistentry>
952
953 <varlistentry id="libmvec">
954 <term><filename class="libraryfile">libmvec</filename></term>
955 <listitem>
956 <para>The vector math library, linked in as needed
957 when <filename class='libraryfile'>libm</filename> is used</para>
958 <indexterm zone="ch-system-glibc libmvec">
959 <primary sortas="c-libmvec">libmvec</primary>
960 </indexterm>
961 </listitem>
962 </varlistentry>
963
964 <varlistentry id="libmcheck">
965 <term><filename class="libraryfile">libmcheck</filename></term>
966 <listitem>
967 <para>Turns on memory allocation checking when linked to</para>
968 <indexterm zone="ch-system-glibc libmcheck">
969 <primary sortas="c-libmcheck">libmcheck</primary>
970 </indexterm>
971 </listitem>
972 </varlistentry>
973
974 <varlistentry id="libmemusage">
975 <term><filename class="libraryfile">libmemusage</filename></term>
976 <listitem>
977 <para>Used by <command>memusage</command> to help collect
978 information about the memory usage of a program</para>
979 <indexterm zone="ch-system-glibc libmemusage">
980 <primary sortas="c-libmemusage">libmemusage</primary>
981 </indexterm>
982 </listitem>
983 </varlistentry>
984
985 <varlistentry id="libnsl">
986 <term><filename class="libraryfile">libnsl</filename></term>
987 <listitem>
988 <para>The network services library, now deprecated</para>
989 <indexterm zone="ch-system-glibc libnsl">
990 <primary sortas="c-libnsl">libnsl</primary>
991 </indexterm>
992 </listitem>
993 </varlistentry>
994
995 <varlistentry id="libnss">
996 <term><filename class="libraryfile">libnss_*</filename></term>
997 <listitem>
998 <para>The Name Service Switch modules, containing functions for
999 resolving host names, user names, group names, aliases, services,
1000 protocols, etc. Loaded by
1001 <filename class='libraryfile'>libc</filename> according to the
1002 configuration in <filename>/etc/nsswitch.conf</filename></para>
1003 <indexterm zone="ch-system-glibc libnss">
1004 <primary sortas="c-libnss">libnss_*</primary>
1005 </indexterm>
1006 </listitem>
1007 </varlistentry>
1008
1009 <varlistentry id="libpcprofile">
1010 <term><filename class="libraryfile">libpcprofile</filename></term>
1011 <listitem>
1012 <para>Can be preloaded to PC profile an executable</para>
1013 <indexterm zone="ch-system-glibc libpcprofile">
1014 <primary sortas="c-libpcprofile">libpcprofile</primary>
1015 </indexterm>
1016 </listitem>
1017 </varlistentry>
1018
1019 <varlistentry id="libpthread">
1020 <term><filename class="libraryfile">libpthread</filename></term>
1021 <listitem>
1022 <para>Dummy library containing no functions. Previously contained
1023 functions providing most of the interfaces specified
1024 by the POSIX.1c Threads Extensions and the semaphore interfaces
1025 specified by the POSIX.1b Real-time Extensions, now the functions
1026 are in <filename class="libraryfile">libc</filename></para>
1027 <indexterm zone="ch-system-glibc libpthread">
1028 <primary sortas="c-libpthread">libpthread</primary>
1029 </indexterm>
1030 </listitem>
1031 </varlistentry>
1032
1033 <varlistentry id="libresolv">
1034 <term><filename class="libraryfile">libresolv</filename></term>
1035 <listitem>
1036 <para>Contains functions for creating, sending, and interpreting
1037 packets to the Internet domain name servers</para>
1038 <indexterm zone="ch-system-glibc libresolv">
1039 <primary sortas="c-libresolv">libresolv</primary>
1040 </indexterm>
1041 </listitem>
1042 </varlistentry>
1043
1044 <varlistentry id="librt">
1045 <term><filename class="libraryfile">librt</filename></term>
1046 <listitem>
1047 <para>Contains functions providing most of the interfaces specified
1048 by the POSIX.1b Real-time Extensions</para>
1049 <indexterm zone="ch-system-glibc librt">
1050 <primary sortas="c-librt">librt</primary>
1051 </indexterm>
1052 </listitem>
1053 </varlistentry>
1054
1055 <varlistentry id="libthread_db">
1056 <term><filename class="libraryfile">libthread_db</filename></term>
1057 <listitem>
1058 <para>Contains functions useful for building debuggers for
1059 multi-threaded programs</para>
1060 <indexterm zone="ch-system-glibc libthread_db">
1061 <primary sortas="c-libthread_db">libthread_db</primary>
1062 </indexterm>
1063 </listitem>
1064 </varlistentry>
1065
1066 <varlistentry id="libutil">
1067 <term><filename class="libraryfile">libutil</filename></term>
1068 <listitem>
1069 <para>Dummy library containing no functions. Previously contained
1070 code for <quote>standard</quote> functions used in
1071 many different Unix utilities. These functions are now in
1072 <filename class="libraryfile">libc</filename></para>
1073 <indexterm zone="ch-system-glibc libutil">
1074 <primary sortas="c-libutil">libutil</primary>
1075 </indexterm>
1076 </listitem>
1077 </varlistentry>
1078
1079 </variablelist>
1080
1081 </sect2>
1082
1083</sect1>
Note: See TracBrowser for help on using the repository browser.