source: clfs-sysroot/BOOK/final-system/common/binutils.xml@ 7b58527

Last change on this file since 7b58527 was 3e71b22, checked in by Joe Ciccone <jciccone@…>, 18 years ago

Added the Binutils Branch Update Patch.

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