[PATCH] LTO: Properly handle wrapper symbols in IR
H.J. Lu
hjl.tools@gmail.com
Wed Apr 3 02:59:00 GMT 2019
On Tue, Apr 2, 2019 at 4:12 PM H.J. Lu <hjl.tools@gmail.com> wrote:
>
> On Tue, Apr 2, 2019 at 3:12 PM H.J. Lu <hjl.tools@gmail.com> wrote:
> >
> > Change resolution from PREVAILING_DEF_IRONLY to LDPR_PREVAILING_DEF
> > for wrapper symbol.
> >
> > PR ld/24406
> > * ld.texi: Remove LTO warning from --wrap.
> > * plugin.c (get_symbols): Change resolution to LDPR_PREVAILING_DEF
> > for wrapper symbol.
> > * testsuite/ld-plugin/lto.exp: Run ld/24406 test.
> > * testsuite/ld-plugin/pr24406.c: New file.
>
> This patch is incomplete. I am working on it.
When a wrapper symbol, __wrap_FOO, is defined in IR, its resolution
should be LDPR_PREVAILING_DEF, not PREVAILING_DEF_IRONLY, since LTO
doesn't know that __wrap_FOO provides definition of FOO. And resolution
of FOO should be LDPR_RESOLVED_IR since it is resolved by __wrap_FOO in
IR.
--
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-LTO-Properly-handle-wrapper-symbols-in-IR.patch
Type: application/x-patch
Size: 5895 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20190403/099648ea/attachment.bin>
More information about the Binutils
mailing list