binutils.xml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338
  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>Binutils does not recognize versions of Texinfo newer than 4.9. Fix
  44. this issue by applying the following patch:</para>
  45. <screen><userinput remap="pre">patch -Np1 -i ../&binutils-configure-patch;</userinput></screen>
  46. <para>The Binutils documentation recommends building Binutils outside of the
  47. source directory in a dedicated build directory:</para>
  48. <screen><userinput remap="pre">mkdir -v ../binutils-build
  49. cd ../binutils-build</userinput></screen>
  50. <para>Prepare Binutils for compilation:</para>
  51. <screen><userinput remap="configure">../binutils-&binutils-version;/configure --prefix=/usr \
  52. --enable-shared</userinput></screen>
  53. <para>Compile the package:</para>
  54. <screen><userinput remap="make">make tooldir=/usr</userinput></screen>
  55. <variablelist>
  56. <title>The meaning of the make parameter:</title>
  57. <varlistentry>
  58. <term><parameter>tooldir=/usr</parameter></term>
  59. <listitem>
  60. <para>Normally, the tooldir (the directory where the executables will
  61. ultimately be located) is set to <filename
  62. class="directory">$(exec_prefix)/$(target_alias)</filename>. For
  63. example, i686 machines would expand that to <filename
  64. class="directory">/usr/i686-pc-linux-gnu</filename>. Because this is
  65. a custom system, this target-specific directory in <filename
  66. class="directory">/usr</filename> is not required. <filename
  67. class="directory">$(exec_prefix)/$(target_alias)</filename> would be
  68. used if the system was used to cross-compile (for example, compiling a
  69. package on an Intel machine that generates code that can be executed
  70. on PowerPC machines).</para>
  71. </listitem>
  72. </varlistentry>
  73. </variablelist>
  74. <important>
  75. <para>The test suite for Binutils in this section is considered critical.
  76. Do not skip it under any circumstances.</para>
  77. </important>
  78. <para>Test the results:</para>
  79. <screen><userinput remap="test">make check</userinput></screen>
  80. <para>Install the package:</para>
  81. <screen><userinput remap="install">make tooldir=/usr install</userinput></screen>
  82. <para>Install the <filename class="headerfile">libiberty</filename> header
  83. file that is needed by some packages:</para>
  84. <screen><userinput remap="install">cp -v ../binutils-&binutils-version;/include/libiberty.h /usr/include</userinput></screen>
  85. </sect2>
  86. <sect2 id="contents-binutils" role="content">
  87. <title>Contents of Binutils</title>
  88. <segmentedlist>
  89. <segtitle>Installed programs</segtitle>
  90. <segtitle>Installed libraries</segtitle>
  91. <seglistitem>
  92. <seg>addr2line, ar, as, c++filt, gprof, ld, nm, objcopy, objdump,
  93. ranlib, readelf, size, strings, and strip</seg>
  94. <seg>libiberty.a, libbfd.{a,so}, and libopcodes.{a,so}</seg>
  95. </seglistitem>
  96. </segmentedlist>
  97. <variablelist>
  98. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  99. <?dbfo list-presentation="list"?>
  100. <?dbhtml list-presentation="table"?>
  101. <varlistentry id="addr2line">
  102. <term><command>addr2line</command></term>
  103. <listitem>
  104. <para>Translates program addresses to file names and line numbers;
  105. given an address and the name of an executable, it uses the debugging
  106. information in the executable to determine which source file and line
  107. number are associated with the address</para>
  108. <indexterm zone="ch-system-binutils addr2line">
  109. <primary sortas="b-addr2line">addr2line</primary>
  110. </indexterm>
  111. </listitem>
  112. </varlistentry>
  113. <varlistentry id="ar">
  114. <term><command>ar</command></term>
  115. <listitem>
  116. <para>Creates, modifies, and extracts from archives</para>
  117. <indexterm zone="ch-system-binutils ar">
  118. <primary sortas="b-ar">ar</primary>
  119. </indexterm>
  120. </listitem>
  121. </varlistentry>
  122. <varlistentry id="as">
  123. <term><command>as</command></term>
  124. <listitem>
  125. <para>An assembler that assembles the output of <command>gcc</command>
  126. into object files</para>
  127. <indexterm zone="ch-system-binutils as">
  128. <primary sortas="b-as">as</primary>
  129. </indexterm>
  130. </listitem>
  131. </varlistentry>
  132. <varlistentry id="c-filt">
  133. <term><command>c++filt</command></term>
  134. <listitem>
  135. <para>Used by the linker to de-mangle C++ and Java symbols and to keep
  136. overloaded functions from clashing</para>
  137. <indexterm zone="ch-system-binutils c-filt">
  138. <primary sortas="b-c++filt">c++filt</primary>
  139. </indexterm>
  140. </listitem>
  141. </varlistentry>
  142. <varlistentry id="gprof">
  143. <term><command>gprof</command></term>
  144. <listitem>
  145. <para>Displays call graph profile data</para>
  146. <indexterm zone="ch-system-binutils gprof">
  147. <primary sortas="b-gprof">gprof</primary>
  148. </indexterm>
  149. </listitem>
  150. </varlistentry>
  151. <varlistentry id="ld">
  152. <term><command>ld</command></term>
  153. <listitem>
  154. <para>A linker that combines a number of object and archive files
  155. into a single file, relocating their data and tying up symbol
  156. references</para>
  157. <indexterm zone="ch-system-binutils ld">
  158. <primary sortas="b-ld">ld</primary>
  159. </indexterm>
  160. </listitem>
  161. </varlistentry>
  162. <varlistentry id="nm">
  163. <term><command>nm</command></term>
  164. <listitem>
  165. <para>Lists the symbols occurring in a given object file</para>
  166. <indexterm zone="ch-system-binutils nm">
  167. <primary sortas="b-nm">nm</primary>
  168. </indexterm>
  169. </listitem>
  170. </varlistentry>
  171. <varlistentry id="objcopy">
  172. <term><command>objcopy</command></term>
  173. <listitem>
  174. <para>Translates one type of object file into another</para>
  175. <indexterm zone="ch-system-binutils objcopy">
  176. <primary sortas="b-objcopy">objcopy</primary>
  177. </indexterm>
  178. </listitem>
  179. </varlistentry>
  180. <varlistentry id="objdump">
  181. <term><command>objdump</command></term>
  182. <listitem>
  183. <para>Displays information about the given object file, with options
  184. controlling the particular information to display; the information
  185. shown is useful to programmers who are working on the compilation
  186. tools</para>
  187. <indexterm zone="ch-system-binutils objdump">
  188. <primary sortas="b-objdump">objdump</primary>
  189. </indexterm>
  190. </listitem>
  191. </varlistentry>
  192. <varlistentry id="ranlib">
  193. <term><command>ranlib</command></term>
  194. <listitem>
  195. <para>Generates an index of the contents of an archive and stores it
  196. in the archive; the index lists all of the symbols defined by archive
  197. members that are relocatable object files</para>
  198. <indexterm zone="ch-system-binutils ranlib">
  199. <primary sortas="b-ranlib">ranlib</primary>
  200. </indexterm>
  201. </listitem>
  202. </varlistentry>
  203. <varlistentry id="readelf">
  204. <term><command>readelf</command></term>
  205. <listitem>
  206. <para>Displays information about ELF type binaries</para>
  207. <indexterm zone="ch-system-binutils readelf">
  208. <primary sortas="b-readelf">readelf</primary>
  209. </indexterm>
  210. </listitem>
  211. </varlistentry>
  212. <varlistentry id="size">
  213. <term><command>size</command></term>
  214. <listitem>
  215. <para>Lists the section sizes and the total size for the given
  216. object files</para>
  217. <indexterm zone="ch-system-binutils size">
  218. <primary sortas="b-size">size</primary>
  219. </indexterm>
  220. </listitem>
  221. </varlistentry>
  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">
  231. <primary sortas="b-strings">strings</primary>
  232. </indexterm>
  233. </listitem>
  234. </varlistentry>
  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">
  240. <primary sortas="b-strip">strip</primary>
  241. </indexterm>
  242. </listitem>
  243. </varlistentry>
  244. <varlistentry id="libiberty">
  245. <term><filename class="libraryfile">libiberty</filename></term>
  246. <listitem>
  247. <para>Contains routines used by various GNU programs, including
  248. <command>getopt</command>, <command>obstack</command>,
  249. <command>strerror</command>, <command>strtol</command>, and
  250. <command>strtoul</command></para>
  251. <indexterm zone="ch-system-binutils libiberty">
  252. <primary sortas="c-libiberty">libiberty</primary>
  253. </indexterm>
  254. </listitem>
  255. </varlistentry>
  256. <varlistentry id="libbfd">
  257. <term><filename class="libraryfile">libbfd</filename></term>
  258. <listitem>
  259. <para>The Binary File Descriptor library</para>
  260. <indexterm zone="ch-system-binutils libbfd">
  261. <primary sortas="c-libbfd">libbfd</primary>
  262. </indexterm>
  263. </listitem>
  264. </varlistentry>
  265. <varlistentry id="libopcodes">
  266. <term><filename class="libraryfile">libopcodes</filename></term>
  267. <listitem>
  268. <para>A library for dealing with opcodes&mdash;the <quote>readable
  269. text</quote> versions of instructions for the processor;
  270. it is used for building utilities like
  271. <command>objdump</command>.</para>
  272. <indexterm zone="ch-system-binutils libopcodes">
  273. <primary sortas="c-libopcodes">libopcodes</primary>
  274. </indexterm>
  275. </listitem>
  276. </varlistentry>
  277. </variablelist>
  278. </sect2>
  279. </sect1>