source: clfs-embedded/BOOK/cross-tools/common/binutils.xml@ b36d112

Last change on this file since b36d112 was 320a81a, checked in by Jim Gifford <clfs@…>, 16 years ago

Updated to Binutils 2.19.1

  • Property mode set to 100644
File size: 12.3 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-cross-tools-binutils" role="wrap">
9 <?dbhtml filename="binutils.html"?>
10
11 <title>Cross Binutils-&binutils-version;</title>
12
13 <indexterm zone="ch-cross-tools-binutils">
14 <primary sortas="a-Binutils">Binutils</primary>
15 <secondary>cross tools</secondary>
16 </indexterm>
17
18 <sect2 role="package">
19 <title/>
20
21 <para>The Binutils package contains a linker, an assembler, and other
22 tools for handling object files.</para>
23
24 </sect2>
25
26 <sect2 role="installation">
27 <title>Installation of Cross Binutils</title>
28
29 <para os="a">It is important that Binutils be the first package compiled
30 because both uClibc and GCC perform various tests on the available
31 linker and assembler to determine which of their own features to
32 enable.</para>
33
34<!--
35 <para os="p1">The following patch contains a number of updates to the
36 &binutils-version; branch by the Binutils developers:</para>
37
38<screen os="p2"><userinput>patch -Np1 -i ../&binutils-branch_update-patch;</userinput></screen>
39-->
40
41 <para os="p3">To make sure that the proper syntax is used for a couple of
42 tools, apply the following patch:</para>
43
44<screen os="p4"><userinput>patch -Np1 -i ../&binutils-posix-patch;</userinput></screen>
45
46 <para os="b">The Binutils documentation recommends building Binutils outside of the
47 source directory in a dedicated build directory:</para>
48
49<screen os="c"><userinput>mkdir -v ../binutils-build
50cd ../binutils-build</userinput></screen>
51
52 <para os="d">Prepare Binutils for compilation:</para>
53
54<screen os="e"><userinput>../binutils-&binutils-version;/configure --prefix=${CLFS}/cross-tools \
55 --target=${CLFS_TARGET} --with-sysroot=${CLFS} --disable-nls \
56 --enable-shared --disable-multilib</userinput></screen>
57
58 <variablelist os="f">
59 <title>The meaning of the configure options:</title>
60
61 <varlistentry os="f1">
62 <term><parameter>--prefix=${CLFS}/cross-tools</parameter></term>
63 <listitem>
64 <para>This tells the configure script to prepare to install the
65 package in the <filename class="directory">${CLFS}/cross-tools</filename>
66 directory.</para>
67 </listitem>
68 </varlistentry>
69
70 <varlistentry os="f3">
71 <term><parameter>--target=${CLFS_TARGET}</parameter></term>
72 <listitem>
73 <para>When used with --host, this creates a cross-architecture
74 executable that creates files for ${CLFS_TARGET} but runs on
75 the host system.</para>
76 </listitem>
77 </varlistentry>
78
79 <varlistentry os="f4">
80 <term><parameter>--with-sysroot=${CLFS}</parameter></term>
81 <listitem>
82 <para>This tells configure that ${CLFS} is going to be the root
83 of our system. It will now use the specified sysroot, ${CLFS}, as
84 a prefix of the default search paths.</para>
85 </listitem>
86 </varlistentry>
87
88 <varlistentry os="f5">
89 <term><parameter>--disable-nls</parameter></term>
90 <listitem>
91 <para>This disables internationalization as i18n is not needed for the
92 cross-compile tools.</para>
93 </listitem>
94 </varlistentry>
95
96 <varlistentry os="f6">
97 <term><parameter>--enable-shared</parameter></term>
98 <listitem>
99 <para>Enable the creation of the shared libraries.</para>
100 </listitem>
101 </varlistentry>
102
103 <varlistentry os="f7">
104 <term><parameter>--disable-multilib</parameter></term>
105 <listitem>
106 <para>This option disables the building of a multilib
107 capable binutils.</para>
108 </listitem>
109 </varlistentry>
110
111 </variablelist>
112
113 <para os="g">Compile the package:</para>
114
115<screen os="h"><userinput>make configure-host
116make</userinput></screen>
117
118 <variablelist os="i">
119 <title>The meaning of the make options:</title>
120
121 <varlistentry os="i1">
122 <term><parameter>configure-host</parameter></term>
123 <listitem>
124 <para>This checks the host environment and makes sure all the
125 necessary tools are available to compile Binutils.</para>
126 </listitem>
127 </varlistentry>
128
129 </variablelist>
130
131 <para os="j">Install the package:</para>
132
133<screen os="k"><userinput>make install</userinput></screen>
134
135 <para os="l">Copy the <filename class="headerfile">libiberty.h</filename> file to
136 <filename class="directory">${CLFS}/usr/include</filename> directory:</para>
137
138<screen os="m"><userinput>cp -v ../binutils-&binutils-version;/include/libiberty.h ${CLFS}/usr/include</userinput></screen>
139
140 </sect2>
141
142 <sect2 id="contents-binutils" role="content">
143 <title>Contents of Binutils</title>
144
145 <segmentedlist>
146 <segtitle>Installed programs</segtitle>
147 <segtitle>Installed libraries</segtitle>
148
149 <seglistitem>
150 <seg>addr2line, ar, as, c++filt, gprof, ld, nm, objcopy, objdump,
151 ranlib, readelf, size, strings, and strip</seg>
152 <seg>libiberty.a, libbfd.[a,so], and libopcodes.[a,so]</seg>
153 </seglistitem>
154 </segmentedlist>
155
156 <variablelist>
157 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
158 <?dbfo list-presentation="list"?>
159 <?dbhtml list-presentation="table"?>
160
161 <varlistentry id="addr2line">
162 <term><command>addr2line</command></term>
163 <listitem>
164 <para>Translates program addresses to file names and line numbers;
165 given an address and the name of an executable, it uses the debugging
166 information in the executable to determine which source file and line
167 number are associated with the address</para>
168 <indexterm zone="ch-cross-tools-binutils addr2line">
169 <primary sortas="b-addr2line">addr2line</primary>
170 </indexterm>
171 </listitem>
172 </varlistentry>
173
174 <varlistentry id="ar">
175 <term><command>ar</command></term>
176 <listitem>
177 <para>Creates, modifies, and extracts from archives</para>
178 <indexterm zone="ch-cross-tools-binutils ar">
179 <primary sortas="b-ar">ar</primary>
180 </indexterm>
181 </listitem>
182 </varlistentry>
183
184 <varlistentry id="as">
185 <term><command>as</command></term>
186 <listitem>
187 <para>An assembler that assembles the output of <command>gcc</command>
188 into object files</para>
189 <indexterm zone="ch-cross-tools-binutils as">
190 <primary sortas="b-as">as</primary>
191 </indexterm>
192 </listitem>
193 </varlistentry>
194
195 <varlistentry id="c-filt">
196 <term><command>c++filt</command></term>
197 <listitem>
198 <para>Used by the linker to de-mangle C++ and Java symbols and to keep
199 overloaded functions from clashing</para>
200 <indexterm zone="ch-cross-tools-binutils c-filt">
201 <primary sortas="b-c++filt">c++filt</primary>
202 </indexterm>
203 </listitem>
204 </varlistentry>
205
206 <varlistentry id="gprof">
207 <term><command>gprof</command></term>
208 <listitem>
209 <para>Displays call graph profile data</para>
210 <indexterm zone="ch-cross-tools-binutils gprof">
211 <primary sortas="b-gprof">gprof</primary>
212 </indexterm>
213 </listitem>
214 </varlistentry>
215
216 <varlistentry id="ld">
217 <term><command>ld</command></term>
218 <listitem>
219 <para>A linker that combines a number of object and archive files
220 into a single file, relocating their data and tying up symbol
221 references</para>
222 <indexterm zone="ch-cross-tools-binutils ld">
223 <primary sortas="b-ld">ld</primary>
224 </indexterm>
225 </listitem>
226 </varlistentry>
227
228 <varlistentry id="nm">
229 <term><command>nm</command></term>
230 <listitem>
231 <para>Lists the symbols occurring in a given object file</para>
232 <indexterm zone="ch-cross-tools-binutils nm">
233 <primary sortas="b-nm">nm</primary>
234 </indexterm>
235 </listitem>
236 </varlistentry>
237
238 <varlistentry id="objdump">
239 <term><command>objdump</command></term>
240 <listitem>
241 <para>Displays information about the given object file, with options
242 controlling the particular information to display; the information
243 shown is useful to programmers who are working on the compilation
244 tools</para>
245 <indexterm zone="ch-cross-tools-binutils objdump">
246 <primary sortas="b-objdump">objdump</primary>
247 </indexterm>
248 </listitem>
249 </varlistentry>
250
251 <varlistentry id="ranlib">
252 <term><command>ranlib</command></term>
253 <listitem>
254 <para>Generates an index of the contents of an archive and stores it
255 in the archive; the index lists all of the symbols defined by archive
256 members that are relocatable object files</para>
257 <indexterm zone="ch-cross-tools-binutils ranlib">
258 <primary sortas="b-ranlib">ranlib</primary>
259 </indexterm>
260 </listitem>
261 </varlistentry>
262
263 <varlistentry id="readelf">
264 <term><command>readelf</command></term>
265 <listitem>
266 <para>Displays information about ELF type binaries</para>
267 <indexterm zone="ch-cross-tools-binutils readelf">
268 <primary sortas="b-readelf">readelf</primary>
269 </indexterm>
270 </listitem>
271 </varlistentry>
272
273 <varlistentry id="size">
274 <term><command>size</command></term>
275 <listitem>
276 <para>Lists the section sizes and the total size for the given
277 object files</para>
278 <indexterm zone="ch-cross-tools-binutils size">
279 <primary sortas="b-size">size</primary>
280 </indexterm>
281 </listitem>
282 </varlistentry>
283
284 <varlistentry id="strings">
285 <term><command>strings</command></term>
286 <listitem>
287 <para>Outputs, for each given file, the sequences of printable
288 characters that are of at least the specified length (defaulting to
289 four); for object files, it prints, by default, only the strings from
290 the initializing and loading sections while for other types of files,
291 it scans the entire file</para>
292 <indexterm zone="ch-cross-tools-binutils strings">
293 <primary sortas="b-strings">strings</primary>
294 </indexterm>
295 </listitem>
296 </varlistentry>
297
298 <varlistentry id="strip">
299 <term><command>strip</command></term>
300 <listitem>
301 <para>Discards symbols from object files</para>
302 <indexterm zone="ch-cross-tools-binutils strip">
303 <primary sortas="b-strip">strip</primary>
304 </indexterm>
305 </listitem>
306 </varlistentry>
307
308 <varlistentry id="libiberty">
309 <term><filename class="libraryfile">libiberty</filename></term>
310 <listitem>
311 <para>Contains routines used by various GNU programs, including
312 <command>getopt</command>, <command>obstack</command>,
313 <command>strerror</command>, <command>strtol</command>, and
314 <command>strtoul</command></para>
315 <indexterm zone="ch-cross-tools-binutils libiberty">
316 <primary sortas="c-libiberty">libiberty</primary>
317 </indexterm>
318 </listitem>
319 </varlistentry>
320
321 <varlistentry id="libbfd">
322 <term><filename class="libraryfile">libbfd</filename></term>
323 <listitem>
324 <para>The Binary File Descriptor library</para>
325 <indexterm zone="ch-cross-tools-binutils libbfd">
326 <primary sortas="c-libbfd">libbfd</primary>
327 </indexterm>
328 </listitem>
329 </varlistentry>
330
331 <varlistentry id="libopcodes">
332 <term><filename class="libraryfile">libopcodes</filename></term>
333 <listitem>
334 <para>A library for dealing with opcodes&mdash;the <quote>readable
335 text</quote> versions of instructions for the processor;
336 it is used for building utilities like
337 <command>objdump</command>.</para>
338 <indexterm zone="ch-cross-tools-binutils libopcodes">
339 <primary sortas="c-libopcodes">libopcodes</primary>
340 </indexterm>
341 </listitem>
342 </varlistentry>
343
344 </variablelist>
345
346 </sect2>
347
348</sect1>
Note: See TracBrowser for help on using the repository browser.