forked from Imagelibrary/binutils-gdb
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.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user