binutils.xml 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  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" [
  3. <!ENTITY % general-entities SYSTEM "../general.ent">
  4. %general-entities;
  5. ]>
  6. <sect1 id="ch-system-binutils" role="wrap">
  7. <title>Binutils-&binutils-version;</title>
  8. <?dbhtml filename="binutils.html"?>
  9. <indexterm zone="ch-system-binutils"><primary sortas="a-Binutils">Binutils</primary></indexterm>
  10. <sect2 role="package"><title/>
  11. <para>The Binutils package contains a linker, an assembler, and other tools for
  12. handling object files.</para>
  13. <segmentedlist>
  14. <segtitle>&buildtime;</segtitle>
  15. <segtitle>&diskspace;</segtitle>
  16. <seglistitem><seg>1.3 SBU</seg><seg>158 MB</seg></seglistitem>
  17. </segmentedlist>
  18. <segmentedlist>
  19. <segtitle>&dependencies;</segtitle>
  20. <seglistitem><seg>Bash, Coreutils, Diffutils, GCC, Gettext,
  21. Glibc, Grep, M4, Make, Perl, Sed, and Texinfo</seg></seglistitem>
  22. </segmentedlist>
  23. </sect2>
  24. <sect2 role="installation">
  25. <title>Installation of Binutils</title>
  26. <para>Verify that the PTYs are working properly inside the chroot
  27. environment. Check that everything is set up correctly by performing a
  28. simple test:</para>
  29. <screen><userinput>expect -c "spawn ls"</userinput></screen>
  30. <para>If the following message shows up, the chroot environment is not
  31. set up for proper PTY operation:</para>
  32. <screen><computeroutput>The system has no more ptys.
  33. Ask your system administrator to create more.</computeroutput></screen>
  34. <para>This issue needs to be resolved before running the test suites
  35. for Binutils and GCC.</para>
  36. <para>The Binutils documentation recommends building Binutils outside of the
  37. source directory in a dedicated build directory:</para>
  38. <screen><userinput>mkdir -v ../binutils-build
  39. cd ../binutils-build</userinput></screen>
  40. <para>Prepare Binutils for compilation:</para>
  41. <screen><userinput>../binutils-&binutils-version;/configure --prefix=/usr \
  42. --enable-shared</userinput></screen>
  43. <para>Compile the package:</para>
  44. <screen><userinput>make tooldir=/usr</userinput></screen>
  45. <para>Normally, the tooldir (the directory where the executables will ultimately
  46. be located) is set to <filename
  47. class="directory">$(exec_prefix)/$(target_alias)</filename>. For example, i686
  48. machines would expand that to <filename
  49. class="directory">/usr/i686-pc-linux-gnu</filename>. Because this is a custom
  50. system, this target-specific directory in <filename
  51. class="directory">/usr</filename> is not required. <filename
  52. class="directory">$(exec_prefix)/$(target_alias)</filename> would be used if the
  53. system was used to cross-compile (for example, compiling a package on an Intel
  54. machine that generates code that can be executed on PowerPC machines).</para>
  55. <important><para>The test suite for Binutils in this section is
  56. considered critical. Do not skip it under any
  57. circumstances.</para></important>
  58. <para>Test the results:</para>
  59. <screen><userinput>make check</userinput></screen>
  60. <para>Install the package:</para>
  61. <screen><userinput>make tooldir=/usr install</userinput></screen>
  62. <para>Install the <filename class="headerfile">libiberty</filename> header file that is needed by
  63. some packages:</para>
  64. <screen><userinput>cp -v ../binutils-&binutils-version;/include/libiberty.h /usr/include</userinput></screen>
  65. </sect2>
  66. <sect2 id="contents-binutils" role="content"><title>Contents of Binutils</title>
  67. <segmentedlist>
  68. <segtitle>Installed programs</segtitle>
  69. <segtitle>Installed libraries</segtitle>
  70. <seglistitem><seg>addr2line, ar, as, c++filt, gprof, ld, nm, objcopy, objdump,
  71. ranlib, readelf, size, strings, and strip</seg>
  72. <seg>libiberty.a, libbfd.[a,so], and libopcodes.[a,so]</seg></seglistitem>
  73. </segmentedlist>
  74. <variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
  75. <?dbfo list-presentation="list"?>
  76. <?dbhtml list-presentation="table"?>
  77. <varlistentry id="addr2line">
  78. <term><command>addr2line</command></term>
  79. <listitem>
  80. <para>Translates program addresses to file names and line numbers;
  81. given an address and the name of an executable, it uses the debugging
  82. information in the executable to determine which source file and line
  83. number are associated with the address</para>
  84. <indexterm zone="ch-system-binutils addr2line"><primary sortas="b-addr2line">addr2line</primary></indexterm>
  85. </listitem>
  86. </varlistentry>
  87. <varlistentry id="ar">
  88. <term><command>ar</command></term>
  89. <listitem>
  90. <para>Creates, modifies, and extracts from archives</para>
  91. <indexterm zone="ch-system-binutils ar"><primary sortas="b-ar">ar</primary></indexterm>
  92. </listitem>
  93. </varlistentry>
  94. <varlistentry id="as">
  95. <term><command>as</command></term>
  96. <listitem>
  97. <para>An assembler that assembles the output of <command>gcc</command>
  98. into object files</para>
  99. <indexterm zone="ch-system-binutils as"><primary sortas="b-as">as</primary></indexterm>
  100. </listitem>
  101. </varlistentry>
  102. <varlistentry id="c-filt">
  103. <term><command>c++filt</command></term>
  104. <listitem>
  105. <para>Used by the linker to de-mangle C++ and Java symbols and to keep
  106. overloaded functions from clashing</para>
  107. <indexterm zone="ch-system-binutils c-filt"><primary sortas="b-c++filt">c++filt</primary></indexterm>
  108. </listitem>
  109. </varlistentry>
  110. <varlistentry id="gprof">
  111. <term><command>gprof</command></term>
  112. <listitem>
  113. <para>Displays call graph profile data</para>
  114. <indexterm zone="ch-system-binutils gprof"><primary sortas="b-gprof">gprof</primary></indexterm>
  115. </listitem>
  116. </varlistentry>
  117. <varlistentry id="ld">
  118. <term><command>ld</command></term>
  119. <listitem>
  120. <para>A linker that combines a number of object and archive files into a single file,
  121. relocating their data and tying up symbol references</para>
  122. <indexterm zone="ch-system-binutils ld"><primary sortas="b-ld">ld</primary></indexterm>
  123. </listitem>
  124. </varlistentry>
  125. <varlistentry id="nm">
  126. <term><command>nm</command></term>
  127. <listitem>
  128. <para>Lists the symbols occurring in a given object file</para>
  129. <indexterm zone="ch-system-binutils nm"><primary sortas="b-nm">nm</primary></indexterm>
  130. </listitem>
  131. </varlistentry>
  132. <varlistentry id="objcopy">
  133. <term><command>objcopy</command></term>
  134. <listitem>
  135. <para>Translates one type of object file into another</para>
  136. <indexterm zone="ch-system-binutils objcopy"><primary sortas="b-objcopy">objcopy</primary></indexterm>
  137. </listitem>
  138. </varlistentry>
  139. <varlistentry id="objdump">
  140. <term><command>objdump</command></term>
  141. <listitem>
  142. <para>Displays information about the given object file, with options
  143. controlling the particular information to display; the information
  144. shown is useful to programmers who are working on the compilation
  145. tools</para>
  146. <indexterm zone="ch-system-binutils objdump"><primary sortas="b-objdump">objdump</primary></indexterm>
  147. </listitem>
  148. </varlistentry>
  149. <varlistentry id="ranlib">
  150. <term><command>ranlib</command></term>
  151. <listitem>
  152. <para>Generates an index of the contents of an archive and stores it
  153. in the archive; the index lists all of the symbols defined by archive
  154. members that are relocatable object files</para>
  155. <indexterm zone="ch-system-binutils ranlib"><primary sortas="b-ranlib">ranlib</primary></indexterm>
  156. </listitem>
  157. </varlistentry>
  158. <varlistentry id="readelf">
  159. <term><command>readelf</command></term>
  160. <listitem>
  161. <para>Displays information about ELF type binaries</para>
  162. <indexterm zone="ch-system-binutils readelf"><primary sortas="b-readelf">readelf</primary></indexterm>
  163. </listitem>
  164. </varlistentry>
  165. <varlistentry id="size">
  166. <term><command>size</command></term>
  167. <listitem>
  168. <para>Lists the section sizes and the total size for the given object files</para>
  169. <indexterm zone="ch-system-binutils size"><primary sortas="b-size">size</primary></indexterm>
  170. </listitem>
  171. </varlistentry>
  172. <varlistentry id="strings">
  173. <term><command>strings</command></term>
  174. <listitem>
  175. <para>Outputs, for each given file, the sequences of printable
  176. characters that are of at least the specified length (defaulting to
  177. four); for object files, it prints, by default, only the strings from
  178. the initializing and loading sections while for other types of files, it
  179. scans the entire file</para>
  180. <indexterm zone="ch-system-binutils strings"><primary sortas="b-strings">strings</primary></indexterm>
  181. </listitem>
  182. </varlistentry>
  183. <varlistentry id="strip">
  184. <term><command>strip</command></term>
  185. <listitem>
  186. <para>Discards symbols from object files</para>
  187. <indexterm zone="ch-system-binutils strip"><primary sortas="b-strip">strip</primary></indexterm>
  188. </listitem>
  189. </varlistentry>
  190. <varlistentry id="libiberty">
  191. <term><filename class="libraryfile">libiberty</filename></term>
  192. <listitem>
  193. <para>Contains routines used by various GNU programs, including
  194. <command>getopt</command>, <command>obstack</command>,
  195. <command>strerror</command>, <command>strtol</command>, and
  196. <command>strtoul</command></para>
  197. <indexterm zone="ch-system-binutils libiberty"><primary sortas="c-libiberty">libiberty</primary></indexterm>
  198. </listitem>
  199. </varlistentry>
  200. <varlistentry id="libbfd">
  201. <term><filename class="libraryfile">libbfd</filename></term>
  202. <listitem>
  203. <para>The Binary File Descriptor library</para>
  204. <indexterm zone="ch-system-binutils libbfd"><primary sortas="c-libbfd">libbfd</primary></indexterm>
  205. </listitem>
  206. </varlistentry>
  207. <varlistentry id="libopcodes">
  208. <term><filename class="libraryfile">libopcodes</filename></term>
  209. <listitem>
  210. <para>A library for dealing with opcodes&mdash;the <quote>readable
  211. text</quote> versions of instructions for the processor;
  212. it is used for building utilities like
  213. <command>objdump</command>.</para>
  214. <indexterm zone="ch-system-binutils libopcodes"><primary sortas="c-libopcodes">libopcodes</primary></indexterm>
  215. </listitem>
  216. </varlistentry>
  217. </variablelist>
  218. </sect2>
  219. </sect1>