[PATCH] ld/pdb: Report failures to write the PDB file

Project / Subsystem

binutils / ld/pdb

Date

2026-09-30

Proposer

Oleg Tolmatcev <oleg.tolmatcev@gmail.com>

Source type

public_inbox

Consensus

Proposed

Sentiment

—/10

All attributes

project
binutils
subsystem
ld/pdb
patch_id
—
discussion_id
20260930193657.733-10-oleg.tolmatcev@gmail.com
source_type
public_inbox
title
[PATCH] ld/pdb: Report failures to write the PDB file
headline
ld/pdb: Report PDB write failures
tldr
Ensures linker reports errors when writing PDB files, preventing silent failures.
proposer
Oleg Tolmatcev <oleg.tolmatcev@gmail.com>
consensus
Proposed
outcome
proposed
sentiment_score
—
technical_tradeoffs
[]
series_id
—
series_role
standalone
series_parts
[]
tags
  • • pdb
  • • linker
  • • debugging
  • • error handling
  • • bugfix
bugzilla_url
—
date
2026-09-30T00:00:00.000Z

[PATCH] ld/pdb: Report failures to write the PDB file

This patch modifies the linker’s PDB writing process to check the return value of bfd_close. Previously, errors during the closing and writing of PDB streams were ignored, leading to truncated files and successful exits. The change adds a warning message when bfd_close fails, ensuring that write errors are reported to the user.