diff --git a/bfd/section.c b/bfd/section.c
index 457486b0f89..13cb2fdeb2d 100644
--- a/bfd/section.c
+++ b/bfd/section.c
@@ -1774,11 +1774,17 @@ bfd_section_size_insane (bfd *abfd, asection *sec)
 	 "int aaa..a;" with "a" repeated enough times can result in
 	 compression ratios without limit for .debug_str, whereas such
 	 a file will usually also have the enormous symbol
-	 uncompressed in .symtab.  */
+	 uncompressed in .symtab.  PR34481: For separare dwarf info
+	 files we won't have a .symtab section so can't make any
+	 assumptions about decompressed section sizes.  */
      if (size / 10 > filesize)
        {
-	 bfd_set_error (bfd_error_bad_value);
-	 return true;
+	 size_t len = strlen (sec->name);
+	 if (len < 4 || memcmp (sec->name + len - 4, ".dwo", 4) != 0)
+	   {
+	     bfd_set_error (bfd_error_bad_value);
+	     return true;
+	   }
        }
      size = sec->compressed_size;
     }
