old-cross-binutils/ld/emultempl
H.J. Lu 4a114e3e0c Add compressed debug section support to binutils and ld.
bfd/

2010-10-29  H.J. Lu  <hongjiu.lu@intel.com>
	    Cary Coutant  <ccoutant@google.com>

	* archive.c (bfd_openr_next_archived_file): Copy BFD_COMPRESS
	and BFD_DECOMPRESS.

	* bfd.c (BFD_COMPRESS): New.
	(BFD_DECOMPRESS): Likewise.
	(BFD_FLAGS_SAVED): Likewise.
	(bfd_preserve_save): Replace BFD_IN_MEMORY with BFD_FLAGS_SAVED.

	* compress.c (bfd_uncompress_section_contents): Removed.
	(get_uncompressed_size): New.
	(decompress_contents): Likewise.
	(bfd_compress_section_contents): Likewise.
	(bfd_get_full_section_contents): Likewise.
	(bfd_is_section_compressed): Likewise.
	(bfd_init_section_decompress_status): Likewise.
	(bfd_init_section_compress_status): Likewise.

	* dwarf2.c (dwarf_debug_sections): New.
	(dwarf_debug_section_enum): Likewise.
	(read_section): Remove section_name and compressed_section_name.
	Add dwarf_debug_section_enum.  Try compressed debug section.
	(read_indirect_string): Updated.
	(read_abbrevs): Likewise.
	(decode_line_info): Likewise.
	(read_debug_ranges): Likewise.
	(find_line): Updated.

	* ecoff.c (bfd_debug_section): Add compress_status and
	compressed_size.

	* elf.c (_bfd_elf_make_section_from_shdr): Call
	bfd_is_section_compressed to check if a DWARF debug section is
	compressed.  Call bfd_init_section_compress_status or
	bfd_init_section_decompress_status if needed.

	* elflink.c (elf_link_input_bfd): Replace bfd_get_section_contents
	with bfd_get_full_section_contents.
	* merge.c (_bfd_add_merge_section): Likewise.
	* reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
	* simple.c (bfd_simple_get_relocated_section_contents): Likewise.

	* elfxx-target.h (TARGET_BIG_SYM): Allow BFD_COMPRESS and
	BFD_DECOMPRESS.
	(TARGET_LITTLE_SYM): Likewise.

	* libbfd-in.h (dwarf_debug_section): New.
	(dwarf_debug_sections): Likewise.

	* libbfd.c (_bfd_generic_get_section_contents): Issue an error
	when getting contents on compressed/decompressed section.

	* section.c (COMPRESS_SECTION_NONE): New.
	(COMPRESS_SECTION_DONE): Likewise.
	(DECOMPRESS_SECTION_SIZED): Likewise.
	(BFD_FAKE_SECTION): Add compress_status and compressed_size.
	(bfd_malloc_and_get_section): Replace bfd_get_section_contents
	with bfd_get_full_section_contents.

	* bfd-in2.h: Regenerated.
	* libbfd.h: Likewise.

binutils/

2010-10-29  H.J. Lu  <hongjiu.lu@intel.com>

	* addr2line.c (process_file): Set BFD_DECOMPRESS.

	* objcopy.c (do_debug_sections): New.
	(OPTION_COMPRESS_DEBUG_SECTIONS): New.
	(OPTION_DECOMPRESS_DEBUG_SECTIONS): Likewise.
	(copy_options): Add OPTION_COMPRESS_DEBUG_SECTIONS and
	OPTION_DECOMPRESS_DEBUG_SECTIONS.
	(copy_usage): Add --compress-debug-sections and
	--decompress-debug-sections.
	(copy_file): Set BFD_COMPRESS or BFD_DECOMPRESS.
	(copy_section): Replace bfd_get_section_contents with
	bfd_get_full_section_contents.
	(copy_main): Handle OPTION_COMPRESS_DEBUG_SECTIONS and
	OPTION_DECOMPRESS_DEBUG_SECTIONS.  Check do_debug_sections to
	rename DWARF debug sections.

	* objdump.c (load_specific_debug_section): Replace
	bfd_get_section_contents with bfd_get_full_section_contents.
	Remove bfd_uncompress_section_contents.
	(dump_section): Replace bfd_get_section_contents with
	bfd_get_full_section_contents.
	(display_file): Set BFD_DECOMPRESS if needed.

	* readelf.c (uncompress_section_contents): Set buffer to NULL
	to indiate decompression failure.
	(load_specific_debug_section): Always call
	uncompress_section_contents.

	* doc/binutils.texi: Document --compress-debug-sections and
	--decompress-debug-sections.

binutils/testsuite/

2010-10-29  H.J. Lu  <hongjiu.lu@intel.com>

	* binutils-all/compress.exp: New.
	* binutils-all/dw2-1.S: Likewise.
	* binutils-all/dw2-2.S: Likewise.
	* binutils-all/libdw2-compressed.out: Likewise.
	* binutils-all/libdw2.out: Likewise.

gas/

2010-10-29  H.J. Lu  <hongjiu.lu@intel.com>

	* write.c (compress_debug): Optimize section flags check.

gas/testsuite/

2010-10-29  H.J. Lu  <hongjiu.lu@intel.com>

	* elf/dwarf2-1.s: Replace .zdebug_abbrev section with
	.debug_abbrev section.
	* elf/dwarf2-2.3: Likewise.

	* elf/dwarf2-1.d: Pass --compress-debug-sections to assembler.
	Updated.
	* elf/dwarf2-2.d: Likewise.

	* gas/i386/i386.exp: Remove xfail on dw2-compress-2 and
	x86-64-dw2-compress-2.

ld/

