source: clfs-sysroot/BOOK/final-system/common/binutils.xml@ 305f5c6

Last change on this file since 305f5c6 was 0de6e24, checked in by Chris Staub <chris@…>, 18 years ago

Removed 2nd cp command for libiberty.h

  • Property mode set to 100644
File size: 10.8 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 </sect2>
86
87 <sect2 id="contents-binutils" role="content">
88 <title>Contents of Binutils</title>
89
90 <segmentedlist>
91 <segtitle>Installed programs</segtitle>
92 <segtitle>Installed libraries</segtitle>
93
94 <seglistitem>
95 <seg>addr2line, ar, as, c++filt, gprof, ld, nm, objcopy, objdump,
96 ranlib, readelf, size, strings, and strip</seg>
97 <seg>libiberty.a, libbfd.[a,so], and libopcodes.[a,so]</seg>
98 </seglistitem>
99 </segmentedlist>
100
101 <variablelist>
102 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
103 <?dbfo list-presentation="list"?>
104 <?dbhtml list-presentation="table"?>
105
106 <varlistentry id="addr2line">
107 <term><command>addr2line</command></term>
108 <listitem>
109 <para>Translates program addresses to file names and line numbers;
110 given an address and the name of an executable, it uses the debugging
111 information in the executable to determine which source file and line
112 number are associated with the address</para>
113 <indexterm zone="ch-system-binutils addr2line">
114 <primary sortas="b-addr2line">addr2line</primary>
115 </indexterm>
116 </listitem>
117 </varlistentry>
118
119 <varlistentry id="ar">
120 <term><command>ar</command></term>
121 <listitem>
122 <para>Creates, modifies, and extracts from archives</para>
123 <indexterm zone="ch-system-binutils ar">
124 <primary sortas="b-ar">ar</primary>
125 </indexterm>
126 </listitem>
127 </varlistentry>
128
129 <varlistentry id="as">
130 <term><command>as</command></term>
131 <listitem>
132 <para>An assembler that assembles the output of <command>gcc</command>
133 into object files</para>
134 <indexterm zone="ch-system-binutils as">
135 <primary sortas="b-as">as</primary>
136 </indexterm>
137 </listitem>
138 </varlistentry>
139
140 <varlistentry id="c-filt">
141 <term><command>c++filt</command></term>
142 <listitem>
143 <para>Used by the linker to de-mangle C++ and Java symbols and to keep
144 overloaded functions from clashing</para>
145 <indexterm zone="ch-system-binutils c-filt">
146 <primary sortas="b-c++filt">c++filt</primary>
147 </indexterm>
148 </listitem>
149 </varlistentry>
150
151 <varlistentry id="gprof">
152 <term><command>gprof</command></term>
153 <listitem>
154 <para>Displays call graph profile data</para>
155 <indexterm zone="ch-system-binutils gprof">
156 <primary sortas="b-gprof">gprof</primary>
157 </indexterm>
158 </listitem>
159 </varlistentry>
160
161 <varlistentry id="ld">
162 <term><command>ld</command></term>
163 <listitem>
164 <para>A linker that combines a number of object and archive files
165 into a single file, relocating their data and tying up symbol
166 references</para>
167 <indexterm zone="ch-system-binutils ld">
168 <primary sortas="b-ld">ld</primary>
169 </indexterm>
170 </listitem>
171 </varlistentry>
172
173 <varlistentry id="nm">
174 <term><command>nm</command></term>
175 <listitem>
176 <para>Lists the symbols occurring in a given object file</para>
177 <indexterm zone="ch-system-binutils nm">
178 <primary sortas="b-nm">nm</primary>
179 </indexterm>
180 </listitem>
181 </varlistentry>
182
183 <varlistentry id="objcopy">
184 <term><command>objcopy</command></term>
185 <listitem>
186 <para>Translates one type of object file into another</para>
187 <indexterm zone="ch-system-binutils objcopy">
188 <primary sortas="b-objcopy">objcopy</primary>
189 </indexterm>
190 </listitem>
191 </varlistentry>
192
193 <varlistentry id="objdump">
194 <term><command>objdump</command></term>
195 <listitem>
196 <para>Displays information about the given object file, with options
197 controlling the particular information to display; the information
198 shown is useful to programmers who are working on the compilation
199 tools</para>
200 <indexterm zone="ch-system-binutils objdump">
201 <primary sortas="b-objdump">objdump</primary>
202 </indexterm>
203 </listitem>
204 </varlistentry>
205
206 <varlistentry id="ranlib">
207 <term><command>ranlib</command></term>
208 <listitem>
209 <para>Generates an index of the contents of an archive and stores it
210 in the archive; the index lists all of the symbols defined by archive
211 members that are relocatable object files</para>
212 <indexterm zone="ch-system-binutils ranlib">
213 <primary sortas="b-ranlib">ranlib</primary>
214 </indexterm>
215 </listitem>
216 </varlistentry>
217
218 <varlistentry id="readelf">
219 <term><command>readelf</command></term>
220 <listitem>
221 <para>Displays information about ELF type binaries</para>
222 <indexterm zone="ch-system-binutils readelf">
223 <primary sortas="b-readelf">readelf</primary>
224 </indexterm>
225 </listitem>
226 </varlistentry>
227
228 <varlistentry id="size">
229 <term><command>size</command></term>
230 <listitem>
231 <para>Lists the section sizes and the total size for the given
232 object files</para>
233 <indexterm zone="ch-system-binutils size">
234 <primary sortas="b-size">size</primary>
235 </indexterm>
236 </listitem>
237 </varlistentry>
238
239 <varlistentry id="strings">
240 <term><command>strings</command></term>
241 <listitem>
242 <para>Outputs, for each given file, the sequences of printable
243 characters that are of at least the specified length (defaulting to
244 four); for object files, it prints, by default, only the strings from
245 the initializing and loading sections while for other types of files,
246 it scans the entire file</para>
247 <indexterm zone="ch-system-binutils strings">
248 <primary sortas="b-strings">strings</primary>
249 </indexterm>
250 </listitem>
251 </varlistentry>
252
253 <varlistentry id="strip">
254 <term><command>strip</command></term>
255 <listitem>
256 <para>Discards symbols from object files</para>
257 <indexterm zone="ch-system-binutils strip">
258 <primary sortas="b-strip">strip</primary>
259 </indexterm>
260 </listitem>
261 </varlistentry>
262
263 <varlistentry id="libiberty">
264 <term><filename class="libraryfile">libiberty</filename></term>
265 <listitem>
266 <para>Contains routines used by various GNU programs, including
267 <command>getopt</command>, <command>obstack</command>,
268 <command>strerror</command>, <command>strtol</command>, and
269 <command>strtoul</command></para>
270 <indexterm zone="ch-system-binutils libiberty">
271 <primary sortas="c-libiberty">libiberty</primary>
272 </indexterm>
273 </listitem>
274 </varlistentry>
275
276 <varlistentry id="libbfd">
277 <term><filename class="libraryfile">libbfd</filename></term>
278 <listitem>
279 <para>The Binary File Descriptor library</para>
280 <indexterm zone="ch-system-binutils libbfd">
281 <primary sortas="c-libbfd">libbfd</primary>
282 </indexterm>
283 </listitem>
284 </varlistentry>
285
286 <varlistentry id="libopcodes">
287 <term><filename class="libraryfile">libopcodes</filename></term>
288 <listitem>
289 <para>A library for dealing with opcodes&mdash;the <quote>readable
290 text</quote> versions of instructions for the processor;
291 it is used for building utilities like
292 <command>objdump</command>.</para>
293 <indexterm zone="ch-system-binutils libopcodes">
294 <primary sortas="c-libopcodes">libopcodes</primary>
295 </indexterm>
296 </listitem>
297 </varlistentry>
298
299 </variablelist>
300
301 </sect2>
302
303</sect1>
Note: See TracBrowser for help on using the repository browser.