📄 binutils.html
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content= "application/xhtml+xml; charset=iso-8859-1" /> <title> 10.8. Binutils-2.16.1 </title> <link rel="stylesheet" href="../stylesheets/lfs.css" type="text/css" /> <meta name="generator" content="DocBook XSL Stylesheets V1.69.1" /> <link rel="stylesheet" href="../stylesheets/lfs-print.css" type= "text/css" media="print" /> </head> <body id="lfs" class="CLFS-SVN-20060417-MIPS"> <div class="navheader"> <div class="headertitles"> <h4> Cross-Compiled Linux From Scratch - Version CLFS-SVN-20060417-MIPS </h4> <h3> Chapter 10. Installing Basic System Software </h3> </div> <ul class="headerlinks"> <li class="prev"> <a accesskey="p" href="adjusting.html" title= "Adjusting the Toolchain">Prev</a> <p> Adjusting the Toolchain </p> </li> <li class="next"> <a accesskey="n" href="gcc.html" title="GCC-4.1.0">Next</a> <p> GCC-4.1.0 </p> </li> <li class="up"> <a accesskey="u" href="chapter.html" title= "Chapter 10. Installing Basic System Software">Up</a>. </li> <li class="home"> <a accesskey="h" href="../index.html" title= "Cross-Compiled Linux From Scratch - Version CLFS-SVN-20060417-MIPS"> Home</a> </li> </ul> </div> <div class="wrap" lang="en" xml:lang="en"> <div class="titlepage"> <h1 class="sect1"> 10.8. Binutils-2.16.1 </h1> </div> <div class="package" lang="en" xml:lang="en"> <p> The Binutils package contains a linker, an assembler, and other tools for handling object files. </p> <div class="segmentedlist"> <div class="seglistitem"> <div class="seg"> <strong><span class="segtitle">Installation depends on:</span></strong> <span class="seg">Bash, Binutils, Coreutils, Diffutils, Expect, GCC, Gettext, Glibc, Grep, Make, Patch, Perl, Sed, Tcl, and Texinfo</span> </div> </div> </div> </div> <div class="installation" lang="en" xml:lang="en"> <div class="titlepage"> <h2 class="sect2"> 10.8.1. Installation of Binutils </h2> </div> <p> Verify that the PTYs are working properly inside the build environment. Check that everything is set up correctly by performing a simple test: </p> <pre class="userinput"><kbd class="command">expect -c "spawn ls"</kbd></pre> <p> If the following message shows up, the environment is not set up for proper PTY operation: </p> <pre class="screen"><tt class="computeroutput">The system has no more ptys.Ask your system administrator to create more.</tt></pre> <p> This issue needs to be resolved before running the test suites for Binutils and GCC. </p> <p> The Binutils documentation recommends building Binutils outside of the source directory in a dedicated build directory: </p> <pre class="userinput"><kbd class="command">mkdir -v ../binutils-buildcd ../binutils-build</kbd></pre> <p> Prepare Binutils for compilation: </p> <pre class="userinput"><kbd class="command">../binutils-2.16.1/configure --prefix=/usr \ --enable-shared</kbd></pre> <p> Compile the package: </p> <pre class="userinput"><kbd class="command">make configure-host</kbd></pre> <div class="important"> <div class="admonhead"> <img alt="[Important]" src="../images/important.png" /> <h3 class="admontitle"> Important </h3> </div> <div class="admonbody"> <p> During <span><strong class="command">make configure-host</strong></span> you may receive the following error message. It is safe to ignore. </p> <pre class="screen"><tt class="computeroutput">WARNING: `flex' is missing on your system. You should onlyneed it if you modified a `.l' file. You may need the `Flex'package in order for those modifications to take effect. Youcan get `Flex' from any GNU archive site.</tt></pre> </div> </div> <pre class="userinput"><kbd class="command">make tooldir=/usr</kbd></pre> <div class="variablelist"> <p class="title"> <b>The meaning of the make parameter:</b> </p> <dl> <dt> <span class="term"><em class= "parameter"><tt>tooldir=/usr</tt></em></span> </dt> <dd> <p> Normally, the tooldir (the directory where the executables will ultimately be located) is set to <tt class= "filename">$(exec_prefix)/$(target_alias)</tt>. Because this is a custom system, this target-specific directory in <tt class="filename">/usr</tt> is not required. </p> </dd> </dl> </div> <div class="important"> <div class="admonhead"> <img alt="[Important]" src="../images/important.png" /> <h3 class="admontitle"> Important </h3> </div> <div class="admonbody"> <p> The test suite for Binutils in this section is considered critical. Do not skip it under any circumstances. </p> </div> </div> <p> Test the results: </p> <pre class="userinput"><kbd class="command">make check</kbd></pre> <p> Install the package: </p> <pre class="userinput"><kbd class="command">make tooldir=/usr install</kbd></pre> <p> Install the <tt class="filename">libiberty</tt> header file that is needed by some packages: </p> <pre class="userinput"><kbd class="command">cp -v ../binutils-2.16.1/include/libiberty.h /usr/include</kbd></pre> </div> <div class="content" lang="en" xml:lang="en"> <div class="titlepage"> <a id="contents-binutils" name="contents-binutils"></a> <h2 class="sect2"> 10.8.2. Contents of Binutils </h2> </div> <div class="segmentedlist"> <div class="seglistitem"> <div class="seg"> <strong><span class="segtitle">Installed programs:</span></strong> <span class="seg">addr2line, ar, as, c++filt, gprof, ld, nm, objcopy, objdump, ranlib, readelf, size, strings, and strip</span> </div> <div class="seg"> <strong><span class="segtitle">Installed libraries:</span></strong> <span class="seg">libiberty.a, libbfd.[a,so], and libopcodes.[a,so]</span> </div> </div> </div> <div class="variablelist"> <h3> <a id="id3662984" name="id3662984"></a>Short Descriptions </h3> <table border="0"> <col align="left" valign="top" /> <tbody> <tr> <td> <a id="addr2line" name="addr2line"></a><span class= "term"><span><strong class= "command">addr2line</strong></span></span> </td> <td> <p> Translates program addresses to file names and line numbers; given an address and the name of an executable, it uses the debugging information in the executable to determine which source file and line number are associated with the address </p> </td> </tr> <tr> <td> <a id="ar" name="ar"></a><span class=
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -