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

clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since d8aca67 was e61fedb, checked in by William Harrington <kb0iic@…>, 12 years ago

Comment out binutils branch update entries.

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