aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/internal/obj/link.go
diff options
context:
space:
mode:
authorRyan Brown <ribrdb@google.com>2016-03-14 09:23:04 -0700
committerDavid Crawshaw <crawshaw@golang.org>2016-04-06 23:50:14 +0000
commita037c73ccfc7c35a389e95ffa7996c8dd38e0cde (patch)
tree43efb5763868953000ca4ed0a1d323c6e237daaa /src/cmd/internal/obj/link.go
parent0382a30dd6cd78efd9fb27bfed50dd1d6d7f722b (diff)
downloadgo-a037c73ccfc7c35a389e95ffa7996c8dd38e0cde.tar.xz
cmd/link: generate DWARF info using symbols
This updates dwarf.go to generate debug information as symbols instead of directly writing to the output file. This should make it easier to move generation of some of the debug info into the compiler. Change-Id: Id2358988bfb689865ab4d68f82716f0676336df4 Reviewed-on: https://go-review.googlesource.com/20679 Reviewed-by: David Crawshaw <crawshaw@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/cmd/internal/obj/link.go')
-rw-r--r--src/cmd/internal/obj/link.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cmd/internal/obj/link.go b/src/cmd/internal/obj/link.go
index 24f028f737..9c06e8dec6 100644
--- a/src/cmd/internal/obj/link.go
+++ b/src/cmd/internal/obj/link.go
@@ -423,6 +423,8 @@ const (
SCONST
SDYNIMPORT
SHOSTOBJ
+ SDWARFSECT
+ SDWARFINFO
SSUB = 1 << 8
SMASK = SSUB - 1
SHIDDEN = 1 << 9
@@ -495,6 +497,8 @@ const (
// of a JMP instruction, by encoding the address into the instruction.
// The stack nosplit check ignores this since it is not a function call.
R_JMPMIPS
+ // R_DWARFREF resolves to the offset of the symbol from its section.
+ R_DWARFREF
// Platform dependent relocations. Architectures with fixed width instructions
// have the inherent issue that a 32-bit (or 64-bit!) displacement cannot be