PR 20513
* ldlang.c (section_already_linked): Deal with SHF_EXCLUDE sections.
+2016-08-31 Alan Modra <amodra@gmail.com>
+
+ PR 20513
+ * ldlang.c (section_already_linked): Deal with SHF_EXCLUDE sections.
+
2016-08-31 Alan Modra <amodra@gmail.com>
* testsuite/ld-powerpc/vle-multiseg-1.d: Adjust to suit segment change.
return;
}
+ /* Deal with SHF_EXCLUDE ELF sections. */
+ if (!bfd_link_relocatable (&link_info)
+ && (abfd->flags & BFD_PLUGIN) == 0
+ && (sec->flags & (SEC_GROUP | SEC_KEEP | SEC_EXCLUDE)) == SEC_EXCLUDE)
+ sec->output_section = bfd_abs_section_ptr;
+
if (!(abfd->flags & DYNAMIC))
bfd_section_already_linked (abfd, sec, &link_info);
}