04.06.2015 Views

Red Hat Developer Toolset 1.x User Guide - Linux

Red Hat Developer Toolset 1.x User Guide - Linux

Red Hat Developer Toolset 1.x User Guide - Linux

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

36 Chapter 4. binutils<br />

Chapter 4. binutils<br />

binutils is a collection of various binary tools such as the GNU linker, GNU assembler, and other<br />

utilities that allow you to inspect and manipulate object files and binaries. Refer to Table 4.1, “Tools<br />

Included in binutils for <strong>Red</strong> <strong>Hat</strong> <strong>Developer</strong> <strong>Toolset</strong>” for a complete list of binary tools that are distributed<br />

with the <strong>Red</strong> <strong>Hat</strong> <strong>Developer</strong> <strong>Toolset</strong> version of binutils.<br />

<strong>Red</strong> <strong>Hat</strong> <strong>Developer</strong> <strong>Toolset</strong> is distributed with binutils 2.23.51. This version is more recent than the<br />

version included in <strong>Red</strong> <strong>Hat</strong> Enterprise <strong>Linux</strong> and provides numerous bug fixes and enhancements,<br />

including the new gold linker, several new command line options, improvements to the linker script<br />

language, and support for link-time optimization, compressed debug sections, and new instruction sets.<br />

For a detailed list of changes, refer to Section B.3, “Changes in binutils 2.23.51”.<br />

Table 4 .1. Tools Included in binutils for <strong>Red</strong> <strong>Hat</strong> <strong>Developer</strong> <strong>Toolset</strong><br />

Name<br />

addr2line<br />

ar<br />

as<br />

c++filt<br />

elfedit<br />

gprof<br />

ld<br />

ld.bfd<br />

ld.gold<br />

nm<br />

objcopy<br />

objdump<br />

ranlib<br />

readelf<br />

size<br />

strings<br />

strip<br />

Description<br />

Translates addresses into file names and line numbers.<br />

Creates, modifies, and extracts files from archives.<br />

The GNU assembler.<br />

Decodes mangled C++ symbols.<br />

Examines and edits ELF files.<br />

Display profiling information.<br />

The GNU linker.<br />

An alternative to the GNU linker.<br />

A new ELF linker.<br />

Lists symbols from object files.<br />

Copies and translates object files.<br />

Displays information from object files.<br />

Generates an index to the contents of an archive to make access to this<br />

archive faster.<br />

Displays information about ELF files.<br />

Lists section sizes of object or archive files.<br />

Displays printable character sequences in files.<br />

Discards all symbols from object files.<br />

4.1. Installing binutils<br />

In <strong>Red</strong> <strong>Hat</strong> <strong>Developer</strong> <strong>Toolset</strong>, binutils are provided by the devtoolset-1.1-binutils package, and are<br />

automatically installed with devtoolset-1.1 as described in Section 1.5, “Installing <strong>Red</strong> <strong>Hat</strong> <strong>Developer</strong><br />

<strong>Toolset</strong>”.<br />

4.2. Using the GNU Assembler<br />

To produce an object file from an assembly language program, run the as tool as follows:<br />

scl enable devtoolset-1.1 'as [option...] -o object_file source_file'<br />

This creates an object file named object_file in the current working directory.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!