B.2. Changes in binutils

Red Hat Developer Toolset 4.1 is distributed with binutils 2.25.1, which provides a number of bug fixes and feature enhancements over the version included in Red Hat Enterprise Linux and the previous version of Red Hat Developer Toolset. Below is a comprehensive list of new features in this release.

B.2.1. Changes Since Red Hat Enterprise Linux 6.8

The following features have been added since the release of binutils in Red Hat Enterprise Linux 6.8:
The GNU assembler (as), GNU linker (ld), and other binary tools that are part of binutils are now released under the GNU General Public License, version 3.

B.2.1.1. GNU Linker

Another ELF linker, gold, is now available in addition to ld, the existing GNU linker. gold is intended to be a drop-in replacement for ld, so ld's documentation is intended to be the reference documentation. gold supports most of ld's features, except notable ones such as MRI-compatible linker scripts, cross-reference reports (--cref), and various other minor options. It also provides significantly improved link time with very large C++ applications.
In Red Hat Developer Toolset 4.1, the gold linker is not enabled by default. Users can explicitly switch between ld and gold by using the alternatives mechanism.
B.2.1.1.1. New Features
The following features have been added since the release of binutils included in Red Hat Enterprise Linux 6.8:
  • A new INPUT_SECTION_FLAGS keyword has been added to the linker script language. This keyword can be used to select input sections by section header flags.
  • A new SORT_BY_INIT_PRIORITY keyword has been added to the linker script language. This keyword can be used to sort sections by numerical value of the GCC init_priority attribute encoded in the section name.
  • A new SORT_NONE keyword has been added to the linker script language. This keyword can be used to disable section sorting.
  • A new linker-provided symbol, __ehdr_start, has been added. When producing ELF output, this symbol points to the ELF file header (and nearby program headers) in the program's memory image.
B.2.1.1.2. Compatibility Changes
The following compatibility changes have been made since the release of binutils included in Red Hat Enterprise Linux 6.8:
  • The --copy-dt-needed-entries command line option is no longer enabled by default. Instead, --no-copy-dt-needed-entries is now the default option.
  • Evaluation of linker script expressions has been significantly improved. Note that this can negatively affect scripts that rely on undocumented behavior of the old expression evaluation.

B.2.1.2. GNU Assembler

B.2.1.2.1. New Features
The following features have been added since the release of binutils included in Red Hat Enterprise Linux 6.8:
  • The GNU Assembler no longer requires double ampersands in macros.
  • A new --compress-debug-sections command line option has been added to enable compression of DWARF debug information sections in the relocatable output file. Compressed debug sections are currently supported by the readelf, objdump, and gold tools, but not by ld.
  • Support for .bundle_align_mode, .bundle_lock, and .bundle_unlock directives for x86 targets has been added..
  • On x86 architectures, the GNU Assembler now allows rep bsf, rep bsr, and rep ret syntax.

B.2.1.3. Other Binary Tools

B.2.1.3.1. New Features
The following features have been added since the release of binutils included in Red Hat Enterprise Linux 6.8:
  • The readelf and objdump tools can now display the contents of the .debug.macro sections.
  • New --dwarf-start and --dwarf-end command line options have been added to the readelf and objdump tools. These options are used by the new Emacs mode (see the dwarf-mode.el file).
  • A new --interleave-width command line option has been added to the objcopy tool to allow the use of the --interleave to copy a range of bytes from the input to the output.
  • A new --dyn-syms command line option has been added to the readelf tool. This option can be used to dump dynamic symbol table.
  • A new tool, elfedit, has been added to binutils. This tool can be used to directly manipulate ELF format binaries.
  • A new command line option --addresses (or -a for short) has been added to the addr2line tool. This option can be used to display addresses before function and source file names.
  • A new command line option --pretty-print (or -p for short) has been added to the addr2line tool. This option can be used to produce human-readable output.
  • Support for dwz -m optimized debug information has been added.
  • The devtoolset-2-binutils-devel package now provides the demangle.h header file.

B.2.2. Changes Since Red Hat Developer Toolset 4.0

The following features have been added since the release of binutils in Red Hat Developer Toolset 4.0:
  • Improved security achieved through more intensive checking of the integrity of the binary files examined by the binutils tools. Therefore, it is much harder to make these tools crash or to attempt to read memory that does not belong to them.