Set BFD_DECOMPRESS to decompress debug sections

We should set BFD_DECOMPRESS to decompress debug sections when reading in
DWARF debug sections.

bfd/

	PR binutils/19523
	* dwarf2.c (_bfd_dwarf2_slurp_debug_info): Set BFD_DECOMPRESS to
	decompress debug sections.

binutils/

	PR binutils/19523
	* Makefile.am (check-DEJAGNU): Pass CC and CC_FOR_BUILD to
	runtest.
	* Makefile.in: Regenerated.
	* testsuite/binutils-all/compress.exp (test_gnu_debuglink): New
	proc.
	Run test_gnu_debuglink for native ELF build.
This commit is contained in:
H.J. Lu
2016-01-28 13:29:53 -08:00
parent 935c61442b
commit bf150a0bad
6 changed files with 115 additions and 2 deletions

View File

@@ -3706,8 +3706,10 @@ _bfd_dwarf2_slurp_debug_info (bfd *abfd, bfd *debug_bfd,
fail more quickly. */
return FALSE;
/* Set BFD_DECOMPRESS to decompress debug sections. */
if ((debug_bfd = bfd_openr (debug_filename, NULL)) == NULL
|| ! bfd_check_format (debug_bfd, bfd_object)
|| !(debug_bfd->flags |= BFD_DECOMPRESS,
bfd_check_format (debug_bfd, bfd_object))
|| (msec = find_debug_info (debug_bfd,
debug_sections, NULL)) == NULL
|| !bfd_generic_link_read_symbols (debug_bfd))