aboutsummaryrefslogtreecommitdiff
path: root/bfd/dwarf2.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2016-01-28 13:29:53 -0800
committerH.J. Lu <hjl.tools@gmail.com>2016-01-28 13:29:53 -0800
commitbf150a0bad8d3fcfa17f5d6b5a5ca75efae855ed (patch)
treef52bdea6825b37b8dae31c51509af6bf7810b97c /bfd/dwarf2.c
parent935c61442bc369c0cf9db6f998ef6a18ba83a116 (diff)
downloadgdb-bf150a0bad8d3fcfa17f5d6b5a5ca75efae855ed.zip
gdb-bf150a0bad8d3fcfa17f5d6b5a5ca75efae855ed.tar.gz
gdb-bf150a0bad8d3fcfa17f5d6b5a5ca75efae855ed.tar.bz2
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.
Diffstat (limited to 'bfd/dwarf2.c')
-rw-r--r--bfd/dwarf2.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
index 9acaf87..4d6f8fc 100644
--- a/bfd/dwarf2.c
+++ b/bfd/dwarf2.c
@@ -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))