old-cross-binutils/ld/emultempl
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
..
aarch64elf.em [AArch64] Workaround for Cortex A53 erratum 843419 2015-04-01 13:16:38 +01:00
aix.em ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
alphaelf.em ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
armcoff.em ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
armelf.em ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
astring.sed
avrelf.em ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
beos.em ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
bfin.em ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
cr16elf.em ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
crxelf.em ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
elf-generic.em ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
elf32.em Add --compress-debug-sections=[none|zlib|zlib-gnu|zlib-gabi] 2015-04-14 22:01:38 -07:00
epiphanyelf_4x4.em ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
genelf.em ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
generic.em ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
gld960.em ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
gld960c.em ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
hppaelf.em ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ia64elf.em ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
irix.em ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
linux.em ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
lnk960.em ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
m68hc1xelf.em ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
m68kcoff.em ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
m68kelf.em ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
metagelf.em ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
mipself.em ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
mmix-elfnmmo.em ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
mmixelf.em ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
mmo.em ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
nds32elf.em ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
needrelax.em ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
netbsd.em ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
nios2elf.em ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ostring.sed
pe.em ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
pep.em ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ppc32elf.em PowerPC non-PIC to PIC editing for protected var access 2015-04-07 23:00:07 +09:30
ppc64elf.em xlc -z relro toc section fixes 2015-02-02 21:54:10 +10:30
README ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
rxelf.em ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
scoreelf.em ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
sh64elf.em ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
solaris2.em ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
spu_icache.o_c Regenerate spu overlay and icache manager files 2014-11-04 22:36:13 +10:30
spu_icache.S bfd/ 2009-03-17 12:46:19 +00:00
spu_ovl.o_c Regenerate spu overlay and icache manager files 2014-11-04 22:36:13 +10:30
spu_ovl.S ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
spuelf.em ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
sunos.em ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
tic6xdsbt.em ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ticoff.em ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
v850elf.em Adds support for generating notes in V850 binaries. 2015-02-24 17:54:09 +00:00
vanilla.em ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
vms.em ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
vxworks.em ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
xtensaelf.em ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
z80.em ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

The files in this directory are sourced by genscripts.sh, after
setting some variables to substitute in, to produce
C source files that contain jump tables for each emulation.

Copyright (C) 2012-2015 Free Software Foundation, Inc.

Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.