8sa1-binutils-gdb/binutils/testsuite/binutils-all
H.J. Lu 151411f8af Add SHF_COMPRESSED support to gas and objcopy
This patch adds --compress-debug-sections={none|zlib|zlib-gnu|zlib-gabi}
options to gas and objcopy for ELF files. They control how DWARF debug
sections are compressed.  --compress-debug-sections=none is equivalent to
--nocompress-debug-sections.  --compress-debug-sections=zlib and
--compress-debug-sections=zlib-gnu are equivalent to
--compress-debug-sections.  --compress-debug-sections=zlib-gabi compresses
DWARF debug sections with SHF_COMPRESSED from the ELF ABI.  No linker
changes are required to support SHF_COMPRESSED.

bfd/

	* archive.c (_bfd_get_elt_at_filepos): Also copy BFD_COMPRESS_GABI
	bit.
	* bfd.c (bfd::flags): Increase size to 18 bits.
	(BFD_COMPRESS_GABI): New.
	(BFD_FLAGS_SAVED): Add BFD_COMPRESS_GABI.
	(BFD_FLAGS_FOR_BFD_USE_MASK): Likewise.
	(bfd_update_compression_header): New fuction.
	(bfd_check_compression_header): Likewise.
	(bfd_get_compression_header_size): Likewise.
	(bfd_is_section_compressed_with_header): Likewise.
	* compress.c (MAX_COMPRESSION_HEADER_SIZE): New.
	(bfd_compress_section_contents): Return the uncompressed size if
	the full section contents is compressed successfully.  Support
	converting from/to .zdebug* sections.
	(bfd_get_full_section_contents): Call
	bfd_get_compression_header_size to get compression header size.
	(bfd_is_section_compressed): Renamed to ...
	(bfd_is_section_compressed_with_header): This.  Add a pointer
	argument to return compression header size.
	(bfd_is_section_compressed): Use it.
	(bfd_init_section_decompress_status): Call
	bfd_get_compression_header_size to get compression header size.
	Return FALSE if uncompressed section size is 0.
	* elf.c (_bfd_elf_make_section_from_shdr): Support converting
	from/to .zdebug* sections.
	* bfd-in2.h: Regenerated.

binutils/

	* objcopy.c (do_debug_sections): Add compress_zlib,
	compress_gnu_zlib and compress_gabi_zlib.
	(copy_options): Use optional_argument on compress-debug-sections.
	(copy_usage): Update --compress-debug-sections.
	(copy_file): Handle compress_zlib, compress_gnu_zlib and
	compress_gabi_zlib.
	(copy_main): Handle
	--compress-debug-sections={none|zlib|zlib-gnu|zlib-gabi}.
	* doc/binutils.texi: Document
	--compress-debug-sections={none|zlib|zlib-gnu|zlib-gabi}.

binutils/testsuite/

	* compress.exp: Add tests for
	--compress-debug-sections={none|zlib|zlib-gnu|zlib-gabi}.
	* binutils-all/dw2-3.rS: New file.
	* binutils-all/dw2-3.rt: Likewise.
	* binutils-all/libdw2-compressedgabi.out: Likewise.

gas/

	* as.c (show_usage): Update --compress-debug-sections.
	(std_longopts): Use optional_argument on compress-debug-sections.
	(parse_args): Handle
	--compress-debug-sections={none|zlib|zlib-gnu|zlib-gabi}.
	* as.h (compressed_debug_section_type): New.
	(flag_compress_debug): Change type to compressed_debug_section_type.
	--compress-debug-sections={none|zlib|zlib-gnu|zlib-gabi}.
	* write.c (compress_debug): Set BFD_COMPRESS_GABI for
	--compress-debug-sections=zlib-gabi.  Call
	bfd_get_compression_header_size to get compression header size.
	Don't rename section name for --compress-debug-sections=zlib-gabi.
	* config/tc-i386.c (compressed_debug_section_type): Set to
	COMPRESS_DEBUG_ZLIB.
	* doc/as.texinfo: Document
	--compress-debug-sections={none|zlib|zlib-gnu|zlib-gabi}.

gas/testsuite/

	* gas/i386/dw2-compressed-1.d: New file.
	* gas/i386/dw2-compressed-2.d: Likewise.
	* gas/i386/dw2-compressed-3.d: Likewise.
	* gas/i386/x86-64-dw2-compressed-2.d: Likewise.
	* gas/i386/i386.exp: Run dw2-compressed-2, dw2-compressed-1,
	dw2-compressed-3 and x86-64-dw2-compressed-2.

ld/testsuite/

	* ld-elf/compress.exp: Add a test for
	--compress-debug-sections=zlib-gabi.
	(build_tests): Add 2 tests for --compress-debug-sections=zlib-gabi.
	(run_tests): Likewise.
	Verify linker output with zlib-gabi compressed debug input.
	* ld-elf/compressed1a.d: New file.
	* ld-elf/compressed1b.d: Likewise.
	* ld-elf/compressed1c.d: Likewise.
