binutils.xml 12 KB

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