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

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since aeb56828 was 3f8be484, checked in by Jim Gifford <clfs@…>, 19 years ago

r627@server (orig r625): jim | 2005-10-31 12:59:34 -0800
Import of Cross-LFS Book

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