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

clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since b253709 was b8a33e3, checked in by William Harrington <kb0iic@…>, 11 years ago

Add a sed for texinfo 5.x to binutils.

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