Skip to content

Fix reproducible Windows build by stripping COFF symbol table#2084

Merged
edouardparis merged 1 commit intowizardsardine:masterfrom
edouardparis:fix-windows-repro-because-coff
Apr 9, 2026
Merged

Fix reproducible Windows build by stripping COFF symbol table#2084
edouardparis merged 1 commit intowizardsardine:masterfrom
edouardparis:fix-windows-repro-because-coff

Conversation

@edouardparis
Copy link
Copy Markdown
Member

The GNU linker appends a COFF symbol table to the PE binary containing auxiliary symbol data (sizes, section offsets) that depends on compilation ordering. Since Rust/LLVM processes codegen units in parallel, this metadata varies between builds even with identical inputs.

The COFF symbol table is not used at runtime (Windows ignores it) and modern debugging uses separate PDB files instead. Stripping it with --strip-all removes the non-deterministic data and also reduces binary size significantly

The GNU linker appends a COFF symbol table to the PE binary
containing auxiliary symbol data (sizes, section offsets) that depends on
compilation ordering. Since Rust/LLVM processes codegen units in
parallel, this metadata varies between builds even with identical inputs.

The COFF symbol table is not used at runtime (Windows ignores it) and
modern debugging uses separate PDB files instead. Stripping it with
--strip-all removes the non-deterministic data and also reduces binary
size significantly
@pythcoiner
Copy link
Copy Markdown
Collaborator

pythcoiner commented Apr 9, 2026

utACK 6feeaea cross-checked hash of windows binaries w/ @edouardparis after build on my machine

@edouardparis edouardparis merged commit 1f68263 into wizardsardine:master Apr 9, 2026
13 checks passed
edouardparis added a commit that referenced this pull request Apr 9, 2026
…table

cf7a17e Fix reproducible Windows build by stripping COFF symbol table (edouardparis)

Pull request description:

  The GNU linker appends a COFF symbol table to the PE binary containing auxiliary symbol data (sizes, section offsets) that depends on compilation ordering. Since Rust/LLVM processes codegen units in parallel, this metadata varies between builds even with identical inputs.

  The COFF symbol table is not used at runtime (Windows ignores it) and modern debugging uses separate PDB files instead. Stripping it with --strip-all removes the non-deterministic data and also reduces binary size significantly

  this is a backport of #2084

ACKs for top commit:
  edouardparis:
    Self-ACK cf7a17e

Tree-SHA512: bde59b68b2c6970b446ac5441799e5e586e3b51901037f97e125f4047c4154c98bb849e7846dc418b325c41b7a47161625368ba0033e39f11191edc6b16ceea0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants