source: chapter08/glibc.xml@ 7546d8b

xry111/clfs-ng
Last change on this file since 7546d8b was 7546d8b, checked in by Xi Ruoyao <xry111@…>, 8 months ago

Merge remote-tracking branch 'origin/trunk' into xry111/clfs-ng

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