+2021-03-20 Alan Modra <amodra@gmail.com>
+
+ PR 27590
+ * elf.c (_bfd_elf_make_section_from_shdr): Remove SHF_EXCLUDE
+ test for .gnu.debuglto*.
+
2021-03-18 H.J. Lu <hongjiu.lu@intel.com>
PR ld/27590
- * elf.c (_bfd_elf_make_section_from_shdr): Treate
+ * elf.c (_bfd_elf_make_section_from_shdr): Treat
.gnu.debuglto_.debug_ section as debugging section unless it is
marked with SHF_EXCLUDE.
* elflink.c (elf_create_symbuf): Revert commit 994b2513281.
if (name [0] == '.')
{
if (strncmp (name, ".debug", 6) == 0
- /* NB: Treate .gnu.debuglto_.debug_ section as debugging
- section unless it is marked with SHF_EXCLUDE. */
- || ((flags & SEC_EXCLUDE) == 0
- && strncmp (name, ".gnu.debuglto_.debug_", 21) == 0)
+ || strncmp (name, ".gnu.debuglto_.debug_", 21) == 0
|| strncmp (name, ".gnu.linkonce.wi.", 17) == 0
|| strncmp (name, ".zdebug", 7) == 0)
flags |= SEC_DEBUGGING | SEC_ELF_OCTETS;
+2021-03-20 Alan Modra <amodra@gmail.com>
+
+ PR 27590
+ * ldlang.c (lang_gc_sections): Clear SEC_EXCLUDE when relocatable
+ for all sections except .stabstr.
+
2021-03-19 Alan Modra <amodra@gmail.com>
PR 27590
lang_gc_sections_1 (statement_list.head);
/* SEC_EXCLUDE is ignored when doing a relocatable link, except in
- the special case of debug info. (See bfd/stabs.c)
+ the special case of .stabstr debug info. (See bfd/stabs.c)
Twiddle the flag here, to simplify later linker code. */
if (bfd_link_relocatable (&link_info))
{
continue;
#endif
for (sec = f->the_bfd->sections; sec != NULL; sec = sec->next)
- if ((sec->flags & SEC_DEBUGGING) == 0)
+ if ((sec->flags & SEC_DEBUGGING) == 0
+ || strcmp (sec->name, ".stabstr") != 0)
sec->flags &= ~SEC_EXCLUDE;
}
}