source: clfs-sysroot/BOOK/final-system/common/binutils.xml@ 8a63c91

Last change on this file since 8a63c91 was 12e6567, checked in by Joe Ciccone <jciccone@…>, 16 years ago

Added a sysroot wrapper.
Updated the build variables section of the book, each package uses its own.

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