]> Cypherpunks repositories - gostls13.git/commit
debug/elf: apply more relocations when reading DWARF data sections
authorThan McIntosh <thanm@google.com>
Mon, 16 Sep 2019 20:11:01 +0000 (16:11 -0400)
committerThan McIntosh <thanm@google.com>
Tue, 17 Sep 2019 18:46:32 +0000 (18:46 +0000)
commitdf855da653095e606fe69503b075e45d53d86ad7
tree403b556dd46be26ea78e6612a265cfd61913fad6
parent7d16e44d4f36fb37f43dc5318fbe13a1ba50425d
debug/elf: apply more relocations when reading DWARF data sections

The elf reader's method for reading in DWARF section data has support
for applying selected relocations when the debug/dwarf readers are
being used on relocatable objects. This patch extends the set of
relocations applied slightly. In particlar, prior to this for some
architectures we were only applying relocations whose target symbol
was a section symbol; now we also include some relocations that target
other symbols. This is needed to get meaningful values for compilation
unit DIE low_pc attributes, which typically target a specific function
symbol in text.

Fixes #31363.

Change-Id: I34b02e7904cd7f2dea74197f73fa648141d15212
Reviewed-on: https://go-review.googlesource.com/c/go/+/195679
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/link/dwarf_test.go
src/debug/elf/file.go