https://sourceware.org/bugzilla/show_bug.cgi?id=20513
--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> --- This is better: index e7a8dff..052b276 100644 --- a/ld/ldmain.c +++ b/ld/ldmain.c @@ -959,6 +959,19 @@ multiple_definition (struct bfd_link_info *info, && bfd_is_abs_section (nsec->output_section))) return; + /* Ignore a redefinition from excluded section. */ + if (!bfd_link_relocatable (&link_info) + && ((osec->flags & SEC_EXCLUDE) != 0 + || (nsec->flags & SEC_EXCLUDE) != 0)) + { + if ((osec->flags & SEC_EXCLUDE) != 0) + { + h->u.def.section = nsec; + h->u.def.value = nval; + } + return; + } + name = h->root.string; if (nbfd == NULL) { -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils