[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/20022] --gc-sections is broken with __start_ and shared library
From: |
hjl.tools at gmail dot com |
Subject: |
[Bug ld/20022] --gc-sections is broken with __start_ and shared library |
Date: |
Tue, 17 May 2016 14:35:27 +0000 |
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 ld/20022] --gc-sections is broken with __start_ and shared library, nickc at redhat dot com, 2016/05/09
- [Bug ld/20022] --gc-sections is broken with __start_ and shared library, hjl.tools at gmail dot com, 2016/05/09
- [Bug ld/20022] --gc-sections is broken with __start_ and shared library, nickc at redhat dot com, 2016/05/09
- [Bug ld/20022] --gc-sections is broken with __start_ and shared library, hjl.tools at gmail dot com, 2016/05/09
- [Bug ld/20022] --gc-sections is broken with __start_ and shared library, nickc at redhat dot com, 2016/05/10
- [Bug ld/20022] --gc-sections is broken with __start_ and shared library, hjl.tools at gmail dot com, 2016/05/11
- [Bug ld/20022] --gc-sections is broken with __start_ and shared library, nickc at redhat dot com, 2016/05/17
- [Bug ld/20022] --gc-sections is broken with __start_ and shared library,
hjl.tools at gmail dot com <=
- [Bug ld/20022] --gc-sections is broken with __start_ and shared library, nickc at redhat dot com, 2016/05/18
- [Bug ld/20022] --gc-sections is broken with __start_ and shared library, hjl.tools at gmail dot com, 2016/05/18