Skip to main content
Redhat Developers  Logo
  • AI

    Get started with AI

    • Red Hat AI
      Accelerate the development and deployment of enterprise AI solutions.
    • AI learning hub
      Explore learning materials and tools, organized by task.
    • AI interactive demos
      Click through scenarios with Red Hat AI, including training LLMs and more.
    • AI/ML learning paths
      Expand your OpenShift AI knowledge using these learning resources.
    • AI quickstarts
      Focused AI use cases designed for fast deployment on Red Hat AI platforms.
    • No-cost AI training
      Foundational Red Hat AI training.

    Featured resources

    • OpenShift AI learning
    • Open source AI for developers
    • AI product application development
    • Open source-powered AI/ML for hybrid cloud
    • AI and Node.js cheat sheet

    Red Hat AI Factory with NVIDIA

    • Red Hat AI Factory with NVIDIA is a co-engineered, enterprise-grade AI solution for building, deploying, and managing AI at scale across hybrid cloud environments.
    • Explore the solution
  • Learn

    Self-guided

    • Documentation
      Find answers, get step-by-step guidance, and learn how to use Red Hat products.
    • Learning paths
      Explore curated walkthroughs for common development tasks.
    • Guided learning
      Receive custom learning paths powered by our AI assistant.
    • See all learning

    Hands-on

    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.
    • Interactive labs
      Learn by doing in these hands-on, browser-based experiences.
    • Interactive demos
      Click through product features in these guided tours.

    Browse by topic

    • AI/ML
    • Automation
    • Java
    • Kubernetes
    • Linux
    • See all topics

    Training & certifications

    • Courses and exams
    • Certifications
    • Skills assessments
    • Red Hat Academy
    • Learning subscription
    • Explore training
  • Build

    Get started

    • Red Hat build of Podman Desktop
      A downloadable, local development hub to experiment with our products and builds.
    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.

    Download products

    • Access product downloads to start building and testing right away.
    • Red Hat Enterprise Linux
    • Red Hat AI
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Featured

    • Red Hat build of OpenJDK
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat Developer Toolset

    References

    • E-books
    • Documentation
    • Cheat sheets
    • Architecture center
  • Community

    Get involved

    • Events
    • Live AI events
    • Red Hat Summit
    • Red Hat Accelerators
    • Community discussions

    Follow along

    • Articles & blogs
    • Developer newsletter
    • Videos
    • Github

    Get help

    • Customer service
    • Customer support
    • Regional contacts
    • Find a partner

    Join the Red Hat Developer program

    • Download Red Hat products and project builds, access support documentation, learning content, and more.
    • Explore the benefits

Fall 2017 GNU Toolchain Update Part 4

