Fix debug section compression so that it is only performed if it would make the secti...
[deliverable/binutils-gdb.git] / gas / write.c
index 949ae921dfe39c364795f4d5f3b307941f44841c..e3570acace90aabd9ab2ece58d6a78bf62f3f85f 100644 (file)
@@ -1526,6 +1526,11 @@ compress_debug (bfd *abfd, asection *sec, void *xxx ATTRIBUTE_UNUSED)
        break;
     }
 
+  /* PR binutils/18087: If compression didn't make
+     the section smaller, just keep it uncompressed.  */
+  if (compressed_size > sec->size)
+    return;
+  
   /* Replace the uncompressed frag list with the compressed frag list.  */
   seginfo->frchainP->frch_root = first_newf;
   seginfo->frchainP->frch_last = last_newf;
This page took 0.023332 seconds and 4 git commands to generate.