2010-10-29  H.J. Lu  <hongjiu.lu@intel.com>

	* ldfile.c (ldfile_try_open_bfd): Set BFD_DECOMPRESS after
	bfd_openr returns.
	* emultempl/elf32.em (gld${EMULATION_NAME}_try_needed): Likewise.

	* scripttempl/elf.sc: Include compressed DWARF debug sections.

ld/testsuite/

2010-10-29  H.J. Lu  <hongjiu.lu@intel.com>

	* ld-elf/compress.exp: New.
	* ld-elf/compress1.s: Likewise.
	* ld-elf/compress1a.d: Likewise.
	* ld-elf/compress1b.d: Likewise.
	* ld-elf/compress1c.d: Likewise.
2010-10-29 12:10:39 +00:00
..
aix.em * ldlang.h (ldlang_add_undef): Add cmdline param. 2010-10-28 06:45:33 +00:00
alphaelf.em * elf-bfd.h (emum elf_object_id): Rename to elf_target_id. Add 2010-02-04 09:16:43 +00:00
armcoff.em update copyright dates 2009-09-02 07:25:43 +00:00
armelf.em 2010-04-15 Andrew Haley <aph@redhat.com> 2010-04-21 16:32:31 +00:00
astring.sed * emultempl/ostring.sed: Rename from stringify.sed. 1999-08-06 22:46:03 +00:00
avrelf.em PR ld/10956 2009-11-26 13:45:25 +00:00
beos.em * ldlang.c (push_stat_ptr, pop_stat_ptr): New functions. 2009-02-16 07:25:52 +00:00
cr16elf.em PR ld/10956 2009-11-26 13:45:25 +00:00
crxelf.em PR ld/10956 2009-11-26 13:45:25 +00:00
elf-generic.em update copyright dates 2009-09-02 07:25:43 +00:00
elf32.em Add compressed debug section support to binutils and ld. 2010-10-29 12:10:39 +00:00
genelf.em bfd/ 2010-02-19 01:47:16 +00:00
generic.em update copyright dates 2009-09-02 07:25:43 +00:00
gld960.em include/ 2008-02-15 03:35:53 +00:00
gld960c.em 2007-07-19 Roland McGrath <roland@redhat.com> 2007-07-19 19:56:10 +00:00
hppaelf.em * elf-bfd.h (emum elf_object_id): Rename to elf_target_id. Add 2010-02-04 09:16:43 +00:00
ia64elf.em PR ld/6766 2009-09-13 07:19:18 +00:00
irix.em update copyright dates 2009-09-02 07:25:43 +00:00
linux.em include/ 2008-02-15 03:35:53 +00:00
lnk960.em include/ 2008-02-15 03:35:53 +00:00
m68hc1xelf.em update copyright dates 2009-09-02 07:25:43 +00:00
m68kcoff.em * emultempl/armelf.em (elf32_arm_add_stub_section): Use 2008-07-07 00:46:51 +00:00
m68kelf.em update copyright dates 2009-09-02 07:25:43 +00:00
mipsecoff.em update copyright dates 2009-09-02 07:25:43 +00:00
mipself.em * elf-bfd.h (emum elf_object_id): Rename to elf_target_id. Add 2010-02-04 09:16:43 +00:00
mmix-elfnmmo.em PR ld/10956 2009-11-26 13:45:25 +00:00
mmixelf.em update copyright dates 2009-09-02 07:25:43 +00:00
mmo.em update copyright dates 2009-09-02 07:25:43 +00:00
needrelax.em PR ld/10956 2009-11-26 13:45:25 +00:00
netbsd.em include/ 2009-10-14 05:54:29 +00:00
ostring.sed * emultempl/ostring.sed: Rename from stringify.sed. 1999-08-06 22:46:03 +00:00
pe.em 2010-09-22 Kai Tietz <kai.tietz@onevision.com> 2010-09-22 08:03:42 +00:00
pep.em 2010-09-22 Kai Tietz <kai.tietz@onevision.com> 2010-09-22 08:03:42 +00:00
ppc32elf.em * elf-bfd.h (emum elf_object_id): Rename to elf_target_id. Add 2010-02-04 09:16:43 +00:00
ppc64elf.em * emultempl/ppc64elf.em (gld${EMULATION_NAME}_new_vers_pattern): For 2010-10-28 08:38:45 +00:00
README 19990502 sourceware import 1999-05-03 07:29:11 +00:00
rxelf.em bfd 2009-09-29 14:17:19 +00:00
scoreelf.em Add support for Score7 architecture. 2009-03-02 10:33:08 +00:00
sh64elf.em PR ld/11384 2010-03-18 13:15:46 +00:00
solaris2.em * emultempl/solaris2.em (elf_solaris2_before_allocation): Renamed 2010-10-12 18:39:36 +00:00
spu_icache.o_c bfd/ 2009-03-17 12:46:19 +00:00
spu_icache.S bfd/ 2009-03-17 12:46:19 +00:00
spu_ovl.o_c Include the spu_ovl ASCII form in the repository files. 2008-08-02 16:25:44 +00:00
spu_ovl.S bfd/ 2008-06-16 16:16:31 +00:00
spuelf.em PR 10474 2009-08-10 07:50:56 +00:00
sunos.em 2008-09-08 H.J. Lu <hongjiu.lu@intel.com> 2008-09-08 16:07:46 +00:00
ticoff.em update copyright dates 2009-09-02 07:25:43 +00:00
vanilla.em update copyright dates 2009-09-02 07:25:43 +00:00
vms.em bfd/ 2010-06-01 09:52:28 +00:00
vxworks.em PR 11107 2010-01-08 01:41:11 +00:00
xtensaelf.em bfd/ 2010-10-04 14:13:10 +00:00
z80.em update copyright dates 2009-09-02 07:25:43 +00:00

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.