[PATCH] ld: pep: Stop emitting reference to the pseudo-relocator function
Project / Subsystem
binutils / ld
Date
2026-07-02
Proposer
Jon Turney <jon.turney@dronecode.org.uk>
Source type
public_inbox
Consensus
Proposed
Sentiment
—/10
Technical tradeoffs
- • Removing the reference simplifies the Cygwin runtime by eliminating a dummy stub.
- • Maintaining the reference for i386 targets ensures backward compatibility with older runtimes.
- • Removing the reference entirely for future architectures like aarch64 allows for cleaner linker behavior without legacy constraints.
All attributes
- project
- binutils
- subsystem
- ld
- patch_id
- —
- discussion_id
- 20260702143816.23422-1-jon.turney@dronecode.org.uk
- source_type
- public_inbox
- title
- [PATCH] ld: pep: Stop emitting reference to the pseudo-relocator function
- headline
- ld: pep: Stop emitting reference to the pseudo-relocator function
- tldr
- Patch to stop the PE linker from emitting a reference to the _pei386_runtime_relocator function, simplifying Cygwin runtime and preparing for future architectu…
- proposer
- Jon Turney <jon.turney@dronecode.org.uk>
- consensus
- Proposed
- outcome
- proposed
- sentiment_score
- —
- technical_tradeoffs
-
- • Removing the reference simplifies the Cygwin runtime by eliminating a dummy stub.
- • Maintaining the reference for i386 targets ensures backward compatibility with older runtimes.
- • Removing the reference entirely for future architectures like aarch64 allows for cleaner linker behavior without legacy constraints.
- series_id
- —
- series_role
- standalone
- series_parts
- []
- tags
-
- • binutils
- • ld
- • PE
- • linker
- • runtime
- bugzilla_url
- —
- date
- 2026-07-02T00:00:00.000Z
[PATCH] ld: pep: Stop emitting reference to the pseudo-relocator function
Jon Turney proposes to stop the PE linker (ld) from emitting a reference to the _pei386_runtime_relocator function. This function currently exists as a non-functional stub in the Cygwin runtime solely to satisfy this linker-synthesized reference. While the MinGW runtime has actual content for this function, it’s already called explicitly at CRT startup. The patch aims to remove the confusing stub from the Cygwin runtime, especially as GCC prepares for future architectures like aarch64 where backwards compatibility concerns are less pressing. For PE+ targets, the reference will no longer be emitted, although it will be retained for i386 targets that might still require it for compatibility with older runtimes.