binutils Newspaper
OCTOBER 6, 2026
binutils/testsuite — Proposed

binutils/testsuite: test compress-debug-info round trip

Adds a test case to verify debug info compression and decompression in Binutils.

Tobias Deiminger introduces a new test case for the binutils test suite designed to verify the round-trip process of compressing and decompressing debug information. The test generates object files for various BFD target formats, compresses their debug sections, and then verifies the debug info using objdump --dwarf=info both before and after decompression, aiming for broad coverage across different targets.

In the Thread 1 participant
  1. Tobias Deiminger proposer

    Adds a comprehensive test case to the binutils test suite to validate the compress/decompress round trip for debug information across multiple BFD targets.

    “This adds a new test case that basically runs target_cc testprog.c testprog for every enabled BFD target objcopy -I <host> -O <target> testprog # reformat to target objcopy --compress-debug-sections # compress objdump --dwarf=info # main()/fn() info expected objcopy --decompress-debug-sections # decompress objdump --dwarf=info # m…”

In Details

This patch adds a new test case to the binutils testsuite (binutils-all/compress.exp) that thoroughly exercises the debug section compression and decompression functionality for various BFD target formats. It involves generating test programs, reformatting them to different targets using objcopy, applying --compress-debug-sections, and then verifying the integrity of DWARF debug information using objdump --dwarf=info both pre- and post-decompression. This test is crucial for ensuring the reliability of debug information handling, especially when combined with the bug fixes in the acco…

For Context
binutils testsuite
A collection of automated tests used to verify the correct functionality of the GNU Binutils suite of tools.
compress-debug-info round trip
The process of compressing debug information within an executable, then decompressing it, and verifying that the original debug information is preserved.
BFD target formats
The various executable and object file formats that the Binary File Descriptor (BFD) library supports, such as ELF, COFF, PE, etc.
objdump
A GNU Binutils utility that displays information from object files, including symbol tables, section headers, and disassembly.
DWARF
Debugging With Attributed Record Formats, a standardized, widely used format for debugging information embedded in executable files.
Filed Under: binutilstestsuitedebugcompressiondwarf