+2015-04-05 H.J. Lu <hongjiu.lu@intel.com>
+
+ * binutils-all/compress.exp (compression_used): New.
+ Xfail test if compression didn't make the section smaller.
+
2015-04-04 H.J. Lu <hongjiu.lu@intel.com>
* binutils-all/compress.exp (testfile): Remove suffix.
return
}
+set got [remote_exec host "cmp ${testfile}.o ${compressedfile}.o" "" "/dev/null"]
+# Use it to set up xfail.
+set exec_output [lindex $got 1]
+if [string match "" $exec_output] then {
+ set compression_used ""
+} else {
+ set compression_used "yes"
+}
+
if { ![binutils_assemble_flags $srcdir/$subdir/dw2-2.S ${compressedfile2}.o --compress-debug-sections] } then {
unsupported "compressed debug sections"
return
}
}
+# Xfail this test if there are no compressed sections.
+setup_xfail "$compression_used$target_triplet"
set testname "objcopy compress debug sections in archive"
set got [binutils_run $OBJCOPY "--compress-debug-sections ${copyfile}.a ${compressedcopyfile}.a"]
if ![string match "" $got] then {
send_log "\n"
}
+ setup_xfail "$compression_used$target_triplet"
if { [regexp_diff tmpdir/libdw2-compressed.out $srcdir/$subdir/libdw2-compressed.out] } then {
fail "$testname"
} else {
+2015-04-05 H.J. Lu <hongjiu.lu@intel.com>
+
+ * write.c (compress_debug): Don't write the zlib header if
+ compressed section size is the same as before compression.
+
2015-04-02 Nick Clifton <nickc@redhat.com>
PR gas/18189
/* 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);