From 19a7fe52ae3d0971e67a134bcb1648899e21ae1c Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Tue, 14 Jul 2015 10:25:52 -0700 Subject: 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. --- gas/doc/as.texinfo | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'gas/doc') diff --git a/gas/doc/as.texinfo b/gas/doc/as.texinfo index 950bf28..70f1b96 100644 --- a/gas/doc/as.texinfo +++ b/gas/doc/as.texinfo @@ -625,10 +625,10 @@ Begin in alternate macro mode. @end ifclear @item --compress-debug-sections -Compress DWARF debug sections using zlib. The debug sections are renamed -to begin with @samp{.zdebug}, and the resulting object file may not be -compatible with older linkers and object file utilities. Note if compression -would make a given section @emph{larger} then it is not compressed or renamed. +Compress DWARF debug sections using zlib with SHF_COMPRESSED from the +ELF ABI. The resulting object file may not be compatible with older +linkers and object file utilities. Note if compression would make a +given section @emph{larger} then it is not compressed. @ifset ELF @cindex @samp{--compress-debug-sections=} option @@ -640,10 +640,13 @@ These options control how DWARF debug sections are compressed. @option{--compress-debug-sections=none} is equivalent to @option{--nocompress-debug-sections}. @option{--compress-debug-sections=zlib} and -@option{--compress-debug-sections=zlib-gnu} are equivalent to +@option{--compress-debug-sections=zlib-gabi} are equivalent to @option{--compress-debug-sections}. -@option{--compress-debug-sections=zlib-gabi} compresses -DWARF debug sections with SHF_COMPRESSED from the ELF ABI. +@option{--compress-debug-sections=zlib-gnu} compresses DWARF debug +sections using zlib. The debug sections are renamed to begin with +@samp{.zdebug}. Note if compression would make a given section +@emph{larger} then it is not compressed nor renamed. + @end ifset @item --nocompress-debug-sections -- cgit v1.1