binutils Newspaper
OCTOBER 6, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
ld

Align PDB DBI source-info substream to 4 bytes

Linker ensures PDB DBI source-info substream is 4-byte aligned.

The linker now ensures that the PDB DBI source-info substream is aligned to a 4-byte boundary, zeroing any padding bytes. This change aligns the linker’s output with PDB format specifications, improving compatibility with debugging tools.

In Details

The ld linker's PDB writer in pdb.c has been updated to ensure the source_info_substream size is a multiple of 4, with padding bytes zeroed. This adheres to the PDB format's invariant for DBI substreams, as documented in Microsoft's pdb-rs repository. A test case was extended to verify this alignment.

For Context
ld
The standard Unix linker, responsible for combining object files and libraries into an executable or shared library.
PDB
Program Database, a file format used by Microsoft compilers and debuggers to store information about program executables, including symbol tables and debugging information.
DBI
Debug Information, a component within PDB files that stores detailed debugging information.
substream
A distinct, logically grouped section of data within a larger file format, such as a PDB file.
Filed Under: ldpdbdebuginfowindows