[PATCH] LTO: Don't wrap IR symbol reference
Alan Modra
amodra@gmail.com
Fri Jul 5 23:07:18 GMT 2024
On Fri, Jul 05, 2024 at 01:28:22AM -0700, H.J. Lu wrote:
> --- a/bfd/linker.c
> +++ b/bfd/linker.c
> @@ -555,7 +555,10 @@ bfd_wrapped_link_hash_lookup (bfd *abfd,
> #undef WRAP
> #define WRAP "__wrap_"
>
> - if (bfd_hash_lookup (info->wrap_hash, l, false, false) != NULL)
> + /* Don't wrap IR symbol reference since LTO knows nothing about
> + symbol wrap. */
> + if ((abfd->flags & BFD_PLUGIN) == 0
> + && bfd_hash_lookup (info->wrap_hash, l, false, false) != NULL)
> {
> char *n;
> struct bfd_link_hash_entry *h;
The immediate question that comes to my mind is: If this is correct,
why is it correct to transform __real_ IR symbols?
On looking just a little deeper, this patch interferes with
wrap_status in ld/plugin.c:get_symbols which makes me think the patch
is wrong or at least incomplete.
--
Alan Modra
More information about the Binutils
mailing list