[PATCH] lto: Set resolution to LDPR_PREVAILING_DEF for non-IR common symbol
Jan Beulich
jbeulich@suse.com
Thu Aug 27 11:52:22 GMT 2026
On 27.08.2026 10:31, H.J. Lu wrote:
> 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.
Is this correct for the LDPK_COMMON case that's also covered by the if()
that you alter in get_symbols()?
Adding to the (my?) confusion is that after said
if (syms[n].def == LDPK_UNDEF
|| syms[n].def == LDPK_WEAKUNDEF
|| syms[n].def == LDPK_COMMON)
there's an "else if" with this comment:
/* Was originally def, weakdef, or common, but has been pre-empted. */
With the cited if(), no originally common symbol can make it there, can it?
Jan
More information about the Binutils
mailing list