[bf8c11f] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
| 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
---|
| 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | <!ENTITY % patches-entities SYSTEM "../../patches.ent">
|
---|
| 6 | %general-entities;
|
---|
| 7 | %patches-entities;
|
---|
| 8 | ]>
|
---|
| 9 |
|
---|
| 10 | <sect1 id="ch-system-binutils" role="wrap">
|
---|
| 11 | <?dbhtml filename="binutils.html"?>
|
---|
| 12 |
|
---|
| 13 | <title>Binutils-&binutils-version;</title>
|
---|
| 14 |
|
---|
| 15 | <indexterm zone="ch-system-binutils">
|
---|
| 16 | <primary sortas="a-Binutils">Binutils</primary>
|
---|
| 17 | </indexterm>
|
---|
| 18 |
|
---|
| 19 | <sect2 role="package">
|
---|
| 20 | <title/>
|
---|
| 21 |
|
---|
| 22 | <para>The Binutils package contains a linker, an assembler, and other
|
---|
| 23 | tools for handling object files.</para>
|
---|
| 24 |
|
---|
| 25 | <segmentedlist>
|
---|
| 26 | <segtitle>&buildtime;</segtitle>
|
---|
| 27 | <segtitle>&diskspace;</segtitle>
|
---|
| 28 |
|
---|
| 29 | <seglistitem>
|
---|
| 30 | <seg>Not checked yet</seg>
|
---|
| 31 | <seg>Not checked yet</seg>
|
---|
| 32 | </seglistitem>
|
---|
| 33 | </segmentedlist>
|
---|
| 34 |
|
---|
| 35 | <segmentedlist>
|
---|
| 36 | <segtitle>&dependencies;</segtitle>
|
---|
| 37 |
|
---|
| 38 | <seglistitem>
|
---|
| 39 | <seg>Bash, Coreutils, Diffutils, GCC, Gettext,
|
---|
| 40 | Glibc, Grep, Make, Perl, Sed, and Texinfo</seg>
|
---|
| 41 | </seglistitem>
|
---|
| 42 | </segmentedlist>
|
---|
| 43 |
|
---|
| 44 | </sect2>
|
---|
| 45 |
|
---|
| 46 | <sect2 role="installation">
|
---|
| 47 | <title>Installation of Binutils</title>
|
---|
| 48 |
|
---|
| 49 | <para os="b">Verify that the PTYs are working properly inside the build
|
---|
| 50 | environment. Check that everything is set up correctly by performing a
|
---|
| 51 | simple test:</para>
|
---|
| 52 |
|
---|
| 53 | <screen os="c"><userinput>expect -c "spawn ls"</userinput></screen>
|
---|
| 54 |
|
---|
| 55 | <para os="d">If the following message shows up, the environment is not
|
---|
| 56 | set up for proper PTY operation:</para>
|
---|
| 57 |
|
---|
| 58 | <screen os="e"><computeroutput>The system has no more ptys.
|
---|
| 59 | Ask your system administrator to create more.</computeroutput></screen>
|
---|
| 60 |
|
---|
| 61 | <para os="f">This issue needs to be resolved before running the test suites
|
---|
| 62 | for Binutils and GCC.</para>
|
---|
| 63 |
|
---|
| 64 | <para os="g">The Binutils documentation recommends building Binutils outside of the
|
---|
| 65 | source directory in a dedicated build directory:</para>
|
---|
| 66 |
|
---|
| 67 | <screen os="h"><userinput>mkdir ../binutils-build
|
---|
| 68 | cd ../binutils-build</userinput></screen>
|
---|
| 69 |
|
---|
| 70 | <para os="i">Prepare Binutils for compilation:</para>
|
---|
| 71 |
|
---|
| 72 | <screen><userinput>../binutils-&binutils-version;/configure --prefix=/usr \
|
---|
| 73 | --enable-shared</userinput></screen>
|
---|
| 74 |
|
---|
| 75 | <para os="j">Compile the package:</para>
|
---|
| 76 |
|
---|
| 77 | <screen os="k"><userinput>make configure-host</userinput></screen>
|
---|
| 78 |
|
---|
| 79 | <important os="l">
|
---|
| 80 | <para>During <command>make configure-host</command> you may receive the
|
---|
| 81 | following error message. It is safe to ignore.</para>
|
---|
| 82 |
|
---|
| 83 | <screen><computeroutput>WARNING: `flex' is missing on your system. You should only
|
---|
| 84 | need it if you modified a `.l' file. You may need the `Flex'
|
---|
| 85 | package in order for those modifications to take effect. You
|
---|
| 86 | can get `Flex' from any GNU archive site.</computeroutput></screen>
|
---|
| 87 | </important>
|
---|
| 88 |
|
---|
| 89 | <screen os="m"><userinput>make tooldir=/usr</userinput></screen>
|
---|
| 90 |
|
---|
| 91 | <para os="n">Normally, the tooldir (the directory where the executables
|
---|
| 92 | will ultimately be located) is set to <filename
|
---|
| 93 | class="directory">$(exec_prefix)/$(target_alias)</filename>. For
|
---|
| 94 | example, i686 machines would expand that to <filename
|
---|
| 95 | class="directory">/usr/i686-pc-linux-gnu</filename>. Because this
|
---|
| 96 | is a custom system, this target-specific directory in <filename
|
---|
| 97 | class="directory">/usr</filename> is not required. <filename
|
---|
| 98 | class="directory">$(exec_prefix)/$(target_alias)</filename> would
|
---|
| 99 | be used if the system was used to cross-compile (for example,
|
---|
| 100 | compiling a package on an Intel machine that generates code that
|
---|
| 101 | can be executed on PowerPC machines).</para>
|
---|
| 102 |
|
---|
| 103 | <important os="o">
|
---|
| 104 | <para>The test suite for Binutils in this section is considered critical.
|
---|
| 105 | Do not skip it under any circumstances.</para>
|
---|
| 106 | </important>
|
---|
| 107 |
|
---|
| 108 | <para os="p">Test the results:</para>
|
---|
| 109 |
|
---|
| 110 | <screen os="q"><userinput>make check</userinput></screen>
|
---|
| 111 |
|
---|
| 112 | <para os="r">Install the package:</para>
|
---|
| 113 |
|
---|
| 114 | <screen os="s"><userinput>make tooldir=/usr install</userinput></screen>
|
---|
| 115 |
|
---|
| 116 | <para os="t">Install the <filename class="headerfile">libiberty</filename> header
|
---|
| 117 | file that is needed by some packages:</para>
|
---|
| 118 |
|
---|
| 119 | <screen os="u"><userinput>cp ../binutils-&binutils-version;/include/libiberty.h /usr/include</userinput></screen>
|
---|
| 120 |
|
---|
| 121 | </sect2>
|
---|
| 122 |
|
---|
| 123 | <sect2 id="contents-binutils" role="content">
|
---|
| 124 | <title>Contents of Binutils</title>
|
---|
| 125 |
|
---|
| 126 | <segmentedlist>
|
---|
| 127 | <segtitle>Installed programs</segtitle>
|
---|
| 128 | <segtitle>Installed libraries</segtitle>
|
---|
| 129 |
|
---|
| 130 | <seglistitem>
|
---|
| 131 | <seg>addr2line, ar, as, c++filt, gprof, ld, nm, objcopy, objdump,
|
---|
| 132 | ranlib, readelf, size, strings, and strip</seg>
|
---|
| 133 | <seg>libiberty.a, libbfd.[a,so], and libopcodes.[a,so]</seg>
|
---|
| 134 | </seglistitem>
|
---|
| 135 | </segmentedlist>
|
---|
| 136 |
|
---|
| 137 | <variablelist>
|
---|
| 138 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 139 | <?dbfo list-presentation="list"?>
|
---|
| 140 | <?dbhtml list-presentation="table"?>
|
---|
| 141 |
|
---|
| 142 | <varlistentry id="addr2line">
|
---|
| 143 | <term><command>addr2line</command></term>
|
---|
| 144 | <listitem>
|
---|
| 145 | <para>Translates program addresses to file names and line numbers;
|
---|
| 146 | given an address and the name of an executable, it uses the debugging
|
---|
| 147 | information in the executable to determine which source file and line
|
---|
| 148 | number are associated with the address</para>
|
---|
| 149 | <indexterm zone="ch-system-binutils addr2line">
|
---|
| 150 | <primary sortas="b-addr2line">addr2line</primary>
|
---|
| 151 | </indexterm>
|
---|
| 152 | </listitem>
|
---|
| 153 | </varlistentry>
|
---|
| 154 |
|
---|
| 155 | <varlistentry id="ar">
|
---|
| 156 | <term><command>ar</command></term>
|
---|
| 157 | <listitem>
|
---|
| 158 | <para>Creates, modifies, and extracts from archives</para>
|
---|
| 159 | <indexterm zone="ch-system-binutils ar">
|
---|
| 160 | <primary sortas="b-ar">ar</primary>
|
---|
| 161 | </indexterm>
|
---|
| 162 | </listitem>
|
---|
| 163 | </varlistentry>
|
---|
| 164 |
|
---|
| 165 | <varlistentry id="as">
|
---|
| 166 | <term><command>as</command></term>
|
---|
| 167 | <listitem>
|
---|
| 168 | <para>An assembler that assembles the output of <command>gcc</command>
|
---|
| 169 | into object files</para>
|
---|
| 170 | <indexterm zone="ch-system-binutils as">
|
---|
| 171 | <primary sortas="b-as">as</primary>
|
---|
| 172 | </indexterm>
|
---|
| 173 | </listitem>
|
---|
| 174 | </varlistentry>
|
---|
| 175 |
|
---|
| 176 | <varlistentry id="c-filt">
|
---|
| 177 | <term><command>c++filt</command></term>
|
---|
| 178 | <listitem>
|
---|
| 179 | <para>Used by the linker to de-mangle C++ and Java symbols and to keep
|
---|
| 180 | overloaded functions from clashing</para>
|
---|
| 181 | <indexterm zone="ch-system-binutils c-filt">
|
---|
| 182 | <primary sortas="b-c++filt">c++filt</primary>
|
---|
| 183 | </indexterm>
|
---|
| 184 | </listitem>
|
---|
| 185 | </varlistentry>
|
---|
| 186 |
|
---|
| 187 | <varlistentry id="gprof">
|
---|
| 188 | <term><command>gprof</command></term>
|
---|
| 189 | <listitem>
|
---|
| 190 | <para>Displays call graph profile data</para>
|
---|
| 191 | <indexterm zone="ch-system-binutils gprof">
|
---|
| 192 | <primary sortas="b-gprof">gprof</primary>
|
---|
| 193 | </indexterm>
|
---|
| 194 | </listitem>
|
---|
| 195 | </varlistentry>
|
---|
| 196 |
|
---|
| 197 | <varlistentry id="ld">
|
---|
| 198 | <term><command>ld</command></term>
|
---|
| 199 | <listitem>
|
---|
| 200 | <para>A linker that combines a number of object and archive files
|
---|
| 201 | into a single file, relocating their data and tying up symbol
|
---|
| 202 | references</para>
|
---|
| 203 | <indexterm zone="ch-system-binutils ld">
|
---|
| 204 | <primary sortas="b-ld">ld</primary>
|
---|
| 205 | </indexterm>
|
---|
| 206 | </listitem>
|
---|
| 207 | </varlistentry>
|
---|
| 208 |
|
---|
| 209 | <varlistentry id="nm">
|
---|
| 210 | <term><command>nm</command></term>
|
---|
| 211 | <listitem>
|
---|
| 212 | <para>Lists the symbols occurring in a given object file</para>
|
---|
| 213 | <indexterm zone="ch-system-binutils nm">
|
---|
| 214 | <primary sortas="b-nm">nm</primary>
|
---|
| 215 | </indexterm>
|
---|
| 216 | </listitem>
|
---|
| 217 | </varlistentry>
|
---|
| 218 |
|
---|
| 219 | <varlistentry id="objcopy">
|
---|
| 220 | <term><command>objcopy</command></term>
|
---|
| 221 | <listitem>
|
---|
| 222 | <para>Translates one type of object file into another</para>
|
---|
| 223 | <indexterm zone="ch-system-binutils objcopy">
|
---|
| 224 | <primary sortas="b-objcopy">objcopy</primary>
|
---|
| 225 | </indexterm>
|
---|
| 226 | </listitem>
|
---|
| 227 | </varlistentry>
|
---|
| 228 |
|
---|
| 229 | <varlistentry id="objdump">
|
---|
| 230 | <term><command>objdump</command></term>
|
---|
| 231 | <listitem>
|
---|
| 232 | <para>Displays information about the given object file, with options
|
---|
| 233 | controlling the particular information to display; the information
|
---|
| 234 | shown is useful to programmers who are working on the compilation
|
---|
| 235 | tools</para>
|
---|
| 236 | <indexterm zone="ch-system-binutils objdump">
|
---|
| 237 | <primary sortas="b-objdump">objdump</primary>
|
---|
| 238 | </indexterm>
|
---|
| 239 | </listitem>
|
---|
| 240 | </varlistentry>
|
---|
| 241 |
|
---|
| 242 | <varlistentry id="ranlib">
|
---|
| 243 | <term><command>ranlib</command></term>
|
---|
| 244 | <listitem>
|
---|
| 245 | <para>Generates an index of the contents of an archive and stores it
|
---|
| 246 | in the archive; the index lists all of the symbols defined by archive
|
---|
| 247 | members that are relocatable object files</para>
|
---|
| 248 | <indexterm zone="ch-system-binutils ranlib">
|
---|
| 249 | <primary sortas="b-ranlib">ranlib</primary>
|
---|
| 250 | </indexterm>
|
---|
| 251 | </listitem>
|
---|
| 252 | </varlistentry>
|
---|
| 253 |
|
---|
| 254 | <varlistentry id="readelf">
|
---|
| 255 | <term><command>readelf</command></term>
|
---|
| 256 | <listitem>
|
---|
| 257 | <para>Displays information about ELF type binaries</para>
|
---|
| 258 | <indexterm zone="ch-system-binutils readelf">
|
---|
| 259 | <primary sortas="b-readelf">readelf</primary>
|
---|
| 260 | </indexterm>
|
---|
| 261 | </listitem>
|
---|
| 262 | </varlistentry>
|
---|
| 263 |
|
---|
| 264 | <varlistentry id="size">
|
---|
| 265 | <term><command>size</command></term>
|
---|
| 266 | <listitem>
|
---|
| 267 | <para>Lists the section sizes and the total size for the given
|
---|
| 268 | object files</para>
|
---|
| 269 | <indexterm zone="ch-system-binutils size">
|
---|
| 270 | <primary sortas="b-size">size</primary>
|
---|
| 271 | </indexterm>
|
---|
| 272 | </listitem>
|
---|
| 273 | </varlistentry>
|
---|
| 274 |
|
---|
| 275 | <varlistentry id="strings">
|
---|
| 276 | <term><command>strings</command></term>
|
---|
| 277 | <listitem>
|
---|
| 278 | <para>Outputs, for each given file, the sequences of printable
|
---|
| 279 | characters that are of at least the specified length (defaulting to
|
---|
| 280 | four); for object files, it prints, by default, only the strings from
|
---|
| 281 | the initializing and loading sections while for other types of files,
|
---|
| 282 | it scans the entire file</para>
|
---|
| 283 | <indexterm zone="ch-system-binutils strings">
|
---|
| 284 | <primary sortas="b-strings">strings</primary>
|
---|
| 285 | </indexterm>
|
---|
| 286 | </listitem>
|
---|
| 287 | </varlistentry>
|
---|
| 288 |
|
---|
| 289 | <varlistentry id="strip">
|
---|
| 290 | <term><command>strip</command></term>
|
---|
| 291 | <listitem>
|
---|
| 292 | <para>Discards symbols from object files</para>
|
---|
| 293 | <indexterm zone="ch-system-binutils strip">
|
---|
| 294 | <primary sortas="b-strip">strip</primary>
|
---|
| 295 | </indexterm>
|
---|
| 296 | </listitem>
|
---|
| 297 | </varlistentry>
|
---|
| 298 |
|
---|
| 299 | <varlistentry id="libiberty">
|
---|
| 300 | <term><filename class="libraryfile">libiberty</filename></term>
|
---|
| 301 | <listitem>
|
---|
| 302 | <para>Contains routines used by various GNU programs, including
|
---|
| 303 | <command>getopt</command>, <command>obstack</command>,
|
---|
| 304 | <command>strerror</command>, <command>strtol</command>, and
|
---|
| 305 | <command>strtoul</command></para>
|
---|
| 306 | <indexterm zone="ch-system-binutils libiberty">
|
---|
| 307 | <primary sortas="c-libiberty">libiberty</primary>
|
---|
| 308 | </indexterm>
|
---|
| 309 | </listitem>
|
---|
| 310 | </varlistentry>
|
---|
| 311 |
|
---|
| 312 | <varlistentry id="libbfd">
|
---|
| 313 | <term><filename class="libraryfile">libbfd</filename></term>
|
---|
| 314 | <listitem>
|
---|
| 315 | <para>The Binary File Descriptor library</para>
|
---|
| 316 | <indexterm zone="ch-system-binutils libbfd">
|
---|
| 317 | <primary sortas="c-libbfd">libbfd</primary>
|
---|
| 318 | </indexterm>
|
---|
| 319 | </listitem>
|
---|
| 320 | </varlistentry>
|
---|
| 321 |
|
---|
| 322 | <varlistentry id="libopcodes">
|
---|
| 323 | <term><filename class="libraryfile">libopcodes</filename></term>
|
---|
| 324 | <listitem>
|
---|
| 325 | <para>A library for dealing with opcodes—the <quote>readable
|
---|
| 326 | text</quote> versions of instructions for the processor;
|
---|
| 327 | it is used for building utilities like
|
---|
| 328 | <command>objdump</command>.</para>
|
---|
| 329 | <indexterm zone="ch-system-binutils libopcodes">
|
---|
| 330 | <primary sortas="c-libopcodes">libopcodes</primary>
|
---|
| 331 | </indexterm>
|
---|
| 332 | </listitem>
|
---|
| 333 | </varlistentry>
|
---|
| 334 |
|
---|
| 335 | </variablelist>
|
---|
| 336 |
|
---|
| 337 | </sect2>
|
---|
| 338 |
|
---|
| 339 | </sect1>
|
---|