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.
    • 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

What's new in Libabigail 2.0

January 6, 2022
Dodji Seketeli
Related topics:
CompilersC, C#, C++Linux
Related products:
Red Hat Enterprise Linux

    Libabigail is a framework dedicated to analyzing changes to application binary interfaces (ABIs) in ELF binaries. Libabigail 2.0, the latest major release of the framework, was released in October of 2021.

    This article is a tour of the main changes delivered in this major release. You'll learn about changes to the core library to start, then move on to updates to specific ABI analysis tools and the library's licensing terms.

    New symbol table reader component

    The ELF/DWARF front end of the Libabigail core library was refactored to use a new ELF symbol table reader module. This new module was factorized out of the front end and designed as a standalone module in its own namespace, dubbed symtab_reader. That new namespace contains various components that collaborate to provide a consistent view over a symbol table that can be loaded and queried.

    One main feature of the new symtab_reader is that it transparently handles the different binary formats of symbol tables of the Linux kernel, as well as details like relocations, symbol namespaces, call frame information indirections, and differences between vmlinux binaries and kernel modules. It also incorporates Libabigail's existing support for the specifics of the PPC64 ELF symbol tables.

    symtab_reader is now used by the DWARF/ELF reader front end during the analysis of binaries, and enhances the maintainability of the code base as a whole.

    Correctness of type canonicalization

    One of the many constraints that Libabigail has to deal with is that ABI comparison has to be fast enough to be useful. In essence, however, comparing aggregate types of arbitrary size and depth is a quadratic problem, so naively attempting to compare types coming from real-life C or C++ binaries can literally take hours on the average workstation.

    Libabigail uses a certain number of heuristics to complete those type comparisons in a reasonable time. One of those heuristics is the type canonicalization optimization.

    Intuitively, the time taken by the comparison of two aggregate types of size N is proportional to N2—and that same amount of time is spent whenever those two types are compared. The goal of the type canonicalization optimization is to transform that N2 time back into a (relatively short) constant time. In terms of processing, the first comparison between those two types would still take a time proportional to N2; but all subsequent comparisons would then be performed in that shorter amount of time. This type canonicalization optimization is vital because slow comparisons can make the framework effectively unusable.

    In Libabigail 2.0, this optimization is more precise and robust. It now works better with anonymous types, and several general bugs have been addressed. The correctness of type change detection has thus been improved.

    Support for DWARF 5

    Support for version 5 of DWARF has been improved in Libabigail 2.0. As a consequence, binaries emitted by GCC 11 and Clang 13 that use DWARF 5 are now fairly well supported.

    Debugging and bug fixes

    A number of debugging primitives have been introduced to ease the inspection of the internal representation of types while debugging Libabigail using a debugger like GDB. This makes it significantly easier to debug issues that involve type representation in the framework.

    Several bugs have been fixed throughout the framework, leading to better support for ELF aliased symbols, improved support for multi-language binaries, improved filtering of data member offset changes, better sorting of anonymous types in ABIXML files, better handling of member functions changes in union types, and improved support for function parameter addition detection.

    Updates to abidw

    abidw now emits ABIXML files in a new format, dubbed version 2.0.

    Due to a change in the interpretation of DWARF 5's DW_AT_bit_offset attribute in this version of Libabigail, the value of the offset of data members might have changed in an incompatible way, which has driven the change in the ABIXML format. Libabigail can still read ABIXML files in the previous 1.0 format, though.

    Updates to abipkgdiff

    abipkgdiff should now properly show binary files that were either added to or removed from packages. It also stops erasing the working directory used for binary comparison before it's done using their content. The source code of this tool was fixed to prevent some compilation warnings.

    Updates to abidiff

    Libabigail 2.0 includes general bug fixes in abidiff. Data members are no longer qualified in diff reports. The --dump-diff-tree option now works in the leaf reporting mode.

    abidiff has also been modified to accommodate the ABIXML format change. abidiff will refuse to compare a file written ABIXML 1.0 against one written in ABIXML 2.0; the two files must have the same version number. Note that you can always regenerate an ABIXML 2.0 file from its originating ELF binary using the current abidw tool.

    Move to the Apache 2 license

    Libabigail's codebase is now licensed under the Apache 2 license, with the LLVM exception. It was previously licensed under version 3 of the LGPL. This license change means that the Libabigail library is now compatible with most copyleft and non-copyleft code, increasing the amount of the code that can use the Libabigail library to perform ABI analysis.

    Move to C++11

    Libabigail's source code is now written in C++11, at long last. As we need to make sure the framework builds on the Red Hat Enterprise Linux 7 platform, we intend to stick with C++11 for the rest of the expected lifetime of that platform—meaning at least until June of 2024. After that date, we'll consider moving the source base to a more modern version of the C++ language.

    Find out more about Libabigail 2.0

    We hope you enjoyed this tour of the changes in Libabigail 2.0. If you are interested in learning more about the project, you can get involved with our mailing list. Libabigail users and developers are also available on the irc.oftc.net IRC network, in the #libabigail channel. We'd be happy to see you there!

    Related Posts

    • How to write an ABI compliance checker using Libabigail

    • Changes made to the Libabigail ABI change analysis framework in 2018

    • Comparing ABIs for Compatibility with libabigail - Part 2

    • Comparing ABIs for Compatibility with libabigail - Part 1

    Recent Posts

    • Federated identity across the hybrid cloud using zero trust workload identity manager

    • Confidential virtual machine storage attack scenarios

    • Introducing virtualization platform autopilot

    • Integrate zero trust workload identity manager with Red Hat OpenShift GitOps

    • Best Practice Configuration and Tuning for Linux and Windows VMs

    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.