%general-entities; ]> binutils &binutils-version;
&binutils-url;
Binutils-&binutils-version; Binutils <para>The Binutils package contains a linker, an assembler, and other tools for handling object files.</para> <segmentedlist> <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem> <seg>&binutils-fin-sbu;</seg> <seg>&binutils-fin-du;</seg> </seglistitem> </segmentedlist> </sect2> <sect2 role="installation"> <title>Installation of Binutils The Binutils documentation recommends building Binutils in a dedicated build directory: mkdir -v build cd build Prepare Binutils for compilation: ../configure --prefix=/usr \ --sysconfdir=/etc \ --enable-gold \ --enable-ld=default \ --enable-plugins \ --enable-shared \ --disable-werror \ --enable-64-bit-bfd \ --with-system-zlib ../configure --prefix=/usr \ --sysconfdir=/etc \ --enable-gold \ --enable-ld=default \ --enable-plugins \ --enable-shared \ --disable-werror \ --enable-64-bit-bfd \ --with-system-zlib \ --enable-multilib The meaning of the configure parameters: --enable-gold Build the gold linker and install it as ld.gold (alongside the default linker). --enable-ld=default Build the original bfd linker and install it as both ld (the default linker) and ld.bfd. --enable-plugins Enables plugin support for the linker. --enable-64-bit-bfd Enables 64-bit support (on hosts with narrower word sizes). May not be needed on 64-bit systems, but does no harm. --enable-multilib Enables multilib support in bintutils. --with-system-zlib Use the installed zlib library instead of building the included version. Compile the package: make tooldir=/usr The meaning of the make parameter: tooldir=/usr Normally, the tooldir (the directory where the executables will ultimately be located) is set to $(exec_prefix)/$(target_alias). For example, x86_64 machines would expand that to /usr/x86_64-pc-linux-gnu. Because this is a custom system, this target-specific directory in /usr is not required. $(exec_prefix)/$(target_alias) would be used if the system were used to cross-compile (for example, compiling a package on an Intel machine that generates code that can be executed on PowerPC machines). The test suite for Binutils in this section is considered critical. Do not skip it under any circumstances. Test the results: make -k check For a list of failed tests, run: grep '^FAIL:' $(find -name '*.log') Twelve tests fail in the gold test suite when the and options are passed to GCC. Three tests in the gprofng suite are also known to fail. Install the package: make tooldir=/usr install Remove useless static libraries: rm -fv /usr/lib/lib{bfd,ctf,ctf-nobfd,gprofng,opcodes,sframe}.a Contents of Binutils Installed programs Installed libraries Installed directory addr2line, ar, as, c++filt, dwp, elfedit, gprof, gprofng, ld, ld.bfd, ld.gold, nm, objcopy, objdump, ranlib, readelf, size, strings, and strip libbfd.so, libctf.so, libctf-nobfd.so, libgprofng.so, libopcodes.so, and libsframe.so /usr/lib/ldscripts Short Descriptions addr2line 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 addr2line ar Creates, modifies, and extracts from archives ar as An assembler that assembles the output of gcc into object files as c++filt Used by the linker to de-mangle C++ and Java symbols and to keep overloaded functions from clashing c++filt dwp The DWARF packaging utility dwp elfedit Updates the ELF headers of ELF files elfedit gprof Displays call graph profile data gprof gprofng Gathers and analyzes performance data gprofng ld A linker that combines a number of object and archive files into a single file, relocating their data and tying up symbol references ld ld.gold A cut down version of ld that only supports the elf object file format ld.gold ld.bfd A hard link to ld ld.bfd nm Lists the symbols occurring in a given object file nm objcopy Translates one type of object file into another objcopy objdump Displays information about the given object file, with options controlling the particular information to display; the information shown is useful to programmers who are working on the compilation tools objdump ranlib Generates an index of the contents of an archive and stores it in the archive; the index lists all of the symbols defined by archive members that are relocatable object files ranlib readelf Displays information about ELF type binaries readelf size Lists the section sizes and the total size for the given object files size strings Outputs, for each given file, the sequences of printable characters that are of at least the specified length (defaulting to four); for object files, it prints, by default, only the strings from the initializing and loading sections while for other types of files, it scans the entire file strings strip Discards symbols from object files strip libbfd The Binary File Descriptor library libbfd libctf The Compat ANSI-C Type Format debugging support library libctf libctf-nobfd A libctf variant which does not use libbfd functionality libctf-nobfd libgprofng A library containing most routines used by gprofng libgprofng libopcodes A library for dealing with opcodes—the readable text versions of instructions for the processor; it is used for building utilities like objdump libopcodes libsframe A library to support online backtracing using a simple unwinder libsframe