[PATCH 1/3] bfd/PE: fix debug section compression for pei-*

Project / Subsystem

binutils / bfd/pe

Date

2026-09-28

Proposer

Tobias Deiminger <tobias.deiminger@linutronix.de>

Source type

public_inbox

Consensus

Proposed

Sentiment

—/10

Technical tradeoffs

  • • Accurately verifying compressed debug sections requires careful management of size fields in the PE header, distinguishing between compressed, uncompressed, and file-on-disk sizes.
  • • Ensuring compatibility with debuggers like GDB necessitates correct implementation of decompression logic, especially when dealing with variations in PE section header fields.

All attributes

project
binutils
subsystem
bfd/pe
patch_id
—
discussion_id
20260928090146.4016188-2-tobias.deiminger@linutronix.de
source_type
public_inbox
title
[PATCH 1/3] bfd/PE: fix debug section compression for pei-*
headline
bfd/PE: fix debug section compression for pei-*
tldr
Fixes incorrect handling of compressed debug sections in PE image files (pei-*).
proposer
Tobias Deiminger <tobias.deiminger@linutronix.de>
consensus
Proposed
outcome
proposed
sentiment_score
—
technical_tradeoffs
  • • Accurately verifying compressed debug sections requires careful management of size fields in the PE header, distinguishing between compressed, uncompressed, and file-on-disk sizes.
  • • Ensuring compatibility with debuggers like GDB necessitates correct implementation of decompression logic, especially when dealing with variations in PE section header fields.
series_id
binutils:bfd/pe: fix debug section compression for pei-*
series_role
reply
series_parts
[]
tags
  • • binutils
  • • bfd
  • • pe
  • • debug
  • • compression
bugzilla_url
—
date
2026-09-28T00:00:00.000Z

[PATCH 1/3] bfd/PE: fix debug section compression for pei-*

Tobias Deiminger corrects a bug where compressing debug sections for PE image files (pei-*) did not work correctly in a full round trip. The issue arose from BFD incorrectly using the uncompressed size (VirtualSize) instead of the compressed size for decompression verification. The fix ensures the compressed size is used, and virt_size is updated only after successful decompression.