[binutils-gdb] LTO: Handle __real_SYM reference in IR

H.J. Lu hjl.tools@gmail.com
Thu May 5 00:02:38 GMT 2022


On Wed, May 4, 2022 at 4:43 PM Alan Modra <amodra@gmail.com> wrote:
>
> On Wed, May 04, 2022 at 11:27:56PM +0000, H.J. Lu via Binutils-cvs wrote:
> > --- a/bfd/linker.c
> > +++ b/bfd/linker.c
> > @@ -599,6 +599,7 @@ bfd_wrapped_link_hash_lookup (bfd *abfd,
> >         n[1] = '\0';
> >         strcat (n, l + sizeof REAL - 1);
> >         h = bfd_link_hash_lookup (info->hash, n, create, true, follow);
> > +       h->ref_real = 1;
> >         free (n);
> >         return h;
> >       }
>
> Do you need "if (h != NULL)" here before setting ref_real?  I suspect
> you do.
>

You are right.  I am checking in this.

Thanks.

-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-bfd-Check-NULL-pointer-before-setting-ref_real.patch
Type: text/x-patch
Size: 796 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20220504/508fd88f/attachment.bin>


More information about the Binutils mailing list