aboutsummaryrefslogtreecommitdiff
path: root/binutils/testsuite
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-07-14 10:25:52 -0700
committerH.J. Lu <hjl.tools@gmail.com>2015-07-14 10:26:23 -0700
commit19a7fe52ae3d0971e67a134bcb1648899e21ae1c (patch)
tree08f4f3425d6bed3ed2996c8cdb5b7b93015b77c3 /binutils/testsuite
parent22121df01ff9247b3cb272f52632848f9631f80f (diff)
downloadgdb-19a7fe52ae3d0971e67a134bcb1648899e21ae1c.zip
gdb-19a7fe52ae3d0971e67a134bcb1648899e21ae1c.tar.gz
gdb-19a7fe52ae3d0971e67a134bcb1648899e21ae1c.tar.bz2
Make default compression gABI compliant
All programs in binutils+gdb git repo now support gABI compression with the SHF_COMPRESSED bit. This patch makes the zlib-gabi option as compression default for gas, gold, ld and objcopy, instead of the zlib-gnu option whose outputs are incompatible with gABI. binutils/ * objcopy.c (copy_file): Set BFD_COMPRESS_GABI if not zlib-gnu. * doc/binutils.texi: Change --compress-debug-sections and --compress-debug-sections=zlib to zlib-gabi. binutils/testsuite/ * binutils-all/compress.exp: Update. gas/ * as.c (parse_args): Make --compress-debug-sections and --compress-debug-sections=zlib the same as --compress-debug-sections=zlib-gabi. * doc/as.texinfo: Change --compress-debug-sections and --compress-debug-sections=zlib to zlib-gabi. gold/ * compressed_output.cc (Output_compressed_section::set_final_data_size): Make --compress-debug-sections=zlib the same as --compress-debug-sections=zlib-gabi. * testsuite/Makefile.am (flagstest_compress_debug_sections.check): Expect ".debug_.*" with the SHF_COMPRESSED bit, instead of ".zdebug_". * testsuite/Makefile.in: Regenerated. ld/ * emultempl/elf32.em (gld${EMULATION_NAME}_handle_option): Make --compress-debug-sections=zlib the same as --compress-debug-sections=zlib-gabi. * ld.texinfo: Change --compress-debug-sections=zlib to zlib-gabi. ld/testsuite/ * ld-elf/zlibbegin.rS: Updated to .debug_.* with the SHF_COMPRESSED bit. * ld-elf/zlibnormal.rS: Likewise.
Diffstat (limited to 'binutils/testsuite')
-rw-r--r--binutils/testsuite/ChangeLog4
-rw-r--r--binutils/testsuite/binutils-all/compress.exp23
2 files changed, 18 insertions, 9 deletions
diff --git a/binutils/testsuite/ChangeLog b/binutils/testsuite/ChangeLog
index 435961a..5f4fbc3 100644
--- a/binutils/testsuite/ChangeLog
+++ b/binutils/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2015-07-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ * binutils-all/compress.exp: Update.
+
2015-07-10 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/18656
diff --git a/binutils/testsuite/binutils-all/compress.exp b/binutils/testsuite/binutils-all/compress.exp
index abff197..4dac503 100644
--- a/binutils/testsuite/binutils-all/compress.exp
+++ b/binutils/testsuite/binutils-all/compress.exp
@@ -39,7 +39,12 @@ if { ![binutils_assemble_flags $srcdir/$subdir/dw2-1.S ${compressedfile}.o --com
return
}
-set got [remote_exec host "cmp ${testfile}.o ${compressedfile}.o"]
+if { ![binutils_assemble_flags $srcdir/$subdir/dw2-1.S ${compressedfile}gnu.o --compress-debug-sections=zlib-gnu] } then {
+ unsupported "compressed debug sections with zlib-gnu"
+ return
+}
+
+set got [remote_exec host "cmp ${testfile}.o ${compressedfile}gnu.o"]
# Use it to set up xfail.
set exec_output [lindex $got 1]
if [string match "" $exec_output] then {
@@ -136,8 +141,8 @@ if ![string match "" $got] then {
# 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"]
+set testname "objcopy compress debug sections in archive with zlib-gnu"
+set got [binutils_run $OBJCOPY "--compress-debug-sections=zlib-gnu ${copyfile}.a ${compressedcopyfile}.a"]
if ![string match "" $got] then {
fail "objcopy ($testname)"
} else {
@@ -228,13 +233,13 @@ if { ![binutils_assemble_flags $srcdir/$subdir/dw2-1.S ${compressedfile}gnu.o --
return
}
-set src1 ${compressedfile}gnu.o
+set src1 ${compressedfile}gabi.o
set src2 ${compressedfile}.o
set status [remote_exec build cmp "${src1} ${src2}"]
set exec_output [lindex $status 1]
set exec_output [prune_warnings $exec_output]
if ![string match "" $exec_output] then {
- fail "compressed debug sections with zlib-gnu"
+ fail "compressed debug sections with zlib-gabi"
return
}
@@ -248,13 +253,13 @@ if { ![binutils_assemble_flags $srcdir/$subdir/dw2-2.S ${compressedfile2}gnu.o -
return
}
-set src1 ${compressedfile2}gnu.o
+set src1 ${compressedfile2}gabi.o
set src2 ${compressedfile2}.o
set status [remote_exec build cmp "${src1} ${src2}"]
set exec_output [lindex $status 1]
set exec_output [prune_warnings $exec_output]
if ![string match "" $exec_output] then {
- fail "compressed debug sections with zlib-gnu"
+ fail "compressed debug sections with zlib-gabi"
return
}
@@ -292,13 +297,13 @@ if { ![binutils_assemble_flags $srcdir/$subdir/dw2-3.S ${compressedfile3}gnu.o -
return
}
-set src1 ${compressedfile3}gnu.o
+set src1 ${compressedfile3}gabi.o
set src2 ${compressedfile3}.o
set status [remote_exec build cmp "${src1} ${src2}"]
set exec_output [lindex $status 1]
set exec_output [prune_warnings $exec_output]
if ![string match "" $exec_output] then {
- fail "compressed debug sections with zlib-gnu"
+ fail "compressed debug sections with zlib-gabi"
return
}