source: clfs-sysroot/BOOK/final-system/common/binutils.xml@ 591ec78

Last change on this file since 591ec78 was 4aa6b68, checked in by Joe Ciccone <jciccone@…>, 17 years ago

Update binutils instructions.

  • Property mode set to 100644
File size: 10.6 KB
Line 
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
8<sect1 id="ch-system-binutils" role="wrap">
9 <?dbhtml filename="binutils.html"?>
10
11 <title>Binutils-&binutils-version;</title>
12
13 <indexterm zone="ch-system-binutils">
14 <primary sortas="a-Binutils">Binutils</primary>
15 </indexterm>
16
17 <sect2 role="package">
18 <title/>
19
20 <para>The Binutils package contains a linker, an assembler, and other
21 tools for handling object files.</para>
22
23 </sect2>
24
25 <sect2 role="installation">
26 <title>Installation of Binutils</title>
27
28 <para os="p1">To make sure that the proper syntax is used for a couple of
29 tools, apply the following patch:</para>
30
31<screen os="p2"><userinput>patch -Np1 -i ../&binutils-posix-patch;</userinput></screen>
32
33 <para os="a">The Binutils documentation recommends building Binutils outside of the
34 source directory in a dedicated build directory:</para>
35
36<screen os="b"><userinput>mkdir -v ../binutils-build
37cd ../binutils-build</userinput></screen>
38
39 <para os="c">Prepare Binutils for compilation:</para>
40
41<screen os="d"><userinput>AR=ar AS=as ../binutils-&binutils-version;/configure --prefix=/usr \
42 --build=${CLFS_HOST} --host=${CLFS_TARGET} \
43 --target=${CLFS_TARGET} --enable-shared</userinput></screen>
44
45 <para os="e">Compile the package:</para>
46
47<screen os="f"><userinput>make configure-host</userinput></screen>
48
49 <important os="g">
50 <para>During <command>make configure-host</command> you may receive the
51 following error message. It is safe to ignore.</para>
52
53<screen><computeroutput>WARNING: `flex' is missing on your system. You should only
54need it if you modified a `.l' file. You may need the `Flex'
55package in order for those modifications to take effect. You
56can get `Flex' from any GNU archive site.</computeroutput></screen>
57 </important>
58
59<screen os="h"><userinput>make tooldir=/usr</userinput></screen>
60
61 <variablelist os="i">
62 <title>The meaning of the make parameter:</title>
63
64 <varlistentry>
65 <term><parameter>tooldir=/usr</parameter></term>
66 <listitem>
67 <para>Normally, the tooldir (the directory where the executables
68 will ultimately be located) is set to <filename
69 class="directory">$(exec_prefix)/$(target_alias)</filename>. Because this
70 is a custom system, this target-specific directory in <filename
71 class="directory">/usr</filename> is not required.</para>
72 </listitem>
73 </varlistentry>
74 </variablelist>
75
76 <para os="j">Install the package:</para>
77
78<screen os="k"><userinput>make DESTDIR=${CLFS} tooldir=/usr install</userinput></screen>
79
80 </sect2>
81
82 <sect2 id="contents-binutils" role="content">
83 <title>Contents of Binutils</title>
84
85 <segmentedlist>
86 <segtitle>Installed programs</segtitle>
87 <segtitle>Installed libraries</segtitle>
88
89 <seglistitem>
90 <seg>addr2line, ar, as, c++filt, gprof, ld, nm, objcopy, objdump,
91 ranlib, readelf, size, strings, and strip</seg>
92 <seg>libiberty.a, libbfd.[a,so], and libopcodes.[a,so]</seg>
93 </seglistitem>
94 </segmentedlist>
95
96 <variablelist>
97 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
98 <?dbfo list-presentation="list"?>
99 <?dbhtml list-presentation="table"?>
100
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
114 <varlistentry id="ar">
115 <term><command>ar</command></term>
116 <listitem>
117 <para>Creates, modifies, and extracts from archives</para>
118 <indexterm zone="ch-system-binutils ar">
119 <primary sortas="b-ar">ar</primary>
120 </indexterm>
121 </listitem>
122 </varlistentry>
123
124 <varlistentry id="as">
125 <term><command>as</command></term>
126 <listitem>
127 <para>An assembler that assembles the output of <command>gcc</command>
128 into object files</para>
129 <indexterm zone="ch-system-binutils as">
130 <primary sortas="b-as">as</primary>
131 </indexterm>
132 </listitem>
133 </varlistentry>
134
135 <varlistentry id="c-filt">
136 <term><command>c++filt</command></term>
137 <listitem>
138 <para>Used by the linker to de-mangle C++ and Java symbols and to keep
139 overloaded functions from clashing</para>
140 <indexterm zone="ch-system-binutils c-filt">
141 <primary sortas="b-c++filt">c++filt</primary>
142 </indexterm>
143 </listitem>
144 </varlistentry>
145
146 <varlistentry id="gprof">
147 <term><command>gprof</command></term>
148 <listitem>
149 <para>Displays call graph profile data</para>
150 <indexterm zone="ch-system-binutils gprof">
151 <primary sortas="b-gprof">gprof</primary>
152 </indexterm>
153 </listitem>
154 </varlistentry>
155
156 <varlistentry id="ld">
157 <term><command>ld</command></term>
158 <listitem>
159 <para>A linker that combines a number of object and archive files
160 into a single file, relocating their data and tying up symbol
161 references</para>
162 <indexterm zone="ch-system-binutils ld">
163 <primary sortas="b-ld">ld</primary>
164 </indexterm>
165 </listitem>
166 </varlistentry>
167
168 <varlistentry id="nm">
169 <term><command>nm</command></term>
170 <listitem>
171 <para>Lists the symbols occurring in a given object file</para>
172 <indexterm zone="ch-system-binutils nm">
173 <primary sortas="b-nm">nm</primary>
174 </indexterm>
175 </listitem>
176 </varlistentry>
177
178 <varlistentry id="objcopy">
179 <term><command>objcopy</command></term>
180 <listitem>
181 <para>Translates one type of object file into another</para>
182 <indexterm zone="ch-system-binutils objcopy">
183 <primary sortas="b-objcopy">objcopy</primary>
184 </indexterm>
185 </listitem>
186 </varlistentry>
187
188 <varlistentry id="objdump">
189 <term><command>objdump</command></term>
190 <listitem>
191 <para>Displays information about the given object file, with options
192 controlling the particular information to display; the information
193 shown is useful to programmers who are working on the compilation
194 tools</para>
195 <indexterm zone="ch-system-binutils objdump">
196 <primary sortas="b-objdump">objdump</primary>
197 </indexterm>
198 </listitem>
199 </varlistentry>
200
201 <varlistentry id="ranlib">
202 <term><command>ranlib</command></term>
203 <listitem>
204 <para>Generates an index of the contents of an archive and stores it
205 in the archive; the index lists all of the symbols defined by archive
206 members that are relocatable object files</para>
207 <indexterm zone="ch-system-binutils ranlib">
208 <primary sortas="b-ranlib">ranlib</primary>
209 </indexterm>
210 </listitem>
211 </varlistentry>
212
213 <varlistentry id="readelf">
214 <term><command>readelf</command></term>
215 <listitem>
216 <para>Displays information about ELF type binaries</para>
217 <indexterm zone="ch-system-binutils readelf">
218 <primary sortas="b-readelf">readelf</primary>
219 </indexterm>
220 </listitem>
221 </varlistentry>
222
223 <varlistentry id="size">
224 <term><command>size</command></term>
225 <listitem>
226 <para>Lists the section sizes and the total size for the given
227 object files</para>
228 <indexterm zone="ch-system-binutils size">
229 <primary sortas="b-size">size</primary>
230 </indexterm>
231 </listitem>
232 </varlistentry>
233
234 <varlistentry id="strings">
235 <term><command>strings</command></term>
236 <listitem>
237 <para>Outputs, for each given file, the sequences of printable
238 characters that are of at least the specified length (defaulting to
239 four); for object files, it prints, by default, only the strings from
240 the initializing and loading sections while for other types of files,
241 it scans the entire file</para>
242 <indexterm zone="ch-system-binutils strings">
243 <primary sortas="b-strings">strings</primary>
244 </indexterm>
245 </listitem>
246 </varlistentry>
247
248 <varlistentry id="strip">
249 <term><command>strip</command></term>
250 <listitem>
251 <para>Discards symbols from object files</para>
252 <indexterm zone="ch-system-binutils strip">
253 <primary sortas="b-strip">strip</primary>
254 </indexterm>
255 </listitem>
256 </varlistentry>
257
258 <varlistentry id="libiberty">
259 <term><filename class="libraryfile">libiberty</filename></term>
260 <listitem>
261 <para>Contains routines used by various GNU programs, including
262 <command>getopt</command>, <command>obstack</command>,
263 <command>strerror</command>, <command>strtol</command>, and
264 <command>strtoul</command></para>
265 <indexterm zone="ch-system-binutils libiberty">
266 <primary sortas="c-libiberty">libiberty</primary>
267 </indexterm>
268 </listitem>
269 </varlistentry>
270
271 <varlistentry id="libbfd">
272 <term><filename class="libraryfile">libbfd</filename></term>
273 <listitem>
274 <para>The Binary File Descriptor library</para>
275 <indexterm zone="ch-system-binutils libbfd">
276 <primary sortas="c-libbfd">libbfd</primary>
277 </indexterm>
278 </listitem>
279 </varlistentry>
280
281 <varlistentry id="libopcodes">
282 <term><filename class="libraryfile">libopcodes</filename></term>
283 <listitem>
284 <para>A library for dealing with opcodes&mdash;the <quote>readable
285 text</quote> versions of instructions for the processor;
286 it is used for building utilities like
287 <command>objdump</command>.</para>
288 <indexterm zone="ch-system-binutils libopcodes">
289 <primary sortas="c-libopcodes">libopcodes</primary>
290 </indexterm>
291 </listitem>
292 </varlistentry>
293
294 </variablelist>
295
296 </sect2>
297
298</sect1>
Note: See TracBrowser for help on using the repository browser.