binutils Newspaper
OCTOBER 6, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
PE+ Performance Win

PE+ linker: Remove unused stdcall fixup machinery

Dead code related to stdcall calling convention fixups removed from the PE+ linker.

The PE+ (Portable Executable for 64-bit) linker has had its stdcall fixup machinery removed. This code was dead as Win64 has a single calling convention and never uses stdcall decorations. Removing it eliminates quadratic complexity in symbol table traversals and simplifies the linker code.

In Details

This commit removes the pep_enable_stdcall_fixup, pep_undef_found_sym, pep_undef_cdecl_match, set_decoration, and pep_fixup_stdcalls functions from ld/emultempl/pep.em. This machinery was intended to handle stdcall naming conventions (e.g., _function@4), which are specific to 32-bit Windows. Since Win64 uses a single calling convention, these fixups were never applicable and thus dead code. The commit also ensures that command-line options related to stdcall fixups are still parsed but ignored for PE+ targets, maintaining backward compatibility for existing command lines.

For Context
PE+
Portable Executable format for 64-bit Windows executables, DLLs, and object files.
stdcall
A calling convention used in 32-bit Windows, where function arguments are pushed onto the stack from right to left, and the callee cleans up the stack. Function names are often decorated with '@' and the number of bytes for arguments (e.g., _FunctionName@12).
Win64
The 64-bit version of the Microsoft Windows operating system.
calling convention
A set of rules for how functions pass parameters and return values, determining stack usage, register allocation, and name decoration.
linker
A program that combines object files and libraries into a single executable or library, resolving external references.
Filed Under: linkerwindowspe+cleanup