Summer 2017 GNU Toolchain Update
The GNU Toolchain is a collection of programming tools produced by the GNU Project. The tools are often packaged together due to their common use for developing software applications, operating systems, and low-level software for embedded systems.
This blog is part of a regular series covering the latest changes and improvements in the components that make up this Toolchain. Apart from the announcement of new releases, however, the features described here are at the bleeding edge of software development in the tools. This does mean that it may be a while before they make it into production releases, and they might not be fully functional yet. But anyone who is interested in experimenting with them can build their own copy of the Toolchain and then try them out.
Version 2.29 has been released.
In addition to previous changes already detailed in this blog, this release also contains:
- Support for placing sections into special memory areas on systems that use virtual memory managers. This is like the MEMORY command in linker scripts except for that only works on systems without a memory management unit.
- With the new system, sections can be marked as requiring a particular kind of special memory. The linker collects together all the sections with the same requirements and places them into a specially marked segment. The loader can then detect this segment’s requirements and ensure that the right kind of memory is used.
- Support for the WebAssembly file format and conversion to the wasm32 ELF format.
- The PowerPC assembler now checks that the correct register class is used in instructions.
- The ARM assemblers now support the ARMv8-R architecture and Cortex-R52 processors.
- The linker now supports ELF GNU program properties. These are run-time notes intended for the loader that tells it more about the binary that it is initializing.
- The linker contains support for Intel’s Indirect Branch Tracking (IBT) enhancement. This is a technology intended to help fight malicious code that abuses the stack to force unwanted behavior from a program. For more information see:
- Section groups can now be resolved (the group deleted and the group members placed like normal sections) at partial link time either using the new linker option –force-group-allocation or by placing FORCE_GROUP_ALLOCATION into the linker script.
- The MIPS port now supports:
+ MicroMIPS eXtended Physical Addressing (XPA) instructions.
+ Release 5 of the ISA.
+ Imagination interAptiv MR2 processor.
+ MIPS16e2 ASE for assembly and disassembly.
- The SPARC port now supports the SPARC M8 processor, which implements the Oracle SPARC Architecture 2017.
- Objdump’s –line-numbers option can now be augmented via the new –inlines option so that inlined functions will display their nesting information.
- Objcopy now has an option ‘–merge-notes‘ to reduce the size of notes in a binary file by merging and deleting redundant entries.
- The AVR assembler has support for the __gcc_isr pseudo-instruction. This instruction is generated by GCC when it wants to create the prologue or epilogue of an interrupt handler. The assembler then ensures that the most optimal code possible is generated.
Meanwhile in the mainline binutils sources:
- The assembler now has support for location views in DWARF debug line information. This is part of a project to help improve the source code location information that the compiler provides to the debugger:
Everything you need to grow your career.
With your free Red Hat Developer program membership, unlock our library of cheat sheets and ebooks on next-generation application development.SIGN UP
Version 8.0 has been released. This release contains:
- Support for C++ rvalue references.
- Python scripting enhancements:
+ New functions to start, stop and access a running btrace recording.
- GDB commands interpreter:
+ User commands now accept an unlimited number of arguments.
+ The “eval” command now expands user-defined arguments.
- DWARF version 5 support
- GDB/MI enhancements:
+ New -file-list-shared-libraries command to list the shared libraries in the program.
+ New -target-flash-erase command, to erase flash memory.
- Support for native FreeBSD/mips (mips*-*-freebsd)
- Support for the Synopsys ARC and FreeBSD/mips targets.
For a complete list and more details on each item, please see the gdb/NEWS file in the release sources.
Meanwhile, in the development sources the following new features have been added:
- On Unix systems, GDBserver now does the globbing expansion and variable substitution in inferior command line arguments.
- New commands
+ set debug separate-debug-file
+ show debug separate-debug-file
These control the display of debug output about separate debug file search.
Version 7.1 has been released. Most of the enhancements and new features in this release have already been reported in earlier versions of this blog, but there are a couple of new things that made it in before the deadline:
- A new loop splitting optimization pass has been added. Certain loops which contain a condition that is always true on one side of the iteration space and always false on the other are split into two loops, such that each of the two new loops iterates on just one side of the iteration space and the condition does not need to be checked inside of the loop.
- The PowerPC port’s support for ISA 3.0 has been enhanced to generate more of the new instructions by default and to provide more built-in functions to generate code for the other new instructions.
Meanwhile in the development sources:
- Support for the SPARC M8 processor has been added.
- The switches ‘-mfix-ut700‘ and ‘-mfix-gr712rc‘ options have been added to work around an erratum in LEON3FT SPARC processors.
- Several new warning options have been added as well:
+ The option ‘-Wmultistatement-macros‘ warns about unsafe multiple statement macros that appear to be guarded by a clause in which only the first statement is actually protected. For example:
#define DOIT x++; y++
if (c) DOIT;
+ The option ‘-Wsizeof-pointer-div‘ warns about suspicious divisions of two size of expressions that divide a pointer size by an element size when the object concerned is a pointer, not an array. For example:
int a = sizeof (ptr) / sizeof (ptr);
Work on version 2.26 continues. New features that have been added include:
- A per-thread cache has been added to malloc. Access to the cache requires no locks and therefore significantly accelerates the fast path to allocate and free small amounts of memory. Refilling an empty cache requires locking the underlying arena, but the performance improvements are still significant.
- Unicode 10.0.0 Support: Character encoding, character type info, and transliteration tables are all updated to the Unicode 10.0.0 standard.
- Improvements to the DNS stub resolver:
+ The GNU C Library will now detect when /etc/resolv.conf has been modified and reload the changed configuration.
+ The GNU C Library now supports an arbitrary number of search domains (configured using the “search” directive in /etc/resolv.conf).
+ When the “rotate” (RES_ROTATE) resolver option is active, the GNU C Library will now randomly pick a name server from the configuration as a starting point.
- The tunables feature is now enabled by default. This allows users to tweak the behavior of the GNU C Library using the GLIBC_TUNABLES environment variable.
- New function reallocarray, which resizes an allocated block (like realloc) to the product of two sizes, with a guaranteed clean failure upon integer overflow in the multiplication.
- New wrappers for the Linux-specific system calls preadv2 and pwritev2. These are extended versions of preadv and pwritev, respectively, taking an additional flags argument. The set of supported flags depends on the running kernel; full support currently requires kernel 4.7 or later.
- posix_spawnattr_setflags now supports the flag POSIX_SPAWN_SETSID, to create a new session ID for the spawned process.
- errno.h is now safe to use from C-preprocessed assembly language on all supported operating systems. In this context, it will only define the Exxxx constants, as preprocessor macros expanding to integer literals.
- On ia64, powerpc64le, x86-32, and x86-64, the math library now implements 128-bit floating point as defined by ISO/IEC/IEEE 60559:2011 (IEEE 754-2008) and ISO/IEC TS 18661-3:2015.
That’s it for this time. More in the fall…
Build your first app with native GCC on RHEL 6 or 7.