[PATCH 2/3] bfd/PE: fix bigobj file corruption on objcopy

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

  • • Correcting `pe-bigobj` file corruption necessitates accepting minor information loss regarding flags and start addresses, as the format fundamentally cannot represent this data.
  • • Ensuring `_bfd_aoutsz` is zero and `EXEC_P` is unset prevents invalid output but requires careful handling to avoid breaking other PE-related functionalities.

All attributes

project
binutils
subsystem
bfd/pe
patch_id
—
discussion_id
20260928090146.4016188-3-tobias.deiminger@linutronix.de
source_type
public_inbox
title
[PATCH 2/3] bfd/PE: fix bigobj file corruption on objcopy
headline
bfd/PE: fix bigobj file corruption on objcopy
tldr
Fixes corruption in PE bigobj files created by objcopy.
proposer
Tobias Deiminger <tobias.deiminger@linutronix.de>
consensus
Proposed
outcome
proposed
sentiment_score
—
technical_tradeoffs
  • • Correcting `pe-bigobj` file corruption necessitates accepting minor information loss regarding flags and start addresses, as the format fundamentally cannot represent this data.
  • • Ensuring `_bfd_aoutsz` is zero and `EXEC_P` is unset prevents invalid output but requires careful handling to avoid breaking other PE-related functionalities.
series_id
binutils:bfd/pe: fix bigobj file corruption on objcopy
series_role
reply
series_parts
[]
tags
  • • binutils
  • • bfd
  • • pe
  • • objcopy
  • • corruption
bugzilla_url
—
date
2026-09-28T00:00:00.000Z

[PATCH 2/3] bfd/PE: fix bigobj file corruption on objcopy

Tobias Deiminger addresses a bug where converting to pe-bigobj-* formats using objcopy silently corrupted section headers. The issue stemmed from incorrect handling of f_opthdr, _bfd_aoutsz, and EXEC_P flags, leading to invalid gaps in the file. The fix ensures _bfd_aoutsz is zero and EXEC_P is unset for bigobj formats, accepting minor information loss for format correctness.