[PATCH] lto: Set resolution to LDPR_PREVAILING_DEF for non-IR common symbol

H.J. Lu hjl.tools@gmail.com
Thu Aug 27 08:31:43 GMT 2026


Since size or alignment of common symbol may be overridden by another
common symbol, set symbol resolution to LDPR_PREVAILING_DEF, instead of
LDPR_RESOLVED_EXEC, for common symbol in regular object when seeing an
undefined or common symbol from an IR object.

PR ld/34570
* plugin.c (get_symbols): Set resolution to LDPR_PREVAILING_DEF
for common symbol in regular object.
* testsuite/ld-plugin/pr34570a.c: New file.
* testsuite/ld-plugin/pr34570a.d: Likewise.
* testsuite/ld-plugin/pr34570b.c: Likewise.
* testsuite/ld-plugin/pr34570b.d: Likewise.
* testsuite/ld-plugin/pr34570c.c: Likewise.
* testsuite/ld-plugin/pr34570c.d: Likewise.

-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-lto-Set-resolution-to-LDPR_PREVAILING_DEF-for-non-IR.patch
Type: text/x-patch
Size: 5809 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20260827/862fad83/attachment-0001.bin>


More information about the Binutils mailing list