source: BOOK/final-system/common/binutils.xml@ 6ef644e

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 6ef644e was c331850, checked in by Chris Staub <chris@…>, 18 years ago

Text fixes

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