binutils Newspaper
NOVEMBER 30, 2026
bfd — Proposed

bfd: Add a PE short import library writer [PR34527]

Adds a new BFD function to create compact PE/COFF short import libraries.

This patch introduces a new function to the BFD library that can write PE/COFF short import libraries. These libraries are more compact than the traditional format and are compatible with tools like GNU ld, MSVC lib, and llvm-dlltool. This functionality is crucial for improving the efficiency of import library generation within the GNU toolchain.

In Details

Adds bfd_pe_write_short_import_library to BFD's PE/COFF support. This function generates import libraries using a compact format where each export has a short record on disk. It leverages existing archive map code for symbol indexing and includes necessary objects for import descriptors, DLL names, and thunks. Support is currently limited to i386 and x86-64, with a design allowing for future expansion to other architectures like aarch64.

For Context
BFcache
A library within binutils that provides an abstraction for reading and writing object file formats.
PE/COFF
Portable Executable/Common Object File Format, the standard file format for executables, object code, and DLLs in 32-bit and 64-bit Windows operating systems.
Import library
A library that contains information about functions and variables exported by a DLL. It allows programs to link against DLLs without explicitly calling loading functions.
GNU ld
The GNU linker, responsible for combining object files and libraries into an executable or library.
Filed Under: binutilsbfdPE/COFFimport library