Skip to main content
Redhat Developers  Logo
  • Products

    Featured

    • Red Hat Enterprise Linux
      Red Hat Enterprise Linux Icon
    • Red Hat OpenShift AI
      Red Hat OpenShift AI
    • Red Hat Enterprise Linux AI
      Linux icon inside of a brain
    • Image mode for Red Hat Enterprise Linux
      RHEL image mode
    • Red Hat OpenShift
      Openshift icon
    • Red Hat Ansible Automation Platform
      Ansible icon
    • Red Hat Developer Hub
      Developer Hub
    • View All Red Hat Products
    • Linux

      • Red Hat Enterprise Linux
      • Image mode for Red Hat Enterprise Linux
      • Red Hat Universal Base Images (UBI)
    • Java runtimes & frameworks

      • JBoss Enterprise Application Platform
      • Red Hat build of OpenJDK
    • Kubernetes

      • Red Hat OpenShift
      • Microsoft Azure Red Hat OpenShift
      • Red Hat OpenShift Virtualization
      • Red Hat OpenShift Lightspeed
    • Integration & App Connectivity

      • Red Hat Build of Apache Camel
      • Red Hat Service Interconnect
      • Red Hat Connectivity Link
    • AI/ML

      • Red Hat OpenShift AI
      • Red Hat Enterprise Linux AI
    • Automation

      • Red Hat Ansible Automation Platform
      • Red Hat Ansible Lightspeed
    • Developer tools

      • Red Hat Trusted Software Supply Chain
      • Podman Desktop
      • Red Hat OpenShift Dev Spaces
    • Developer Sandbox

      Developer Sandbox
      Try Red Hat products and technologies without setup or configuration fees for 30 days with this shared Openshift and Kubernetes cluster.
    • Try at no cost
  • Technologies

    Featured

    • AI/ML
      AI/ML Icon
    • Linux
      Linux Icon
    • Kubernetes
      Cloud icon
    • Automation
      Automation Icon showing arrows moving in a circle around a gear
    • View All Technologies
    • Programming Languages & Frameworks

      • Java
      • Python
      • JavaScript
    • System Design & Architecture

      • Red Hat architecture and design patterns
      • Microservices
      • Event-Driven Architecture
      • Databases
    • Developer Productivity

      • Developer productivity
      • Developer Tools
      • GitOps
    • Secure Development & Architectures

      • Security
      • Secure coding
    • Platform Engineering

      • DevOps
      • DevSecOps
      • Ansible automation for applications and services
    • Automated Data Processing

      • AI/ML
      • Data Science
      • Apache Kafka on Kubernetes
      • View All Technologies
    • Start exploring in the Developer Sandbox for free

      sandbox graphic
      Try Red Hat's products and technologies without setup or configuration.
    • Try at no cost
  • Learn

    Featured

    • Kubernetes & Cloud Native
      Openshift icon
    • Linux
      Rhel icon
    • Automation
      Ansible cloud icon
    • Java
      Java icon
    • AI/ML
      AI/ML Icon
    • View All Learning Resources

    E-Books

    • GitOps Cookbook
    • Podman in Action
    • Kubernetes Operators
    • The Path to GitOps
    • View All E-books

    Cheat Sheets

    • Linux Commands
    • Bash Commands
    • Git
    • systemd Commands
    • View All Cheat Sheets

    Documentation

    • API Catalog
    • Product Documentation
    • Legacy Documentation
    • Red Hat Learning

      Learning image
      Boost your technical skills to expert-level with the help of interactive lessons offered by various Red Hat Learning programs.
    • Explore Red Hat Learning
  • Developer Sandbox

    Developer Sandbox

    • Access Red Hat’s products and technologies without setup or configuration, and start developing quicker than ever before with our new, no-cost sandbox environments.
    • Explore Developer Sandbox

    Featured Developer Sandbox activities

    • Get started with your Developer Sandbox
    • OpenShift virtualization and application modernization using the Developer Sandbox
    • Explore all Developer Sandbox activities

    Ready to start developing apps?

    • Try at no cost
  • Blog
  • Events
  • Videos

October/November 2015 GNU Toolchain Update

December 7, 2015
Nick Clifton
Related topics:
Developer Tools
Related products:
Developer Tools

