Re: [PATCH] ld: pep: Stop emitting reference to the pseudo-relocator function

LIU Hao <[email protected]>
Newsgroups gmane.comp.gnu.mingw.w64.general,gmane.comp.gnu.binutils
Message-ID <[email protected]>
在 2026-7-2 22:38, Jon Turney 写道:
> The exported _pei386_runtime_relocator function currently only exists as
> a non-functional stub in the Cygwin runtime, merely to satisfy this
> reference synthesized in ld [1].
> 
> The function still has contents in the MinGW runtime [2], but is already
> referenced by being explcitly called at crt startup/dll load.
> 
> We'd like to drop the (slightly confusing) stub from the Cygwin runtime,
> especially in possible future architectures (e.g aarch64), where
> backwards compatibilty concerns don't exist.
> 
> So, for PE+ targets, stop explicitly emitting a reference to
> _pei386_runtime_relocator in the linker.
> 
> (The archeological record is unclear why this functionality exists in
> ld.
> 
> Since --enable-runtime-pseudo-reloc-v1 exists for 32-bit PE arches, and
> out of an abundance of caution, keep emitting it for those targets (i.e.
> i386) where it conceivably might still be needed or useful with an
> ancient runtime.)
> 
> Cc'ed to mingw-w64-public list.
> 
> [1] https://cygwin.com/cgit/newlib-cygwin/tree/winsup/cygwin/lib/pseudo-reloc-dummy.c
> [2] https://sourceforge.net/p/mingw-w64/mingw-w64/ci/master/tree/mingw-w64-crt/crt/pseudo-reloc.c#l479
> 
> Signed-off-by: Jon Turney <[email protected]>
> Cc: [email protected]
>
AFAICT there's no reason to keep it. Even the original MinGW.org code calls it explicitly:

https://sourceforge.net/p/mingw/mingw-org-wsl/ci/5.1-trunk/tree/mingwrt/crt1.c#l343


-- 
Best regards,
LIU Hao

_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
OpenPGP_signature.asc (application/pgp-signature, 840 B)
-----BEGIN PGP SIGNATURE-----

wsF5BAABCAAjFiEEYmSQWY4DEzq4FUs4hfveZl3ogBsFAmpGfeoFAwAAAAAACgkQhfveZl3ogBsC
ZA/9HKVrsDGU3n1y92pfV5te+BG9hyEKADGZkfp6lS4VH0svvifaRy3shvtSUOk8dtu7HG21lQXU
Ep98SxRpaXM9I/84Gt6sfCOL8JbZXpmWLb3Baw/H9oCmjnBhxO/bbKJwuXxH584OzIjzm42JxAUV
KP4gd4zW5yJg9Rk0BRTvpaGODakI7iCNxM3de9uRWs9BtHJPM6iWzb4oOQS89yx5+w2B4Qyc/e3M
JOBcneT1tIjzD/vydiAXD7lEyQ7FwhsYyP87DCcv7kOcLEjVuvIEpXzQcmuOkAcwjcvb9ugDsUXi
3AfGcP4VO9fiFuMes8g0JQXm6aTVLgHF4y6VgLtjZEp+nZDus6BVSX8QpS4Qe+kmpJjw76qpSsdK
YptAMzVYTazhvz4Uq5JioA0/ET6CWkeER50FsQCEWv4DRG3GwRp/njyooVNkRzNP0pGrdDjEYHzq
Dj9OzaJtTsqexcGMg3XD2SC0se0O4vkbXQXEA+QvJg7w1lYBckVnsYu6ZY91b4dQGGiMilE1xFyX
Cg5esO8H4InSffzS6qClAKcqRa7Duhwg6wMbb2iXlI30NoO3nadKZ3xNQAO9BZxvrfkldWzAewbI
ewFEppG/5oGC2VRRQT55vgCsiZI3uWuaSAybkqySOyjz0o93A1m7rAJ+N6oOkM/5l0ggyh7Sij/D
J4A=
=C5/5
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.