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

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 4f59caca was 0c95190, checked in by Chris Staub <chris@…>, 13 years ago

Corrected binutils source dir name

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