From 317974f6831d8c7af613257e190e0dc3125bc4cf Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Sun, 5 Apr 2015 08:11:11 -0700 Subject: Xfail the compressed debug sections There is no need to generate compressed debug section if compressed section size is the same as before compression. We should xfail the compressed debug section test if there are no compressed sections binutils/testsuite/ * binutils-all/compress.exp (compression_used): New. Xfail test if compression didn't make the section smaller. gas/ 2015-04-05 H.J. Lu * write.c (compress_debug): Don't write the zlib header if compressed section size is the same as before compression. --- gas/write.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gas/write.c') diff --git a/gas/write.c b/gas/write.c index 6a781ea..248255b 100644 --- a/gas/write.c +++ b/gas/write.c @@ -1519,7 +1519,7 @@ compress_debug (bfd *abfd, asection *sec, void *xxx ATTRIBUTE_UNUSED) /* PR binutils/18087: If compression didn't make the section smaller, just keep it uncompressed. */ - if (compressed_size > uncompressed_size) + if (compressed_size >= uncompressed_size) return; memcpy (header, "ZLIB", 4); -- cgit v1.1