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

Last change on this file since 5efdb34 was 62fdf1a, checked in by Andrew Bradford <andrew@…>, 11 years ago

binutils & mpfr: Remove --enable-shared

Not needed.

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