[Bug target/99488] dwz: /usr/lib/gcc/mips64el-linux-gnuabi64/11/go1: Found two copies of .debug_line_str section

syq at debian dot org gcc-bugzilla@gcc.gnu.org
Wed Jun 23 07:51:58 GMT 2021


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99488

--- Comment #14 from YunQiang Su <syq at debian dot org> ---
The problem sees due to some problem of LTO.

Index: binutils-2.36.50.20210618/bfd/elfxx-mips.c
===================================================================
--- binutils-2.36.50.20210618.orig/bfd/elfxx-mips.c
+++ binutils-2.36.50.20210618/bfd/elfxx-mips.c
@@ -7448,7 +7448,9 @@ _bfd_mips_elf_section_from_shdr (bfd *ab
       break;
     case SHT_MIPS_DWARF:
       if (! startswith (name, ".debug_")
-         && ! startswith (name, ".zdebug_"))
+         && ! startswith (name, ".gnu.debuglto_.debug_")
+         && ! startswith (name, ".zdebug_")
+         && ! startswith (name, ".gnu.debuglto_..zdebug_"))
        return false;
       break;
     case SHT_MIPS_SYMBOL_LIB:
@@ -7669,7 +7671,9 @@ _bfd_mips_elf_fake_sections (bfd *abfd,
       hdr->sh_entsize = sizeof (Elf_External_ABIFlags_v0);
     }
   else if (startswith (name, ".debug_")
-          || startswith (name, ".zdebug_"))
+          || startswith (name, ".gnu.debuglto_.debug_")
+          || startswith (name, ".zdebug_")
+          || startswith (name, ".gnu.debuglto_.zdebug_"))
     {
       hdr->sh_type = SHT_MIPS_DWARF;


More information about the Gcc-bugs mailing list