Changeset 92474b45
- Timestamp:
- 02/01/2006 08:41:29 PM (18 years ago)
- Branches:
- 10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
- Children:
- 8ef8304
- Parents:
- 50e693d
- Location:
- chapter06
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter06/bash.xml
r50e693d r92474b45 1 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" 3 "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ 3 4 <!ENTITY % general-entities SYSTEM "../general.ent"> 4 5 %general-entities; 5 6 ]> 7 6 8 <sect1 id="ch-system-bash" role="wrap"> 7 <title>Bash-&bash-version;</title> 8 <?dbhtml filename="bash.html"?> 9 <?dbhtml filename="bash.html"?> 9 10 10 <indexterm zone="ch-system-bash"><primary sortas="a-Bash">Bash</primary></indexterm>11 <title>Bash-&bash-version;</title> 11 12 12 <sect2 role="package"><title/> 13 <para>The Bash package contains the Bourne-Again SHell.</para> 13 <indexterm zone="ch-system-bash"> 14 <primary sortas="a-Bash">Bash</primary> 15 </indexterm> 14 16 15 <segmentedlist> 16 <segtitle>&buildtime;</segtitle> 17 <segtitle>&diskspace;</segtitle> 18 <seglistitem><seg>1.2 SBU</seg><seg>24.6 MB</seg></seglistitem> 19 </segmentedlist> 17 <sect2 role="package"> 18 <title/> 20 19 21 <segmentedlist> 22 <segtitle>&dependencies;</segtitle> 23 <seglistitem><seg>Binutils, Coreutils, Diffutils, Gawk, 24 GCC, Glibc, Grep, Make, Ncurses, and Sed.</seg></seglistitem> 25 </segmentedlist> 26 </sect2> 20 <para>The Bash package contains the Bourne-Again SHell.</para> 27 21 28 <sect2 role="installation"> 29 <title>Installation of Bash</title> 22 <segmentedlist> 23 <segtitle>&buildtime;</segtitle> 24 <segtitle>&diskspace;</segtitle> 30 25 31 <para>If you downloaded the Bash documentation tarball and wish to install HTML 32 documentation, issue the following commands:</para> 26 <seglistitem> 27 <seg>1.2 SBU</seg> 28 <seg>24.6 MB</seg> 29 </seglistitem> 30 </segmentedlist> 31 32 <segmentedlist> 33 <segtitle>&dependencies;</segtitle> 34 35 <seglistitem> 36 <seg>Binutils, Coreutils, Diffutils, Gawk, GCC, Glibc, Grep, Make, 37 Ncurses, and Sed.</seg> 38 </seglistitem> 39 </segmentedlist> 40 41 </sect2> 42 43 <sect2 role="installation"> 44 <title>Installation of Bash</title> 45 46 <para>If you downloaded the Bash documentation tarball and wish to install 47 HTML documentation, issue the following commands:</para> 33 48 34 49 <screen><userinput>tar -xvf ../bash-doc-&bash-doc-version;.tar.gz && … … 36 51 Makefile.in</userinput></screen> 37 52 38 <para>Prepare Bash for compilation:</para>53 <para>Prepare Bash for compilation:</para> 39 54 40 55 <screen><userinput>./configure --prefix=/usr --bindir=/bin \ 41 56 --without-bash-malloc --with-installed-readline</userinput></screen> 42 57 43 <para>The meaning of the configure options:</para> 58 <variablelist> 59 <title>The meaning of the configure options:</title> 44 60 45 <variablelist> 46 <varlistentry> 47 <term><parameter>--with-installed-readline</parameter></term> 48 <listitem><para>This option tells Bash to use the 49 <filename class="libraryfile">readline</filename> library that is already installed 50 on the system rather than using its own readline version.</para></listitem> 51 </varlistentry> 52 </variablelist> 61 <varlistentry> 62 <term><parameter>--with-installed-readline</parameter></term> 63 <listitem> 64 <para>This option tells Bash to use the <filename 65 class="libraryfile">readline</filename> library that is already 66 installed on the system rather than using its own readline 67 version.</para> 68 </listitem> 69 </varlistentry> 53 70 54 <para>Compile the package:</para> 71 </variablelist> 72 73 <para>Compile the package:</para> 55 74 56 75 <screen><userinput>make</userinput></screen> 57 76 58 <para>To test the results, issue:59 <userinput>make tests</userinput>.</para>77 <para>To test the results, issue: 78 <userinput>make tests</userinput>.</para> 60 79 61 <para>Install the package:</para>80 <para>Install the package:</para> 62 81 63 82 <screen><userinput>make install</userinput></screen> 64 83 65 <para>Run the newly compiled <command>bash</command> program (replacing the one that is66 currently being executed):</para>84 <para>Run the newly compiled <command>bash</command> program (replacing the one that is 85 currently being executed):</para> 67 86 68 87 <screen role="nodump"><userinput>exec /bin/bash --login +h</userinput></screen> 69 88 70 <note><para>The parameters used make the <command>bash</command> 71 process an interactive login shell and continue to disable hashing so 72 that new programs are found as they become available.</para></note> 89 <note> 90 <para>The parameters used make the <command>bash</command> 91 process an interactive login shell and continue to disable hashing so 92 that new programs are found as they become available.</para> 93 </note> 73 94 74 </sect2>95 </sect2> 75 96 97 <sect2 id="contents-bash" role="content"> 98 <title>Contents of Bash</title> 76 99 77 <sect2 id="contents-bash" role="content"><title>Contents of Bash</title> 100 <segmentedlist> 101 <segtitle>Installed programs</segtitle> 78 102 79 <segmentedlist>80 <segtitle>Installed programs</segtitle>81 <seglistitem><seg>bash, bashbug, and sh (link to bash)</seg></seglistitem>82 </segmentedlist>103 <seglistitem> 104 <seg>bash, bashbug, and sh (link to bash)</seg> 105 </seglistitem> 106 </segmentedlist> 83 107 84 <variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead> 85 <?dbfo list-presentation="list"?> 86 <?dbhtml list-presentation="table"?> 108 <variablelist> 109 <bridgehead renderas="sect3">Short Descriptions</bridgehead> 110 <?dbfo list-presentation="list"?> 111 <?dbhtml list-presentation="table"?> 87 112 88 <varlistentry id="bash"> 89 <term><command>bash</command></term> 90 <listitem> 91 <para>A widely-used command interpreter; it performs many types of 92 expansions and substitutions on a given command line before executing 93 it, thus making this interpreter a powerful tool</para> 94 <indexterm zone="ch-system-bash bash"><primary sortas="b-bash">bash</primary></indexterm> 95 </listitem> 96 </varlistentry> 113 <varlistentry id="bash"> 114 <term><command>bash</command></term> 115 <listitem> 116 <para>A widely-used command interpreter; it performs many types of 117 expansions and substitutions on a given command line before executing 118 it, thus making this interpreter a powerful tool</para> 119 <indexterm zone="ch-system-bash bash"> 120 <primary sortas="b-bash">bash</primary> 121 </indexterm> 122 </listitem> 123 </varlistentry> 97 124 98 <varlistentry id="bashbug"> 99 <term><command>bashbug</command></term> 100 <listitem> 101 <para>A shell script to help the user compose and mail standard formatted bug 102 reports concerning <command>bash</command></para> 103 <indexterm zone="ch-system-bash bashbug"><primary sortas="b-bashbug">bashbug</primary></indexterm> 104 </listitem> 105 </varlistentry> 125 <varlistentry id="bashbug"> 126 <term><command>bashbug</command></term> 127 <listitem> 128 <para>A shell script to help the user compose and mail standard 129 formatted bug reports concerning <command>bash</command></para> 130 <indexterm zone="ch-system-bash bashbug"> 131 <primary sortas="b-bashbug">bashbug</primary> 132 </indexterm> 133 </listitem> 134 </varlistentry> 106 135 107 <varlistentry id="sh"> 108 <term><command>sh</command></term> 109 <listitem> 110 <para>A symlink to the <command>bash</command> program; when invoked 111 as <command>sh</command>, <command>bash</command> tries to mimic the 112 startup behavior of historical versions of <command>sh</command> as 113 closely as possible, while conforming to the POSIX standard as well</para> 114 <indexterm zone="ch-system-bash sh"><primary sortas="b-sh">sh</primary></indexterm> 115 </listitem> 116 </varlistentry> 117 </variablelist> 136 <varlistentry id="sh"> 137 <term><command>sh</command></term> 138 <listitem> 139 <para>A symlink to the <command>bash</command> program; when invoked 140 as <command>sh</command>, <command>bash</command> tries to mimic the 141 startup behavior of historical versions of <command>sh</command> as 142 closely as possible, while conforming to the POSIX standard as 143 well</para> 144 <indexterm zone="ch-system-bash sh"> 145 <primary sortas="b-sh">sh</primary> 146 </indexterm> 147 </listitem> 148 </varlistentry> 118 149 119 </sect2> 150 </variablelist> 151 152 </sect2> 120 153 121 154 </sect1> 122 -
chapter06/binutils.xml
r50e693d r92474b45 1 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" 3 "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ 3 4 <!ENTITY % general-entities SYSTEM "../general.ent"> 4 5 %general-entities; 5 6 ]> 7 6 8 <sect1 id="ch-system-binutils" role="wrap"> 7 <title>Binutils-&binutils-version;</title> 8 <?dbhtml filename="binutils.html"?> 9 10 <indexterm zone="ch-system-binutils"><primary sortas="a-Binutils">Binutils</primary></indexterm> 11 12 <sect2 role="package"><title/> 13 <para>The Binutils package contains a linker, an assembler, and other tools for 14 handling object files.</para> 15 16 <segmentedlist> 17 <segtitle>&buildtime;</segtitle> 18 <segtitle>&diskspace;</segtitle> 19 <seglistitem><seg>1.3 SBU</seg><seg>158 MB</seg></seglistitem> 20 </segmentedlist> 21 22 <segmentedlist> 23 <segtitle>&dependencies;</segtitle> 24 <seglistitem><seg>Bash, Coreutils, Diffutils, GCC, Gettext, 25 Glibc, Grep, M4, Make, Perl, Sed, and Texinfo</seg></seglistitem> 26 </segmentedlist> 27 </sect2> 28 29 <sect2 role="installation"> 30 <title>Installation of Binutils</title> 31 32 <para>Verify that the PTYs are working properly inside the chroot 33 environment. Check that everything is set up correctly by performing a 34 simple test:</para> 9 <?dbhtml filename="binutils.html"?> 10 11 <title>Binutils-&binutils-version;</title> 12 13 <indexterm zone="ch-system-binutils"> 14 <primary sortas="a-Binutils">Binutils</primary> 15 </indexterm> 16 17 <sect2 role="package"> 18 <title/> 19 20 <para>The Binutils package contains a linker, an assembler, and other 21 tools for handling object files.</para> 22 23 <segmentedlist> 24 <segtitle>&buildtime;</segtitle> 25 <segtitle>&diskspace;</segtitle> 26 27 <seglistitem> 28 <seg>1.3 SBU</seg> 29 <seg>158 MB</seg> 30 </seglistitem> 31 </segmentedlist> 32 33 <segmentedlist> 34 <segtitle>&dependencies;</segtitle> 35 36 <seglistitem> 37 <seg>Bash, Coreutils, Diffutils, GCC, Gettext, Glibc, Grep, M4, 38 Make, Perl, Sed, and Texinfo</seg> 39 </seglistitem> 40 </segmentedlist> 41 42 </sect2> 43 44 <sect2 role="installation"> 45 <title>Installation of Binutils</title> 46 47 <para>Verify that the PTYs are working properly inside the chroot 48 environment. Check that everything is set up correctly by performing a 49 simple test:</para> 35 50 36 51 <screen><userinput>expect -c "spawn ls"</userinput></screen> 37 52 38 <para>If the following message shows up, the chroot environment is not39 set up for proper PTY operation:</para>40 41 <screen><computeroutput>The system has no more ptys. 53 <para>If the following message shows up, the chroot environment is not 54 set up for proper PTY operation:</para> 55 56 <screen><computeroutput>The system has no more ptys. 42 57 Ask your system administrator to create more.</computeroutput></screen> 43 58 44 <para>This issue needs to be resolved before running the test suites45 for Binutils and GCC.</para>46 47 <para>The Binutils documentation recommends building Binutils outside of the48 source directory in a dedicated build directory:</para>59 <para>This issue needs to be resolved before running the test suites 60 for Binutils and GCC.</para> 61 62 <para>The Binutils documentation recommends building Binutils outside of the 63 source directory in a dedicated build directory:</para> 49 64 50 65 <screen><userinput>mkdir -v ../binutils-build 51 66 cd ../binutils-build</userinput></screen> 52 67 53 <para>Prepare Binutils for compilation:</para>68 <para>Prepare Binutils for compilation:</para> 54 69 55 70 <screen><userinput>../binutils-&binutils-version;/configure --prefix=/usr \ 56 71 --enable-shared</userinput></screen> 57 72 58 <para>Compile the package:</para>73 <para>Compile the package:</para> 59 74 60 75 <screen><userinput>make tooldir=/usr</userinput></screen> 61 76 62 <variablelist> 63 <title>The meaning of the make parameter:</title> 64 <varlistentry> 65 <term><parameter>tooldir=/usr</parameter></term> 66 <listitem> 67 <para>Normally, the tooldir (the directory where the executables will 68 ultimately be located) is set to <filename 69 class="directory">$(exec_prefix)/$(target_alias)</filename>. For 70 example, i686 machines would expand that to <filename 71 class="directory">/usr/i686-pc-linux-gnu</filename>. Because this is 72 a custom system, this target-specific directory in <filename 73 class="directory">/usr</filename> is not required. <filename 74 class="directory">$(exec_prefix)/$(target_alias)</filename> would be 75 used if the system was used to cross-compile (for example, compiling a 76 package on an Intel machine that generates code that can be executed 77 on PowerPC machines).</para> 78 </listitem> 79 </varlistentry> 80 </variablelist> 81 82 <important><para>The test suite for Binutils in this section is 83 considered critical. Do not skip it under any 84 circumstances.</para></important> 85 86 <para>Test the results:</para> 77 <variablelist> 78 <title>The meaning of the make parameter:</title> 79 80 <varlistentry> 81 <term><parameter>tooldir=/usr</parameter></term> 82 <listitem> 83 <para>Normally, the tooldir (the directory where the executables will 84 ultimately be located) is set to <filename 85 class="directory">$(exec_prefix)/$(target_alias)</filename>. For 86 example, i686 machines would expand that to <filename 87 class="directory">/usr/i686-pc-linux-gnu</filename>. Because this is 88 a custom system, this target-specific directory in <filename 89 class="directory">/usr</filename> is not required. <filename 90 class="directory">$(exec_prefix)/$(target_alias)</filename> would be 91 used if the system was used to cross-compile (for example, compiling a 92 package on an Intel machine that generates code that can be executed 93 on PowerPC machines).</para> 94 </listitem> 95 </varlistentry> 96 97 </variablelist> 98 99 <important> 100 <para>The test suite for Binutils in this section is considered critical. 101 Do not skip it under any circumstances.</para> 102 </important> 103 104 <para>Test the results:</para> 87 105 88 106 <screen><userinput>make check</userinput></screen> 89 107 90 <para>Install the package:</para>108 <para>Install the package:</para> 91 109 92 110 <screen><userinput>make tooldir=/usr install</userinput></screen> 93 111 94 <para>Install the <filename class="headerfile">libiberty</filename> header file that is needed by 95 some packages:</para>112 <para>Install the <filename class="headerfile">libiberty</filename> header 113 file that is needed by some packages:</para> 96 114 97 115 <screen><userinput>cp -v ../binutils-&binutils-version;/include/libiberty.h /usr/include</userinput></screen> 98 116 99 </sect2> 100 101 102 <sect2 id="contents-binutils" role="content"><title>Contents of Binutils</title> 103 104 <segmentedlist> 105 <segtitle>Installed programs</segtitle> 106 <segtitle>Installed libraries</segtitle> 107 <seglistitem><seg>addr2line, ar, as, c++filt, gprof, ld, nm, objcopy, objdump, 108 ranlib, readelf, size, strings, and strip</seg> 109 <seg>libiberty.a, libbfd.[a,so], and libopcodes.[a,so]</seg></seglistitem> 110 </segmentedlist> 111 112 <variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead> 113 <?dbfo list-presentation="list"?> 114 <?dbhtml list-presentation="table"?> 115 116 <varlistentry id="addr2line"> 117 <term><command>addr2line</command></term> 118 <listitem> 119 <para>Translates program addresses to file names and line numbers; 120 given an address and the name of an executable, it uses the debugging 121 information in the executable to determine which source file and line 122 number are associated with the address</para> 123 <indexterm zone="ch-system-binutils addr2line"><primary sortas="b-addr2line">addr2line</primary></indexterm> 124 </listitem> 125 </varlistentry> 126 127 <varlistentry id="ar"> 128 <term><command>ar</command></term> 129 <listitem> 130 <para>Creates, modifies, and extracts from archives</para> 131 <indexterm zone="ch-system-binutils ar"><primary sortas="b-ar">ar</primary></indexterm> 132 </listitem> 133 </varlistentry> 134 135 <varlistentry id="as"> 136 <term><command>as</command></term> 137 <listitem> 138 <para>An assembler that assembles the output of <command>gcc</command> 139 into object files</para> 140 <indexterm zone="ch-system-binutils as"><primary sortas="b-as">as</primary></indexterm> 141 </listitem> 142 </varlistentry> 143 144 <varlistentry id="c-filt"> 145 <term><command>c++filt</command></term> 146 <listitem> 147 <para>Used by the linker to de-mangle C++ and Java symbols and to keep 148 overloaded functions from clashing</para> 149 <indexterm zone="ch-system-binutils c-filt"><primary sortas="b-c++filt">c++filt</primary></indexterm> 150 </listitem> 151 </varlistentry> 152 153 <varlistentry id="gprof"> 154 <term><command>gprof</command></term> 155 <listitem> 156 <para>Displays call graph profile data</para> 157 <indexterm zone="ch-system-binutils gprof"><primary sortas="b-gprof">gprof</primary></indexterm> 158 </listitem> 159 </varlistentry> 160 161 <varlistentry id="ld"> 162 <term><command>ld</command></term> 163 <listitem> 164 <para>A linker that combines a number of object and archive files into a single file, 165 relocating their data and tying up symbol references</para> 166 <indexterm zone="ch-system-binutils ld"><primary sortas="b-ld">ld</primary></indexterm> 167 </listitem> 168 </varlistentry> 169 170 <varlistentry id="nm"> 171 <term><command>nm</command></term> 172 <listitem> 173 <para>Lists the symbols occurring in a given object file</para> 174 <indexterm zone="ch-system-binutils nm"><primary sortas="b-nm">nm</primary></indexterm> 175 </listitem> 176 </varlistentry> 177 178 <varlistentry id="objcopy"> 179 <term><command>objcopy</command></term> 180 <listitem> 181 <para>Translates one type of object file into another</para> 182 <indexterm zone="ch-system-binutils objcopy"><primary sortas="b-objcopy">objcopy</primary></indexterm> 183 </listitem> 184 </varlistentry> 185 186 <varlistentry id="objdump"> 187 <term><command>objdump</command></term> 188 <listitem> 189 <para>Displays information about the given object file, with options 190 controlling the particular information to display; the information 191 shown is useful to programmers who are working on the compilation 192 tools</para> 193 <indexterm zone="ch-system-binutils objdump"><primary sortas="b-objdump">objdump</primary></indexterm> 194 </listitem> 195 </varlistentry> 196 197 <varlistentry id="ranlib"> 198 <term><command>ranlib</command></term> 199 <listitem> 200 <para>Generates an index of the contents of an archive and stores it 201 in the archive; the index lists all of the symbols defined by archive 202 members that are relocatable object files</para> 203 <indexterm zone="ch-system-binutils ranlib"><primary sortas="b-ranlib">ranlib</primary></indexterm> 204 </listitem> 205 </varlistentry> 206 207 <varlistentry id="readelf"> 208 <term><command>readelf</command></term> 209 <listitem> 210 <para>Displays information about ELF type binaries</para> 211 <indexterm zone="ch-system-binutils readelf"><primary sortas="b-readelf">readelf</primary></indexterm> 212 </listitem> 213 </varlistentry> 214 215 <varlistentry id="size"> 216 <term><command>size</command></term> 217 <listitem> 218 <para>Lists the section sizes and the total size for the given object files</para> 219 <indexterm zone="ch-system-binutils size"><primary sortas="b-size">size</primary></indexterm> 220 </listitem> 221 </varlistentry> 222 223 <varlistentry id="strings"> 224 <term><command>strings</command></term> 225 <listitem> 226 <para>Outputs, for each given file, the sequences of printable 227 characters that are of at least the specified length (defaulting to 228 four); for object files, it prints, by default, only the strings from 229 the initializing and loading sections while for other types of files, it 230 scans the entire file</para> 231 <indexterm zone="ch-system-binutils strings"><primary sortas="b-strings">strings</primary></indexterm> 232 </listitem> 233 </varlistentry> 234 235 <varlistentry id="strip"> 236 <term><command>strip</command></term> 237 <listitem> 238 <para>Discards symbols from object files</para> 239 <indexterm zone="ch-system-binutils strip"><primary sortas="b-strip">strip</primary></indexterm> 240 </listitem> 241 </varlistentry> 242 243 <varlistentry id="libiberty"> 244 <term><filename class="libraryfile">libiberty</filename></term> 245 <listitem> 246 <para>Contains routines used by various GNU programs, including 247 <command>getopt</command>, <command>obstack</command>, 248 <command>strerror</command>, <command>strtol</command>, and 249 <command>strtoul</command></para> 250 <indexterm zone="ch-system-binutils libiberty"><primary sortas="c-libiberty">libiberty</primary></indexterm> 251 </listitem> 252 </varlistentry> 253 254 <varlistentry id="libbfd"> 255 <term><filename class="libraryfile">libbfd</filename></term> 256 <listitem> 257 <para>The Binary File Descriptor library</para> 258 <indexterm zone="ch-system-binutils libbfd"><primary sortas="c-libbfd">libbfd</primary></indexterm> 259 </listitem> 260 </varlistentry> 261 262 <varlistentry id="libopcodes"> 263 <term><filename class="libraryfile">libopcodes</filename></term> 264 <listitem> 265 <para>A library for dealing with opcodes—the <quote>readable 266 text</quote> versions of instructions for the processor; 267 it is used for building utilities like 268 <command>objdump</command>.</para> 269 <indexterm zone="ch-system-binutils libopcodes"><primary sortas="c-libopcodes">libopcodes</primary></indexterm> 270 </listitem> 271 </varlistentry> 272 </variablelist> 273 274 </sect2> 117 </sect2> 118 119 120 <sect2 id="contents-binutils" role="content"> 121 <title>Contents of Binutils</title> 122 123 <segmentedlist> 124 <segtitle>Installed programs</segtitle> 125 <segtitle>Installed libraries</segtitle> 126 127 <seglistitem> 128 <seg>addr2line, ar, as, c++filt, gprof, ld, nm, objcopy, objdump, 129 ranlib, readelf, size, strings, and strip</seg> 130 <seg>libiberty.a, libbfd.[a,so], and libopcodes.[a,so]</seg> 131 </seglistitem> 132 </segmentedlist> 133 134 <variablelist> 135 <bridgehead renderas="sect3">Short Descriptions</bridgehead> 136 <?dbfo list-presentation="list"?> 137 <?dbhtml list-presentation="table"?> 138 139 <varlistentry id="addr2line"> 140 <term><command>addr2line</command></term> 141 <listitem> 142 <para>Translates program addresses to file names and line numbers; 143 given an address and the name of an executable, it uses the debugging 144 information in the executable to determine which source file and line 145 number are associated with the address</para> 146 <indexterm zone="ch-system-binutils addr2line"> 147 <primary sortas="b-addr2line">addr2line</primary> 148 </indexterm> 149 </listitem> 150 </varlistentry> 151 152 <varlistentry id="ar"> 153 <term><command>ar</command></term> 154 <listitem> 155 <para>Creates, modifies, and extracts from archives</para> 156 <indexterm zone="ch-system-binutils ar"> 157 <primary sortas="b-ar">ar</primary> 158 </indexterm> 159 </listitem> 160 </varlistentry> 161 162 <varlistentry id="as"> 163 <term><command>as</command></term> 164 <listitem> 165 <para>An assembler that assembles the output of <command>gcc</command> 166 into object files</para> 167 <indexterm zone="ch-system-binutils as"> 168 <primary sortas="b-as">as</primary> 169 </indexterm> 170 </listitem> 171 </varlistentry> 172 173 <varlistentry id="c-filt"> 174 <term><command>c++filt</command></term> 175 <listitem> 176 <para>Used by the linker to de-mangle C++ and Java symbols and to keep 177 overloaded functions from clashing</para> 178 <indexterm zone="ch-system-binutils c-filt"> 179 <primary sortas="b-c++filt">c++filt</primary> 180 </indexterm> 181 </listitem> 182 </varlistentry> 183 184 <varlistentry id="gprof"> 185 <term><command>gprof</command></term> 186 <listitem> 187 <para>Displays call graph profile data</para> 188 <indexterm zone="ch-system-binutils gprof"> 189 <primary sortas="b-gprof">gprof</primary> 190 </indexterm> 191 </listitem> 192 </varlistentry> 193 194 <varlistentry id="ld"> 195 <term><command>ld</command></term> 196 <listitem> 197 <para>A linker that combines a number of object and archive files 198 into a single file, relocating their data and tying up symbol 199 references</para> 200 <indexterm zone="ch-system-binutils ld"> 201 <primary sortas="b-ld">ld</primary> 202 </indexterm> 203 </listitem> 204 </varlistentry> 205 206 <varlistentry id="nm"> 207 <term><command>nm</command></term> 208 <listitem> 209 <para>Lists the symbols occurring in a given object file</para> 210 <indexterm zone="ch-system-binutils nm"> 211 <primary sortas="b-nm">nm</primary> 212 </indexterm> 213 </listitem> 214 </varlistentry> 215 216 <varlistentry id="objcopy"> 217 <term><command>objcopy</command></term> 218 <listitem> 219 <para>Translates one type of object file into another</para> 220 <indexterm zone="ch-system-binutils objcopy"> 221 <primary sortas="b-objcopy">objcopy</primary> 222 </indexterm> 223 </listitem> 224 </varlistentry> 225 226 <varlistentry id="objdump"> 227 <term><command>objdump</command></term> 228 <listitem> 229 <para>Displays information about the given object file, with options 230 controlling the particular information to display; the information 231 shown is useful to programmers who are working on the compilation 232 tools</para> 233 <indexterm zone="ch-system-binutils objdump"> 234 <primary sortas="b-objdump">objdump</primary> 235 </indexterm> 236 </listitem> 237 </varlistentry> 238 239 <varlistentry id="ranlib"> 240 <term><command>ranlib</command></term> 241 <listitem> 242 <para>Generates an index of the contents of an archive and stores it 243 in the archive; the index lists all of the symbols defined by archive 244 members that are relocatable object files</para> 245 <indexterm zone="ch-system-binutils ranlib"> 246 <primary sortas="b-ranlib">ranlib</primary> 247 </indexterm> 248 </listitem> 249 </varlistentry> 250 251 <varlistentry id="readelf"> 252 <term><command>readelf</command></term> 253 <listitem> 254 <para>Displays information about ELF type binaries</para> 255 <indexterm zone="ch-system-binutils readelf"> 256 <primary sortas="b-readelf">readelf</primary> 257 </indexterm> 258 </listitem> 259 </varlistentry> 260 261 <varlistentry id="size"> 262 <term><command>size</command></term> 263 <listitem> 264 <para>Lists the section sizes and the total size for the given 265 object files</para> 266 <indexterm zone="ch-system-binutils size"> 267 <primary sortas="b-size">size</primary> 268 </indexterm> 269 </listitem> 270 </varlistentry> 271 272 <varlistentry id="strings"> 273 <term><command>strings</command></term> 274 <listitem> 275 <para>Outputs, for each given file, the sequences of printable 276 characters that are of at least the specified length (defaulting to 277 four); for object files, it prints, by default, only the strings from 278 the initializing and loading sections while for other types of files, it 279 scans the entire file</para> 280 <indexterm zone="ch-system-binutils strings"> 281 <primary sortas="b-strings">strings</primary> 282 </indexterm> 283 </listitem> 284 </varlistentry> 285 286 <varlistentry id="strip"> 287 <term><command>strip</command></term> 288 <listitem> 289 <para>Discards symbols from object files</para> 290 <indexterm zone="ch-system-binutils strip"> 291 <primary sortas="b-strip">strip</primary> 292 </indexterm> 293 </listitem> 294 </varlistentry> 295 296 <varlistentry id="libiberty"> 297 <term><filename class="libraryfile">libiberty</filename></term> 298 <listitem> 299 <para>Contains routines used by various GNU programs, including 300 <command>getopt</command>, <command>obstack</command>, 301 <command>strerror</command>, <command>strtol</command>, and 302 <command>strtoul</command></para> 303 <indexterm zone="ch-system-binutils libiberty"> 304 <primary sortas="c-libiberty">libiberty</primary> 305 </indexterm> 306 </listitem> 307 </varlistentry> 308 309 <varlistentry id="libbfd"> 310 <term><filename class="libraryfile">libbfd</filename></term> 311 <listitem> 312 <para>The Binary File Descriptor library</para> 313 <indexterm zone="ch-system-binutils libbfd"> 314 <primary sortas="c-libbfd">libbfd</primary> 315 </indexterm> 316 </listitem> 317 </varlistentry> 318 319 <varlistentry id="libopcodes"> 320 <term><filename class="libraryfile">libopcodes</filename></term> 321 <listitem> 322 <para>A library for dealing with opcodes—the <quote>readable 323 text</quote> versions of instructions for the processor; 324 it is used for building utilities like 325 <command>objdump</command>.</para> 326 <indexterm zone="ch-system-binutils libopcodes"> 327 <primary sortas="c-libopcodes">libopcodes</primary> 328 </indexterm> 329 </listitem> 330 </varlistentry> 331 332 </variablelist> 333 334 </sect2> 275 335 276 336 </sect1> 277 -
chapter06/bison.xml
r50e693d r92474b45 1 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" 3 "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ 3 4 <!ENTITY % general-entities SYSTEM "../general.ent"> 4 5 %general-entities; 5 6 ]> 7 6 8 <sect1 id="ch-system-bison" role="wrap"> 7 <title>Bison-&bison-version;</title> 8 <?dbhtml filename="bison.html"?> 9 <?dbhtml filename="bison.html"?> 9 10 10 <indexterm zone="ch-system-bison"><primary sortas="a-Bison">Bison</primary></indexterm>11 <title>Bison-&bison-version;</title> 11 12 12 <sect2 role="package"><title/> 13 <para>The Bison package contains a parser generator.</para> 13 <indexterm zone="ch-system-bison"> 14 <primary sortas="a-Bison">Bison</primary> 15 </indexterm> 14 16 15 <segmentedlist> 16 <segtitle>&buildtime;</segtitle> 17 <segtitle>&diskspace;</segtitle> 18 <seglistitem><seg>0.6 SBU</seg><seg>9.9 MB</seg></seglistitem> 19 </segmentedlist> 17 <sect2 role="package"> 18 <title/> 20 19 21 <segmentedlist> 22 <segtitle>&dependencies;</segtitle> 23 <seglistitem><seg>Bash, Binutils, Coreutils, Diffutils, 24 GCC, Gettext, Glibc, Grep, M4, Make, and Sed</seg></seglistitem> 25 </segmentedlist> 26 </sect2> 20 <para>The Bison package contains a parser generator.</para> 27 21 28 <sect2 role="installation"> 29 <title>Installation of Bison</title> 22 <segmentedlist> 23 <segtitle>&buildtime;</segtitle> 24 <segtitle>&diskspace;</segtitle> 30 25 31 <para>Prepare Bison for compilation:</para> 26 <seglistitem> 27 <seg>0.6 SBU</seg> 28 <seg>9.9 MB</seg> 29 </seglistitem> 30 </segmentedlist> 31 32 <segmentedlist> 33 <segtitle>&dependencies;</segtitle> 34 35 <seglistitem> 36 <seg>Bash, Binutils, Coreutils, Diffutils, GCC, Gettext, Glibc, 37 Grep, M4, Make, and Sed</seg> 38 </seglistitem> 39 </segmentedlist> 40 41 </sect2> 42 43 <sect2 role="installation"> 44 <title>Installation of Bison</title> 45 46 <para>Prepare Bison for compilation:</para> 32 47 33 48 <screen><userinput>./configure --prefix=/usr</userinput></screen> 34 49 35 <para>The configure system causes bison to be built without support for36 internationalization of error messages if a <command>bison</command>37 program is not already in $PATH. The following addition will correct38 this.</para>50 <para>The configure system causes bison to be built without support for 51 internationalization of error messages if a <command>bison</command> 52 program is not already in $PATH. The following addition will correct 53 this.</para> 39 54 40 <screen>echo '#define YYENABLE_NLS 1' >> config.h</screen> 55 <screen>echo '#define YYENABLE_NLS 1' >> config.h</screen> 41 56 42 <para>Compile the package:</para>57 <para>Compile the package:</para> 43 58 44 59 <screen><userinput>make</userinput></screen> 45 60 46 <para>To test the results, issue:47 <userinput>make check</userinput>.</para>61 <para>To test the results, issue: 62 <userinput>make check</userinput>.</para> 48 63 49 <para>Install the package:</para>64 <para>Install the package:</para> 50 65 51 66 <screen><userinput>make install</userinput></screen> 52 67 53 </sect2>68 </sect2> 54 69 55 <sect2 id="contents-bison" role="content"><title>Contents of Bison</title> 70 <sect2 id="contents-bison" role="content"> 71 <title>Contents of Bison</title> 56 72 57 <segmentedlist> 58 <segtitle>Installed programs</segtitle> 59 <segtitle>Installed library</segtitle> 60 <seglistitem><seg>bison and yacc</seg><seg>liby.a</seg></seglistitem> 61 </segmentedlist> 73 <segmentedlist> 74 <segtitle>Installed programs</segtitle> 75 <segtitle>Installed library</segtitle> 62 76 63 <variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead> 64 <?dbfo list-presentation="list"?> 65 <?dbhtml list-presentation="table"?> 77 <seglistitem> 78 <seg>bison and yacc</seg> 79 <seg>liby.a</seg> 80 </seglistitem> 81 </segmentedlist> 66 82 67 <varlistentry id="bison"> 68 <term><command>bison</command></term> 69 <listitem> 70 <para>Generates, from a series of rules, a program for analyzing the structure 71 of text files; Bison is a replacement for Yacc (Yet Another Compiler 72 Compiler)</para> 73 <indexterm zone="ch-system-bison bison"><primary sortas="b-bison">bison</primary></indexterm> 74 </listitem> 75 </varlistentry> 83 <variablelist> 84 <bridgehead renderas="sect3">Short Descriptions</bridgehead> 85 <?dbfo list-presentation="list"?> 86 <?dbhtml list-presentation="table"?> 76 87 77 <varlistentry id="yacc"> 78 <term><command>yacc</command></term> 79 <listitem> 80 <para>A wrapper for <command>bison</command>, meant for programs 81 that still call <command>yacc</command> instead of <command>bison</command>; 82 it calls <command>bison</command> with the <parameter>-y</parameter> option</para> 83 <indexterm zone="ch-system-bison yacc"><primary sortas="b-yacc">yacc</primary></indexterm> 84 </listitem> 85 </varlistentry> 88 <varlistentry id="bison"> 89 <term><command>bison</command></term> 90 <listitem> 91 <para>Generates, from a series of rules, a program for analyzing the 92 structure of text files; Bison is a replacement for Yacc (Yet Another 93 Compiler Compiler)</para> 94 <indexterm zone="ch-system-bison bison"> 95 <primary sortas="b-bison">bison</primary> 96 </indexterm> 97 </listitem> 98 </varlistentry> 86 99 87 <varlistentry id="liby.a"> 88 <term><filename class="libraryfile">liby.a</filename></term> 89 <listitem> 90 <para>The Yacc library containing implementations of Yacc-compatible 91 <emphasis>yyerror</emphasis> and <emphasis>main</emphasis> functions; 92 this library is normally not very useful, but POSIX requires 93 it</para> 94 <indexterm zone="ch-system-bison liby.a"><primary sortas="c-liby.a">liby.a</primary></indexterm> 95 </listitem> 96 </varlistentry> 97 </variablelist> 100 <varlistentry id="yacc"> 101 <term><command>yacc</command></term> 102 <listitem> 103 <para>A wrapper for <command>bison</command>, meant for programs that 104 still call <command>yacc</command> instead of <command>bison</command>; 105 it calls <command>bison</command> with the <parameter>-y</parameter> 106 option</para> 107 <indexterm zone="ch-system-bison yacc"> 108 <primary sortas="b-yacc">yacc</primary> 109 </indexterm> 110 </listitem> 111 </varlistentry> 98 112 99 </sect2> 113 <varlistentry id="liby.a"> 114 <term><filename class="libraryfile">liby.a</filename></term> 115 <listitem> 116 <para>The Yacc library containing implementations of Yacc-compatible 117 <function>yyerror</function> and <function>main</function> functions; 118 this library is normally not very useful, but POSIX requires it</para> 119 <indexterm zone="ch-system-bison liby.a"> 120 <primary sortas="c-liby.a">liby.a</primary> 121 </indexterm> 122 </listitem> 123 </varlistentry> 124 125 </variablelist> 126 127 </sect2> 100 128 101 129 </sect1> 102
Note:
See TracChangeset
for help on using the changeset viewer.