November 3, 2017
Nick Clifton
Related topics:
Developer tools
Related products:
Red Hat OpenShift

    (Part 4)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.

    GLIBC

    Version 2.26 is now out. There are loads of new features and bug fixes in this release. Some of the highlights 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. Performance
      measurements show significant gains in a variety of user workloads. Workloads were captured using a specially instrumented malloc and analyzed with a malloc simulator.
    • Unicode 10.0.0 Support.
    • 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.

    For the full announcement see: https://sourceware.org/ml/libc-alpha/2017-08/msg00010.html

    GCC

    GCC is currently in stage 1 and open with all kinds of exciting new features. Here are some that have made it in already:

    • -fstd=c++2a
      Enables support for the next revision of the ISO C++ standard, tentatively planned for 2020. Support is highly experimental, and will almost certainly be in incompatible ways in future releases.
    • -Wsuggest-attribute=cold
      Warn about functions that might be candidates for the (cold) attribute. This is based on static detection and generally will only warn about functions which always leads to a call to another cold function such as wrappers of C++ throw or fatal error reporting functions leading to abort.
    • -Wcast-align=strict
      Warn whenever a pointer is cast such that the required alignment of the target is increased. For example, warn if a "char *" is cast to an "int *" regardless of the target machine.
    • -fstack-clash-protection
      Generate code to prevent stack clash style attacks. When this option is enabled, the compiler will only allocate one page of stack space at a time and each page is accessed immediately after allocation. Thus, it prevents allocations from jumping over any stack guard page provided by the operating system.
      Most targets do not fully support stack clash protection. However, on those targets, the option will protect dynamic stack allocations. The option may also provide limited protection for static stack allocations if the target supports the -fstack-check=specific option.
    • -fsanitize=pointer-overflow
      This option enables instrumentation of pointer arithmetic. If the pointer arithmetic overflows, a run-time error is issued.
    • -fsanitize=builtin
      This option enables instrumentation of arguments to selected built-in functions. If an invalid value is passed to such arguments, a run-time error is issued. E.g. passing 0 as the argument to __builtin_ctz or __builtin_clz invokes undefined behavior and is diagnosed by this option.
    • -fcf-protection=[full]
      Enable code instrumentation of control-flow transfers to increase program security by checking that target addresses of control-flow transfer instructions (such as indirect function calls, function returns, and indirect jump) are valid. This prevents diverting the flow of control to an unexpected target. This is intended to protect against such threats as Return-oriented Programming (ROP), and similarly call/jmp-oriented programming (COP/JOP).
    • -fpatchable-function-entry=<N>[,<M>]
      Generate <N> NOPs right at the beginning of each function, with the function entry point before the <M>th NOP. If <M> is omitted, it defaults to 0 so the function entry points to the address just at the first NOP.
      The NOP instructions reserve extra space, which can be used to patch in any desired instrumentation at runtime if the code segment is writeable.
      For run-time identification, the starting addresses of these areas, which correspond to their respective function entries minus <M>, are additionally collected in the __patchable_function_entries section of the resulting binary.
    • -static-pie
      Produce a static position independent executable on targets that support it. A static position independent executable is similar to a static executable but can be loaded at any address without a dynamic linker. For predictable results, you must specify the same set of options used for compilation (-fpie, -fPIE, or model suboptions) when you specify this linker option.

    There is also a new variable attribute:

    • nonstring
      This specifies that an object or member declaration with type array of "char" or pointer to "char" is intended to store character arrays that do not necessarily contain a terminating NUL character. This is useful to avoid warnings when such an array or pointer is used as an argument to a bounded string manipulation function such as strncpy. For example without the attribute this code:struct Data
      {
        char name [32] __attribute__ ((nonstring));
      };
      void f (struct Data * pd, const char * s)
      {
        strncpy (pd->name, s, sizeof pd->name);
      } would produce a warning about the call to strncpy not producing a terminated string.

    Binutils

    Version 2.29.1 has been released. This is just a point release over the original 2.29 release, but it does include some important bug fixes, especially for x86_64 and PowerPC.

    In the development sources, support for the command line option "-z globalaudit" has been added. This forces audit library to be run for every dynamic object loaded by an executable - if the loader supports this functionality.

    Also, the EXCLUDE_FILE linker script directive can now be placed within any of the SORT_* directives, to partition files out of the sort.

    The x86_64 assembler adds support for the GFNI, VAES, VPCLMULQDQ, AVX512_VBMI2, AVX512_VNNI, AVX512_BITALG, NOAVX512_VBMI2, NOAVX512_VNNI, and NOAVX512_BITALG extensions to the instruction set.

    The PowerPC assembler now has support for the Freescale SPE2 instructions.

    GDB

    • GDB now supports access to the guarded-storage-control registers and the software-based guarded-storage broadcast control registers on IBM z14.* On Unix systems, GDB now supports transmitting environment variables that are to be set or unset to GDBserver. These variables will affect the environment to be passed to the remote inferior.
    • GDB no longer assumes functions with no debug information return 'int'.
      This means that GDB now refuses to call such functions unless you tell it the function's type, by either casting the call to the declared return type, or by casting the function to a function pointer of the right type, and calling that:(gdb) p getenv ("PATH")
      'getenv' has unknown return type; cast the call to its declared return type
      (gdb) p (char *) getenv ("PATH")
      $1 = 0x7fffffffe "/usr/local/bin:/"...Similarly, GDB no longer assumes that global variables with no debug info have type 'int', and refuses to print the variable's value unless you tell it the variable's type:(gdb) p var
      'var' has unknown type; cast it to its declared type
      (gdb) p (float) var
      $3 = 3.14
    • Support for ARM and AArch64 on FreeBSD has been added.

    Join the Red Hat Developer Program (it’s free) and get access to related cheat sheets, books, and product downloads.


    Take advantage of your Red Hat Developers membership and download RHEL today at no cost.

    Last updated: April 3, 2023

    Recent Posts

    • Testing infrastructure red teaming with abliterated models

    • Build an enterprise RAG system with OGX

    • Solutions for SELinux MCS challenges with GitLab runners

    • MCP servers vs. skills: Choosing the right context for your AI

    • How to route external and local LLMs with Models-as-a-Service

    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Platforms

    • Red Hat AI
    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Build

    • Developer Sandbox
    • Developer tools
    • Interactive tutorials
    • API catalog

    Quicklinks

    • Learning resources
    • E-books
    • Cheat sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site status dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2026 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Chat Support

    Please log in with your Red Hat account to access chat support.