binutils-gdb/include
H.J. Lu 0ce398f106 Add --compress-debug-sections=[none|zlib|zlib-gnu|zlib-gabi]
This patch adds --compress-debug-sections=[none|zlib|zlib-gnu|zlib-gabi]
to ld for ELF targets to support generating compressed DWARF debug
sections.  We always generate .zdebug_* section since section names have
been finalized and they can't be changed easily when compression is
being performed.

bfd/

	* bfd-in.h (compressed_debug_section_type): New.
	* compress.c (bfd_compress_section_contents): Add an argument
	for linker write compression and always generate .zdebug_*
	section when linking.
	(bfd_init_section_compress_status): Pass FALSE to
	bfd_compress_section_contents.
	(bfd_compress_section): New function.
	* elf.c (elf_fake_sections): For linking, set SEC_ELF_COMPRESS
	on DWARF debug sections if COMPRESS_DEBUG is set and rename
	section if COMPRESS_DEBUG_GABI_ZLIB isn't set.
	(assign_file_positions_for_non_load_sections): Set sh_offset
	to -1 if SEC_ELF_COMPRESS is set.
	(assign_file_positions_except_relocs): Likwise.
	(_bfd_elf_assign_file_positions_for_relocs): Renamed to ...
	(_bfd_elf_assign_file_positions_for_non_load): This.  Change
	return time to bfd_boolean.  Compress the section if
	SEC_ELF_COMPRESS is set.
	(_bfd_elf_write_object_contents): Updated.
	(_bfd_elf_set_section_contents): Write section contents to
	the buffer if SEC_ELF_COMPRESS is set.
	* merge.c: Include "elf-bfd.h".
	(sec_merge_emit): Add arguments for contents and offset.  Write
	to contents with offset if contents isn't NULL.
	(_bfd_write_merged_section): Write section contents to the
	buffer if SEC_ELF_COMPRESS is set.  Pass contents and
	output_offset to sec_merge_emit.
	* elflink.c (bfd_elf_final_link): Allocate the buffer for
	output section contents if SEC_ELF_COMPRESS is set.
	* section.c (SEC_ELF_COMPRESS): New.
	* bfd-in2.h: Regenerated.

gas/

	* as.h (compressed_debug_section_type): Removed.

include/

	* bfdlink.h (bfd_link_info): Add compress_debug.

ld/

	* ld.texinfo: Document --compress-debug-sections=.
	* ldmain.c (main): Set BFD_COMPRESS on output_bfd if
	COMPRESS_DEBUG is set.  Set BFD_COMPRESS_GABI on output_bfd
	for COMPRESS_DEBUG_GABI_ZLIB.
	* lexsup.c (elf_static_list_options): Add
	--compress-debug-sections=.
	* emultempl/elf32.em (OPTION_COMPRESS_DEBUG): New.
	(xtra_long): Add "compress-debug-sections".
	(gld${EMULATION_NAME}_handle_option): Handle
	OPTION_COMPRESS_DEBUG.

ld/testsuite/

	* ld-elf/compress.exp (build_tests): Add tests for
	--compress-debug-sections=.
	(run_tests): Likewise.
	Add additonal tests for --compress-debug-sections=.
	* ld-elf/gabiend.rt: New file.
	* ld-elf/gabinormal.rt: Likewise.
	* ld-elf/gnubegin.rS: Likewise.
	* ld-elf/gnunormal.rS: Likewise.
	* ld-elf/zlibbegin.rS: Likewise.
	* ld-elf/zlibnormal.rS: Likewise.
2015-04-14 22:01:38 -07:00
..
aout ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
cgen ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
coff Fixes a buffer overflow when compiling assembler for the MinGW targets. 2015-01-06 16:46:40 +00:00
elf Add support to the RX toolchain to restrict the use of string instructions. 2015-04-09 12:48:37 +01:00
gdb sim: ft32: new port 2015-03-28 02:12:33 -04:00
mach-o ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
nlm ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
opcode Extend arm_feature_set struct to provide more bits 2015-03-24 14:08:08 +08:00
som ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
vms ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
alloca-conf.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ansidecl.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
bfdlink.h Add --compress-debug-sections=[none|zlib|zlib-gnu|zlib-gabi] 2015-04-14 22:01:38 -07:00
binary-io.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
bout.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ChangeLog Add --compress-debug-sections=[none|zlib|zlib-gnu|zlib-gabi] 2015-04-14 22:01:38 -07:00
ChangeLog-9103 Add copyright notices 2012-12-10 12:48:03 +00:00
COPYING
COPYING3
demangle.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
dis-asm.h FT32 initial support 2015-01-28 16:25:18 +10:30
dwarf2.def GCC5/DWARFv5 Handle DW_TAG_atomic_type for C11 _Atomic type qualifier. 2015-02-09 15:09:22 +01:00
dwarf2.h Recognize new DWARF5/GCC5 DW_LANG constants for Fortran 03 and Fortran 08. 2015-02-10 09:07:25 +01:00
dyn-string.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
fibheap.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
filenames.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
floatformat.h floatformat.h: Wrap in extern "C" 2015-02-19 22:44:44 +00:00
fnmatch.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
fopen-bin.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
fopen-same.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
fopen-vms.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
gcc-c-fe.def ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
gcc-c-interface.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
gcc-interface.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
getopt.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
hashtab.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
hp-symtab.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ieee.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
leb128.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
libiberty.h Merge include/libiberty.h from GCC 2015-01-14 22:15:02 +01:00
longlong.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
lto-symtab.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
MAINTAINERS ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
md5.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
oasys.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
objalloc.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
obstack.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
os9k.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
partition.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
plugin-api.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
progress.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
safe-ctype.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
sha1.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
simple-object.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
sort.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
splay-tree.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
symcat.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
timeval-utils.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
vtv-change-permission.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
xregex2.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
xregex.h
xtensa-config.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
xtensa-isa-internal.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
xtensa-isa.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30