[PATCH, head+2.21] Fix IRONLY visibility estimation in plugin interface, resolves GCC PR
Dave Korn
dave.korn.cygwin@gmail.com
Tue Nov 9 19:15:00 GMT 2010
Hi list,
In GCC PR46319(*), symbols are being resolved as LDPR_PREVAILING_DEF_IRONLY
when they should in fact not be IRONLY because they are /potentially/ visible
from outside the claimed IR files. This causes LTRANS to falsely infer that
they aren't referenced at all and optimise the lot away.
This patch adds the same tests that GOLD uses in this situation when
deciding that a prevailing def is not IRONLY, and resolves the GCC PR. It's
survived an LTO-enabled bootstrap of GCC on x86_64-unknown-linux-gnu, and
there are no regressions in the binutils testsuite either there or on
i686-pc-cygwin with this patch.
ld/ChangeLog:
2010-11-09 Dave Korn <...
* plugin.c (is_visible_from_outside): New function.
(get_symbols): Use it.
OK for trunk and branch?
cheers,
DaveK
--
(*) - http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46319
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr46319-binutils.diff
Type: text/x-c
Size: 4769 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20101109/d74f8cec/attachment.bin>
More information about the Binutils
mailing list