aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/internal/obj/objfile.go
diff options
context:
space:
mode:
authorHeschi Kreinick <heschi@google.com>2018-04-12 17:07:14 -0400
committerHeschi Kreinick <heschi@google.com>2018-04-20 19:51:37 +0000
commit393f84a125bf42863e8698748cbbca893771c925 (patch)
tree26aaadc8f7808795c224052f040aed641748fa2c /src/cmd/internal/obj/objfile.go
parent568d6f983172706d2f5f7f66024b7b7a544ada53 (diff)
downloadgo-393f84a125bf42863e8698748cbbca893771c925.tar.xz
cmd/ld: link to runtime types from DWARF
Add a new DWARF attribute, DW_AT_go_runtime_type, that gives the offset of the runtime type structure, if any, for a DWARF type. This should allow debuggers to decode interface content without having to do awkward name matching. Fixes #24814 Change-Id: Ic7a66524d2be484154c584afa9697111618efea4 Reviewed-on: https://go-review.googlesource.com/106775 Reviewed-by: Alessandro Arzilli <alessandro.arzilli@gmail.com> Reviewed-by: David Chase <drchase@google.com>
Diffstat (limited to 'src/cmd/internal/obj/objfile.go')
-rw-r--r--src/cmd/internal/obj/objfile.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cmd/internal/obj/objfile.go b/src/cmd/internal/obj/objfile.go
index a973680f76..ef9ce4c688 100644
--- a/src/cmd/internal/obj/objfile.go
+++ b/src/cmd/internal/obj/objfile.go
@@ -457,6 +457,9 @@ func (c dwCtxt) AddAddress(s dwarf.Sym, data interface{}, value int64) {
}
}
func (c dwCtxt) AddSectionOffset(s dwarf.Sym, size int, t interface{}, ofs int64) {
+ panic("should be used only in the linker")
+}
+func (c dwCtxt) AddDWARFSectionOffset(s dwarf.Sym, size int, t interface{}, ofs int64) {
ls := s.(*LSym)
rsym := t.(*LSym)
ls.WriteAddr(c.Link, ls.Size, size, rsym, ofs)