Changeset 81fd230 for chapter06/binutils.xml
- Timestamp:
- 02/19/2005 10:16:42 PM (19 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.1, 6.1.1, 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:
- 3d31fc4
- Parents:
- 2f9131f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter06/binutils.xml
r2f9131f r81fd230 4 4 %general-entities; 5 5 ]> 6 <sect1 id="ch-system-binutils" xreflabel="Binutils"role="wrap">6 <sect1 id="ch-system-binutils" role="wrap"> 7 7 <title>Binutils-&binutils-version;</title> 8 8 <?dbhtml filename="binutils.html"?> … … 11 11 12 12 <sect2 role="package"><title/> 13 <para>The Binutils package contains a linker, an assembler, and other tools for 14 handling object files.</para> 13 15 14 16 <segmentedlist> … … 18 20 </segmentedlist> 19 21 22 <segmentedlist> 23 <segtitle>Binutils installation depends on</segtitle> 24 <seglistitem><seg>Bash, Bison, Coreutils, Diffutils, Flex, GCC, Gettext, 25 Glibc, Grep, M4, Make, Perl, Sed, and Texinfo</seg></seglistitem> 26 </segmentedlist> 20 27 </sect2> 21 28 … … 23 30 <title>Installation of Binutils</title> 24 31 25 <para>Check if there is PTYs for the test suites:</para> 32 <para>This package is known to have issues when its default 33 optimization flags (including the <parameter>-march</parameter> and 34 <parameter>-mcpu</parameter> options) are changed. If any environment 35 variables that override default optimizations have been defined, such 36 as <envar>CFLAGS</envar> and <envar>CXXFLAGS</envar>, 37 unset them when building Binutils.</para> 38 39 <para>Verify that the PTYs are working properly inside the chroot 40 environment. Check that everything is set up correctly by performing a 41 simple test:</para> 26 42 27 43 <screen><userinput>expect -c "spawn ls"</userinput></screen> 28 44 29 <para>Create the build directory:</para> 45 <para>If the following message shows up, the chroot environment is not 46 set up for proper PTY operation:</para> 47 48 <screen><computeroutput>The system has no more ptys. 49 Ask your system administrator to create more.</computeroutput></screen> 50 51 <para>This issue needs to be resolved before running the test suites 52 for Binutils and GCC.</para> 53 54 <para>The Binutils documentation recommends building Binutils outside of the 55 source directory in a dedicated build directory:</para> 30 56 31 57 <screen><userinput>mkdir ../binutils-build 32 58 cd ../binutils-build</userinput></screen> 33 59 34 <para> Now prepare Binutils for compilation:</para>60 <para>Prepare Binutils for compilation:</para> 35 61 36 62 <screen><userinput>../binutils-&binutils-version;/configure --prefix=/usr \ … … 41 67 <screen><userinput>make tooldir=/usr</userinput></screen> 42 68 69 <para>Normally, the tooldir (the directory where the executables will 70 ultimately be located) is set to <filename 71 class="directory">$(exec_prefix)/$(target_alias)</filename>, which 72 expands into <phrase condition="html"><filename 73 class="directory">/usr/i686-pc-linux-gnu</filename></phrase><phrase 74 condition="pdf"><filename class="directory">/usr/i686-pc- 75 linux-gnu</filename></phrase>. Because this is a custom system, this 76 target-specific directory in <filename 77 class="directory">/usr</filename> is not required. This setup would be 78 used if the system was used to cross-compile (for example, compiling a 79 package on an Intel machine that generates code that can be executed 80 on PowerPC machines).</para> 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 43 86 <para>Test the results:</para> 44 87 45 <!--NEW--> 46 <screen><userinput>make -k check</userinput></screen> 47 48 <para>The test suite notes from <xref linkend="ch-tools-binutils-pass2"/> are still 49 very much appropriate here..</para> 88 <screen><userinput>make check</userinput></screen> 50 89 51 90 <para>Install the package:</para> … … 53 92 <screen><userinput>make tooldir=/usr install</userinput></screen> 54 93 55 <para>Install the <filename class="headerfile">libiberty</filename> header file:</para> 94 <para>Install the <filename class="headerfile">libiberty</filename> header file that is needed by 95 some packages:</para> 56 96 57 97 <screen><userinput>cp ../binutils-&binutils-version;/include/libiberty.h /usr/include</userinput></screen> … … 62 102 <sect2 id="contents-binutils" role="content"><title>Contents of Binutils</title> 63 103 64 <para>See testing</para> 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 115 <varlistentry id="addr2line"> 116 <term><command>addr2line</command></term> 117 <listitem> 118 <para>Translates program addresses to file names and line numbers; 119 given an address and the name of an executable, it uses the debugging 120 information in the executable to determine which source file and line 121 number are associated with the address</para> 122 <indexterm zone="ch-system-binutils addr2line"><primary sortas="b-addr2line">addr2line</primary></indexterm> 123 </listitem> 124 </varlistentry> 125 126 <varlistentry id="ar"> 127 <term><command>ar</command></term> 128 <listitem> 129 <para>Creates, modifies, and extracts from archives</para> 130 <indexterm zone="ch-system-binutils ar"><primary sortas="b-ar">ar</primary></indexterm> 131 </listitem> 132 </varlistentry> 133 134 <varlistentry id="as"> 135 <term><command>as</command></term> 136 <listitem> 137 <para>An assembler that assembles the output of <command>gcc</command> 138 into object files</para> 139 <indexterm zone="ch-system-binutils as"><primary sortas="b-as">as</primary></indexterm> 140 </listitem> 141 </varlistentry> 142 143 <varlistentry id="c-filt"> 144 <term><command>c++filt</command></term> 145 <listitem> 146 <para>Used by the linker to de-mangle C++ and Java symbols and to keep 147 overloaded functions from clashing</para> 148 <indexterm zone="ch-system-binutils c-filt"><primary sortas="b-c++filt">c++filt</primary></indexterm> 149 </listitem> 150 </varlistentry> 151 152 <varlistentry id="gprof"> 153 <term><command>gprof</command></term> 154 <listitem> 155 <para>Displays call graph profile data</para> 156 <indexterm zone="ch-system-binutils gprof"><primary sortas="b-gprof">gprof</primary></indexterm> 157 </listitem> 158 </varlistentry> 159 160 <varlistentry id="ld"> 161 <term><command>ld</command></term> 162 <listitem> 163 <para>A linker that combines a number of object and archive files into a single file, 164 relocating their data and tying up symbol references</para> 165 <indexterm zone="ch-system-binutils ld"><primary sortas="b-ld">ld</primary></indexterm> 166 </listitem> 167 </varlistentry> 168 169 <varlistentry id="nm"> 170 <term><command>nm</command></term> 171 <listitem> 172 <para>Lists the symbols occurring in a given object file</para> 173 <indexterm zone="ch-system-binutils nm"><primary sortas="b-nm">nm</primary></indexterm> 174 </listitem> 175 </varlistentry> 176 177 <varlistentry id="objcopy"> 178 <term><command>objcopy</command></term> 179 <listitem> 180 <para>Translates one type of object file into another</para> 181 <indexterm zone="ch-system-binutils objcopy"><primary sortas="b-objcopy">objcopy</primary></indexterm> 182 </listitem> 183 </varlistentry> 184 185 <varlistentry id="objdump"> 186 <term><command>objdump</command></term> 187 <listitem> 188 <para>Displays information about the given object file, with options 189 controlling the particular information to display; the information 190 shown is useful to programmers who are working on the compilation 191 tools</para> 192 <indexterm zone="ch-system-binutils objdump"><primary sortas="b-objdump">objdump</primary></indexterm> 193 </listitem> 194 </varlistentry> 195 196 <varlistentry id="ranlib"> 197 <term><command>ranlib</command></term> 198 <listitem> 199 <para>Generates an index of the contents of an archive and stores it 200 in the archive; the index lists all of the symbols defined by archive 201 members that are relocatable object files</para> 202 <indexterm zone="ch-system-binutils ranlib"><primary sortas="b-ranlib">ranlib</primary></indexterm> 203 </listitem> 204 </varlistentry> 205 206 <varlistentry id="readelf"> 207 <term><command>readelf</command></term> 208 <listitem> 209 <para>Displays information about ELF type binaries</para> 210 <indexterm zone="ch-system-binutils readelf"><primary sortas="b-readelf">readelf</primary></indexterm> 211 </listitem> 212 </varlistentry> 213 214 <varlistentry id="size"> 215 <term><command>size</command></term> 216 <listitem> 217 <para>Lists the section sizes and the total size for the given object files</para> 218 <indexterm zone="ch-system-binutils size"><primary sortas="b-size">size</primary></indexterm> 219 </listitem> 220 </varlistentry> 221 222 <varlistentry id="strings"> 223 <term><command>strings</command></term> 224 <listitem> 225 <para>Outputs, for each given file, the sequences of printable 226 characters that are of at least the specified length (defaulting to 227 four); for object files, it prints, by default, only the strings from 228 the initializing and loading sections while for other types of files, it 229 scans the entire file</para> 230 <indexterm zone="ch-system-binutils strings"><primary sortas="b-strings">strings</primary></indexterm> 231 </listitem> 232 </varlistentry> 233 234 <varlistentry id="strip"> 235 <term><command>strip</command></term> 236 <listitem> 237 <para>Discards symbols from object files</para> 238 <indexterm zone="ch-system-binutils strip"><primary sortas="b-strip">strip</primary></indexterm> 239 </listitem> 240 </varlistentry> 241 242 <varlistentry id="libiberty"> 243 <term><filename class="libraryfile">libiberty</filename></term> 244 <listitem> 245 <para>Contains routines used by various GNU programs, including 246 <command>getopt</command>, <command>obstack</command>, 247 <command>strerror</command>, <command>strtol</command>, and 248 <command>strtoul</command></para> 249 <indexterm zone="ch-system-binutils libiberty"><primary sortas="c-libiberty">libiberty</primary></indexterm> 250 </listitem> 251 </varlistentry> 252 253 <varlistentry id="libbfd"> 254 <term><filename class="libraryfile">libbfd</filename></term> 255 <listitem> 256 <para>The Binary File Descriptor library</para> 257 <indexterm zone="ch-system-binutils libbfd"><primary sortas="c-libbfd">libbfd</primary></indexterm> 258 </listitem> 259 </varlistentry> 260 261 <varlistentry id="libopcodes"> 262 <term><filename class="libraryfile">libopcodes</filename></term> 263 <listitem> 264 <para>A library for dealing with opcodes—the <quote>readable 265 text</quote> versions of instructions for the processor; 266 it is used for building utilities like 267 <command>objdump</command>.</para> 268 <indexterm zone="ch-system-binutils libopcodes"><primary sortas="c-libopcodes">libopcodes</primary></indexterm> 269 </listitem> 270 </varlistentry> 271 </variablelist> 65 272 66 273 </sect2> 67 274 68 275 </sect1> 276
Note:
See TracChangeset
for help on using the changeset viewer.