Mark .gnu.debuglto_.debug_* as SHT_MIPS_DWARF
authorYunQiang Su <yunqiang.su@cipunited.com>
Wed, 30 Jun 2021 16:16:22 +0000 (17:16 +0100)
committerNick Clifton <nickc@redhat.com>
Wed, 30 Jun 2021 16:16:22 +0000 (17:16 +0100)
PR mips/28009
* bfd/elfxx-mips.c (_bfd_mips_elf_section_from_shdr,
_bfd_mips_elf_fake_sections): Mark LTO debug info as
SHT_MIPS_DWARF.

bfd/ChangeLog
bfd/elfxx-mips.c

index ca605b33df71b9cebea16c394d91758797477100..abb9e09a849481f2e3e8fb71cb8a21a43821c526 100644 (file)
@@ -1,3 +1,10 @@
+2021-06-30  YunQiang Su  <yunqiang.su@cipunited.com>
+
+       PR mips/28009
+       * bfd/elfxx-mips.c (_bfd_mips_elf_section_from_shdr,
+       _bfd_mips_elf_fake_sections): Mark LTO debug info as
+       SHT_MIPS_DWARF.
+
 2021-06-29  Nick Clifton  <nickc@redhat.com>
 
        * config.bfd (obsolete configurations): Add netbsdpe.
index 426f432d9d00198e4eb9f53d238e4e4003e8f689..e4827fd17dee3f4ac2dfa089b8e48030361c2fab 100644 (file)
@@ -7448,7 +7448,9 @@ _bfd_mips_elf_section_from_shdr (bfd *abfd,
       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, Elf_Internal_Shdr *hdr, asection *sec)
       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;