]> Cypherpunks repositories - gostls13.git/commit
dwbug/elf: support old-style compressed DWARF
authorAustin Clements <austin@google.com>
Wed, 2 Dec 2015 03:55:28 +0000 (22:55 -0500)
committerAustin Clements <austin@google.com>
Thu, 3 Dec 2015 20:53:04 +0000 (20:53 +0000)
commite1544d3bb68d56ebf43cc8828e3dce18fd5ef442
tree243cedefafec4e8420a23416b316547609e29a5b
parent606d9a7e18c951bb64ea460597894558ff3808c1
dwbug/elf: support old-style compressed DWARF

GCC and LLVM support zlib-compressing DWARF debug sections (and
there's some evidence that this may be happening by default in some
circumstances now).

Add support for reading compressed DWARF sections. Since ELF
relocations apply to the decompressed data, decompression is done
before applying relocations. Since relcations are applied by
debug/elf, decompression must also be handled there.

Note that this is different from compressed ELF sections, which is a
more general mechanism used by very recent versions of GCC.

Updates #11773.

Change-Id: I3f4bf1b04d0802cc1e8fcb7c2a5fcf6c467c5089
Reviewed-on: https://go-review.googlesource.com/17340
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
src/cmd/dist/deps.go
src/debug/elf/file.go
src/debug/elf/file_test.go
src/debug/elf/testdata/zdebug-test-gcc484-x86-64.obj [new file with mode: 0644]
src/go/build/deps_test.go