Share:

    Hi Everyone,

    Welcome to a new blog about changes and new features in the GNU toolchain (compiler, assembler, linker and debugger).  My intention is to post monthly updates highlighting what is new in these tools so that developers can keep abreast of the developing technologies.  This first post covers changes made to the development versions tools in October and November of this year.  Earlier posts in this series can be found in my live journal blog here, but future posts will continue on this site.

    Note - these features have not yet made it into released products like Fedora or RHEL, so if you want to play with them now, you will have to download the sources from the FSF and build your own toolchain.

    So, here are the highlights:

    • The GCC mainline sources are now in Stage 3 (bug fixes only) which means that a branch for the version 6 release will be happening soon.
    • The Binutils sources have branched, getting ready for a 2.26 release soon.

    Here are some new compiler features that may be of interest:

    • The compiler and assembler now have support for the ARC EM/HS and ARC600/700 architectures and the Power9 variant of the PowerPC architecture.
    • GCC's named address space feature has been extended to add address spaces for the x86 architecture.  Here variables may be declared as being relative to the %fs or %gs segments using the __seg_fs and __seg_gs attributes.  Alternatively if one of these segments is used for thread local storage then the __seg_tls attribute can be used access the correct segment.
    • GCC's function attribute feature has been extended to support another attribute: target_clones (<options>).  This is used to specify that a function is to be cloned into multiple versions compiled with different target options than specified on the command line.  The supported options and restrictions are the same as for target attribute.
      For instance on an x86, you could compile a function with target_clones("sse4.1,avx").   It will create 2 function clones, one compiled with -msse4.1 and another with -mavx.  At the function call it will create resolver ifunc, that will dynamically call a clone suitable for current architecture.
    • A new type attribute has been added to specify the endianness of the fields in a struct, union or array: scalar_storage_order ("<endianness>").  This attribute sets the storage order, aka endianness, of the scalar fields of the type to either "big-endian" or "little-endian".  The attribute has no effects on fields which are themselves a union, a struct or an array whose component is a union or a struct, and it is possible to have fields with a different scalar storage order than the enclosing type. Additional restrictions are enforced for types with the reverse scalar storage order with regard to the scalar storage order of the target:
      • Taking the address of a scalar field of a union or a struct with reverse scalar storage order is not permitted and will yield an error.
      • Taking the address of an array field, whose component is scalar, of a union or a struct with reverse scalar storage order is permitted but will yield a warning, unless the option  -Wno-scalar-storage-order is specified.
      • Taking the address of a union or a struct with reverse scalar storage order is permitted.

    These restrictions exist because the storage order attribute is lost when the address of a scalar or the address of an array with scalar component is taken, so storing indirectly through this address will generally not work.  The second case is nevertheless allowed to be able to perform a block copy from or to the array.

    • A new warning option: -Wduplicated-cond will produce messages whenever a condition is duplicated in an if-else-if chain.  The warning is enabled with -Wall.  It will for example warn about:

    if (p->q != NULL) { ... }
    else if (p->q != NULL) { ... }

    • A new option: -fkeep-static-functions will make sure that gcc will generate code for static functions that are never used.
    • The block reordering optimization in gcc can now be tuned via the option: -freorder-blocks-algorithm=<simple|stc>.  The default for optimization levels below -O2 (or at -Os) is the simple algorithm  which does not increase code size.  The new stc algorithm stands for "software trace cache" and it tries to put all often executed code together, minimizing the number of branches executed by making extra copies of code.
    • The ARM backend supports a new option: -mlow-precision-recip-sqrt which uses two steps instead of three for double-precision reciprocal square root calculations.  (It also uses one step instead of two steps for single-precision calculations).  This reduces the latency and precision of the operation.
    • The x86 and x86_64 backends support a new option: -mms-bitfields This enables a bit-field layout compatible with the native Microsoft Windows compiler.   This option is enabled by default for Windows targets.
    • The x86 and x86_64 backends also support the new option: -mmitigate-rop.  This tries to avoid generating code sequences that contain unintended return opcodes, to mitigate against certain forms of attack.  At the moment, this option is limited in what it can do and should not be relied on to provide serious protection.

    The binary tools have some new features as well:

    • The assembler and linker now support a configure time option to enable the automatic compression of debug sections.  This is off by default, but after the next release of the binutils, it will be switched on by default for some targets.
    • The linker supports a new ARM specific command line option: --fix-stm32l4xx-629360.  This enables a link-time workaround for a bug in the bus matrix / memory controller for some of the STM32 Cortex-M4 based products (STM32L4xx).
    • The objcopy program now has the ability to insert new symbols into an object file or executable.  It is controlled by the option: --add-symbol <name>=[<section>:]<value>[,<flags>].
      This adds a new symbol called <name>.  If the <section> is given, the symbol will be associated with and relative to that section, otherwise it will be an absolute symbol.  Symbol flags can be specified as well although not all flags will be meaningful for all object file formats.  The special flag before=<othersym> will insert the new symbol in front of the specified <othersym>, otherwise the symbol(s) will be added at the end of the symbol table in the order they appear.
    • The MSP430 port of gas accepts a new command line option to control workarounds for various silicon errata: -msilicon-errata=<name>[,<name>...].  This option enables the specified workarounds, but does not produce any informative output for the user when it does so.  The related option: -msilicon-errata-warn=<name>[,<name>...] can be used to produce warning messages whenever a situation where a silicon errata might be valid is encountered by the assembler.
    • The x86/x86_64 linkers now support a command line option to specify the byte to be used as padding when transforming an indirect call to a locally defined function 'foo' into a call via its GOT slot:

    -z call-nop=prefix-addr    generates: "0x67 call foo"
    -z call-nop=prefix-nop     generates: "0x90 call foo"
    -z call-nop=suffix-nop     generates: "call foo 0x90"
    -z call-nop=prefix-<byte>  generates: "<byte> call foo"
    -z call-nop=suffix-<byte>  generates: "call foo <byte>"

    And in the debugger we have:

    • GDB's record instruction-history command accepts a new modifier: /s. This behaves exactly like the /m modifier and prints mixed source and disassembly into the history.
    • GDB now supports displaced stepping on AArch64 GNU/Linux.

     

     

     

     

    Recent Posts

    • Ollama or vLLM? How to choose the right LLM serving tool for your use case

    • How to build a Model-as-a-Service platform

    • How Quarkus works with OpenTelemetry on OpenShift

    • Our top 10 articles of 2025 (so far)

    • The benefits of auto-merging GitHub and GitLab repositories

    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Products

    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform

    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
    © 2025 Red Hat

    Red Hat legal and privacy links

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

    Report a website issue