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

clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since ab871d9 was 3d66e17, checked in by Chris Staub <chris@…>, 11 years ago

Use libiberty from GCC instead of Binutils

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