binutils-gdb/gas/doc
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
..
Makefile.am ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
Makefile.in Revert the AM_ZLIB change in gas 2015-03-31 06:39:57 -07:00
all.texi ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
as.texinfo Add SHF_COMPRESSED support to gas and objcopy 2015-04-08 07:54:09 -07:00
c-aarch64.texi [AArch64] Add support for the Samsung Exynos M1 processor 2015-04-01 21:00:41 +00:00
c-alpha.texi ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
c-arc.texi ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
c-arm.texi [ARM] Add support for the Samsung Exynos M1 processor 2015-04-01 20:58:16 +00:00
c-avr.texi ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
c-bfin.texi ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
c-cr16.texi ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
c-cris.texi ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
c-d10v.texi ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
c-d30v.texi ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
c-epiphany.texi ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
c-h8300.texi Add support for the h8300-linux target. 2015-02-23 17:04:53 +00:00
c-hppa.texi ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
c-i370.texi ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
c-i386.texi Add znver1 processor 2015-03-17 21:49:15 +05:30
c-i860.texi ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
c-i960.texi ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
c-ia64.texi ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
c-ip2k.texi ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
c-lm32.texi ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
c-m32c.texi ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
c-m32r.texi ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
c-m68hc11.texi ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
c-m68k.texi ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
c-metag.texi ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
c-microblaze.texi ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
c-mips.texi Add i6400 entry to the MIPS CPU table. 2015-03-12 16:37:09 +00:00
c-mmix.texi ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
c-msp430.texi ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
c-mt.texi ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
c-nds32.texi ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
c-nios2.texi ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
c-ns32k.texi ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
c-pdp11.texi ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
c-pj.texi ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
c-ppc.texi ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
c-rl78.texi Add support for G13 and G14 flag bits in RL78 ELF binaries. 2015-03-19 15:37:43 +00:00
c-rx.texi ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
c-s390.texi S/390: Add support for IBM z13. 2015-01-16 12:28:58 +01:00
c-score.texi ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
c-sh.texi ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
c-sh64.texi ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
c-sparc.texi ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
c-tic6x.texi ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
c-tic54x.texi ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
c-tilegx.texi ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
c-tilepro.texi ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
c-v850.texi Adds support for generating notes in V850 binaries. 2015-02-24 17:54:09 +00:00
c-vax.texi ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
c-visium.texi ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
c-xc16x.texi ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
c-xgate.texi ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
c-xstormy16.texi ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
c-xtensa.texi ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
c-z8k.texi ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
c-z80.texi ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
fdl.texi
h8.texi ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
internals.texi ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30