https://sourceware.org/bugzilla/show_bug.cgi?id=20022
--- Comment #8 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Nick Clifton from comment #7)
> Created attachment 9270 [details]
> Proposed patch
>
> Hi H.J.
>
> OK - based upon your patch, but simplified quite a lot, here is a patch
> which
> I think will produce the error message we want. Please could you give it
> a try
> and if you are happy with it let me know, so that I can check it in.
>
> Cheers
> Nick
if (h->root.type != bfd_link_hash_undefined
&& h->root.type != bfd_link_hash_undefweak)
- return NULL;
+ {
+ /* PR 20022 */
+ if (sec_name && info->gc_sections && h->root.u.undef.section == NULL)
+ info->callbacks->einfo (_("%X%P: error: undefined orphan section symbol
%s suggests that garbage collection failed\n"),
+ h->root.root.string);
+ return NULL;
}
Is it safe to check h->root.u.undef.section for defined symbol?
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-binutils