2015-04-08 07:54:09 -07:00
..
aarch64 ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
arm [ARM] Skip private symbol when doing objdump 2015-03-03 15:00:59 +00:00
bfin ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
hppa ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
i386 ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
m68k ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
mips ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
vax ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
windres ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
x86-64 ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
add-empty-section.d
add-section.d
alias-2.def
alias.def
ar.exp ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
bintest.s
compress.exp Add SHF_COMPRESSED support to gas and objcopy 2015-04-08 07:54:09 -07:00
copy-1.d
copy-1.s
copy-2.d
copy-3.d binutils/ 2012-10-29 10:09:34 +00:00
copy-4.d
copytest.s
debug_str.d Fixes a problem with the BFD library running out of memory because it mistakenly 2014-04-30 17:04:04 +01:00
debug_str.s Fixes a problem with the BFD library running out of memory because it mistakenly 2014-04-30 17:04:04 +01:00
dlltool.exp ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
dumptest.s
dw2-1.S ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
dw2-1.W PR binutils/16218 2013-12-20 13:52:23 +00:00
dw2-2.S ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
dw2-3.rS Add SHF_COMPRESSED support to gas and objcopy 2015-04-08 07:54:09 -07:00
dw2-3.rt Add SHF_COMPRESSED support to gas and objcopy 2015-04-08 07:54:09 -07:00
dw2-3.S Add a dw2-3.S test 2015-04-04 07:34:25 -07:00
dw2-3.W Add a dw2-3.S test 2015-04-04 07:34:25 -07:00
dw2-compressed.S ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
dw2-decodedline-1.S Remove support for the (deprecated) openrisc and or32 configurations and replace 2014-04-22 15:57:47 +01:00
dw2-decodedline.S * binutils-all/dw2-decodedline.S: Always have whitespace before 2012-02-14 01:00:50 +00:00
dw2-empty.S Don't compress empty debug section 2012-07-03 16:06:34 +00:00
elfedit-1.d Fix misc x32 bugs. 2011-06-19 21:22:16 +00:00
elfedit-2.d
elfedit-3.d
elfedit-4.d bfd/ 2012-04-03 16:01:38 +00:00
elfedit.exp ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
empty-file
empty.s
exclude-1.s
exclude-1a.d
exclude-1b.d
fastcall.def
group-2.s
group-3.s
group-4.s
group-5.d
group-5.s
group-6.d Remove the group section if all members are removed. 2011-09-16 04:23:19 +00:00
group-6.s Remove the group section if all members are removed. 2011-09-16 04:23:19 +00:00
group.s
libdw2-compressed.out Add a dw2-3.S test 2015-04-04 07:34:25 -07:00
libdw2-compressedgabi.out Add SHF_COMPRESSED support to gas and objcopy 2015-04-08 07:54:09 -07:00
libdw2.out Add a dw2-3.S test 2015-04-04 07:34:25 -07:00
link-order.s
localize-hidden-1.d
localize-hidden-1.s
localize-hidden-2.d
localize-hidden-2.s
needed-by-reloc.s
nm-1.s * binutils-all/nm.exp: --size-sort test: Add more ELF-like 2013-08-22 11:29:43 +00:00
nm-elf-1.s binutils/ 2013-08-19 15:08:52 +00:00
nm.exp ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
note-1.d
objcopy.exp Adds support for generating notes in V850 binaries. 2015-02-24 17:54:09 +00:00
objdump.exp Remove is_zlib_supported 2015-04-06 12:19:13 -07:00
objdump.s
objdump.W PR binutils/16218 2013-12-20 13:52:23 +00:00
objdump.WL binutils/ 2011-10-04 14:25:40 +00:00
readelf.exp Remove is_zlib_supported 2015-04-06 12:19:13 -07:00
readelf.h
readelf.n PR binutils/15191 2013-02-26 16:59:52 +00:00
readelf.r Add support for Andes NDS32: 2013-12-13 11:52:32 +00:00
readelf.r-64
readelf.s [MIPS] Implement O32 FPXX, FP64 and FP64A ABI extensions 2014-07-29 11:27:59 +01:00
readelf.s-64 [Patch ]Fix bintest.s failure after previous AArch64 map symbol commit 2015-03-27 10:22:46 +00:00
readelf.ss readelf -s test: Skip extra symbols produced by MSP430 assembler. 2014-03-17 11:00:32 +00:00
readelf.ss-64 Fix the binutils readelf.ss test for the AArch64 target. 2015-04-02 15:28:02 +01:00
readelf.ss-mips MIPS testsuite cleanup - part 1 2014-09-06 17:58:37 +01:00
readelf.ss-tmips [MIPS] Implement O32 FPXX, FP64 and FP64A ABI extensions 2014-07-29 11:27:59 +01:00
readelf.wa Display null bytes in DWARF debug info 2012-08-02 13:42:59 +00:00
size.exp ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
strip-1.d
strip-2.d
strip-3.d [MIPS] Implement O32 FPXX, FP64 and FP64A ABI extensions 2014-07-29 11:27:59 +01:00
strip-4.d
strip-5.d
strip-6.d
strip-7.d
strip-8.d
strip-9.d
strip-10.d My patch to the binutils strip-10.d test was wrong. The osabi field should always be set to 2014-01-29 14:01:54 +00:00
strip-11.d Delete unnecessary code copying SHF_SH5_ISA32 flag 2014-12-26 22:19:30 +10:30
testprog.c
testranges-ia64.d
testranges-ia64.s
testranges.d
testranges.s
unique.s
unknown.s
update-1.s objcopy: Add --update-section option. 2015-02-28 21:25:51 +00:00
update-2.s objcopy: Add --update-section option. 2015-02-28 21:25:51 +00:00
update-3.s objcopy: Add --update-section option. 2015-02-28 21:25:51 +00:00
update-4.s objcopy: Add --update-section option. 2015-02-28 21:25:51 +00:00
update-section.exp Run objcopy --update-section test only on ELF targets 2015-03-11 17:59:29 +10:30
version.def ChangeLog binutils 2012-02-11 20:02:03 +00:00
version.s * binutils-all/dw2-decodedline.S: Always have whitespace before 2012-02-14 01:00:50 +00:00