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

clfs-3.0.0-systemd systemd
Last change on this file since 7aa51b8 was e1bee3d4, checked in by Chris Staub <chris@…>, 11 years ago

Fix binutils instructions to ensure tooldir is used on make

  • Property mode set to 100644
File size: 11.6 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
[e1bee3d4]64<screen os="k"><userinput>make tooldir=/usr</userinput></screen>
[3f8be484]65
66 <important os="l">
[e1bee3d4]67 <para>During <command>make tooldir=/usr</command> you may receive the
[3f8be484]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
[44d357b]76 <variablelist os="n">
77 <title>The meaning of the make parameter:</title>
78
79 <varlistentry>
80 <term><parameter>tooldir=/usr</parameter></term>
81 <listitem>
82 <para>Normally, the tooldir (the directory where the executables
83 will ultimately be located) is set to <filename
84 class="directory">$(exec_prefix)/$(target_alias)</filename>. Because this
85 is a custom system, this target-specific directory in <filename
86 class="directory">/usr</filename> is not required.</para>
87 </listitem>
88 </varlistentry>
89 </variablelist>
[3f8be484]90
91 <important os="o">
[121c48a]92 <para>The test suite for Binutils is considered critical.
93 Do not skip it under any circumstance.</para>
[3f8be484]94 </important>
95
[936dcb48]96 <para os="p">Test the results:</para>
[f54319a]97
[686839b]98<screen os="q"><userinput remap="test">make check</userinput></screen>
[f54319a]99
[3f8be484]100 <para os="r">Install the package:</para>
101
102<screen os="s"><userinput>make tooldir=/usr install</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>
[61ad0b7f]112 <segtitle>Installed directory</segtitle>
[3f8be484]113
114 <seglistitem>
[2b220db9]115 <seg>addr2line, ar, as, c++filt, elfedit, gprof, ld, ld.bfd, nm, objcopy,
116 objdump,
[3f8be484]117 ranlib, readelf, size, strings, and strip</seg>
[3d66e17]118 <seg>libbfd.[a,so], and libopcodes.[a,so]</seg>
[61ad0b7f]119 <seg>/usr/lib/ldscripts</seg>
[3f8be484]120 </seglistitem>
121 </segmentedlist>
122
123 <variablelist>
124 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
125 <?dbfo list-presentation="list"?>
126 <?dbhtml list-presentation="table"?>
127
128 <varlistentry id="addr2line">
129 <term><command>addr2line</command></term>
130 <listitem>
131 <para>Translates program addresses to file names and line numbers;
132 given an address and the name of an executable, it uses the debugging
133 information in the executable to determine which source file and line
134 number are associated with the address</para>
135 <indexterm zone="ch-system-binutils addr2line">
136 <primary sortas="b-addr2line">addr2line</primary>
137 </indexterm>
138 </listitem>
139 </varlistentry>
140
141 <varlistentry id="ar">
142 <term><command>ar</command></term>
143 <listitem>
144 <para>Creates, modifies, and extracts from archives</para>
145 <indexterm zone="ch-system-binutils ar">
146 <primary sortas="b-ar">ar</primary>
147 </indexterm>
148 </listitem>
149 </varlistentry>
150
151 <varlistentry id="as">
152 <term><command>as</command></term>
153 <listitem>
154 <para>An assembler that assembles the output of <command>gcc</command>
155 into object files</para>
156 <indexterm zone="ch-system-binutils as">
157 <primary sortas="b-as">as</primary>
158 </indexterm>
159 </listitem>
160 </varlistentry>
161
162 <varlistentry id="c-filt">
163 <term><command>c++filt</command></term>
164 <listitem>
165 <para>Used by the linker to de-mangle C++ and Java symbols and to keep
166 overloaded functions from clashing</para>
167 <indexterm zone="ch-system-binutils c-filt">
168 <primary sortas="b-c++filt">c++filt</primary>
169 </indexterm>
170 </listitem>
171 </varlistentry>
172
[2b220db9]173 <varlistentry id="elfedit">
174 <term><command>elfedit</command></term>
175 <listitem>
176 <para>Updates the ELF header of ELF files</para>
177 <indexterm zone="ch-system-binutils elfedit">
178 <primary sortas="b-elfedit">elfedit</primary>
179 </indexterm>
180 </listitem>
181 </varlistentry>
182
[3f8be484]183 <varlistentry id="gprof">
184 <term><command>gprof</command></term>
185 <listitem>
186 <para>Displays call graph profile data</para>
187 <indexterm zone="ch-system-binutils gprof">
188 <primary sortas="b-gprof">gprof</primary>
189 </indexterm>
190 </listitem>
191 </varlistentry>
192
193 <varlistentry id="ld">
194 <term><command>ld</command></term>
195 <listitem>
196 <para>A linker that combines a number of object and archive files
197 into a single file, relocating their data and tying up symbol
198 references</para>
199 <indexterm zone="ch-system-binutils ld">
200 <primary sortas="b-ld">ld</primary>
201 </indexterm>
202 </listitem>
203 </varlistentry>
204
[2b220db9]205 <varlistentry id="ld.bfd">
206 <term><command>ld.bfd</command></term>
207 <listitem>
208 <para>Hard link to <command>ld</command></para>
209 <indexterm zone="ch-system-binutils ld.bfd">
210 <primary sortas="b-ld.bfd">ld.bfd</primary>
211 </indexterm>
212 </listitem>
213 </varlistentry>
214
[3f8be484]215 <varlistentry id="nm">
216 <term><command>nm</command></term>
217 <listitem>
218 <para>Lists the symbols occurring in a given object file</para>
219 <indexterm zone="ch-system-binutils nm">
220 <primary sortas="b-nm">nm</primary>
221 </indexterm>
222 </listitem>
223 </varlistentry>
224
225 <varlistentry id="objcopy">
226 <term><command>objcopy</command></term>
227 <listitem>
228 <para>Translates one type of object file into another</para>
229 <indexterm zone="ch-system-binutils objcopy">
230 <primary sortas="b-objcopy">objcopy</primary>
231 </indexterm>
232 </listitem>
233 </varlistentry>
234
235 <varlistentry id="objdump">
236 <term><command>objdump</command></term>
237 <listitem>
238 <para>Displays information about the given object file, with options
239 controlling the particular information to display; the information
240 shown is useful to programmers who are working on the compilation
241 tools</para>
242 <indexterm zone="ch-system-binutils objdump">
243 <primary sortas="b-objdump">objdump</primary>
244 </indexterm>
245 </listitem>
246 </varlistentry>
247
248 <varlistentry id="ranlib">
249 <term><command>ranlib</command></term>
250 <listitem>
251 <para>Generates an index of the contents of an archive and stores it
252 in the archive; the index lists all of the symbols defined by archive
253 members that are relocatable object files</para>
254 <indexterm zone="ch-system-binutils ranlib">
255 <primary sortas="b-ranlib">ranlib</primary>
256 </indexterm>
257 </listitem>
258 </varlistentry>
259
260 <varlistentry id="readelf">
261 <term><command>readelf</command></term>
262 <listitem>
263 <para>Displays information about ELF type binaries</para>
264 <indexterm zone="ch-system-binutils readelf">
265 <primary sortas="b-readelf">readelf</primary>
266 </indexterm>
267 </listitem>
268 </varlistentry>
269
270 <varlistentry id="size">
271 <term><command>size</command></term>
272 <listitem>
273 <para>Lists the section sizes and the total size for the given
274 object files</para>
275 <indexterm zone="ch-system-binutils size">
276 <primary sortas="b-size">size</primary>
277 </indexterm>
278 </listitem>
279 </varlistentry>
280
281 <varlistentry id="strings">
282 <term><command>strings</command></term>
283 <listitem>
284 <para>Outputs, for each given file, the sequences of printable
285 characters that are of at least the specified length (defaulting to
286 four); for object files, it prints, by default, only the strings from
287 the initializing and loading sections while for other types of files,
288 it scans the entire file</para>
289 <indexterm zone="ch-system-binutils strings">
290 <primary sortas="b-strings">strings</primary>
291 </indexterm>
292 </listitem>
293 </varlistentry>
294
295 <varlistentry id="strip">
296 <term><command>strip</command></term>
297 <listitem>
298 <para>Discards symbols from object files</para>
299 <indexterm zone="ch-system-binutils strip">
300 <primary sortas="b-strip">strip</primary>
301 </indexterm>
302 </listitem>
303 </varlistentry>
304
305 <varlistentry id="libbfd">
306 <term><filename class="libraryfile">libbfd</filename></term>
307 <listitem>
308 <para>The Binary File Descriptor library</para>
309 <indexterm zone="ch-system-binutils libbfd">
310 <primary sortas="c-libbfd">libbfd</primary>
311 </indexterm>
312 </listitem>
313 </varlistentry>
314
315 <varlistentry id="libopcodes">
316 <term><filename class="libraryfile">libopcodes</filename></term>
317 <listitem>
318 <para>A library for dealing with opcodes&mdash;the <quote>readable
319 text</quote> versions of instructions for the processor;
320 it is used for building utilities like
321 <command>objdump</command>.</para>
322 <indexterm zone="ch-system-binutils libopcodes">
323 <primary sortas="c-libopcodes">libopcodes</primary>
324 </indexterm>
325 </listitem>
326 </varlistentry>
327
328 </variablelist>
329
330 </sect2>
331
332</sect1>
Note: See TracBrowser for help on using the repository browser.