diff options
| author | Matthew Dempsky <mdempsky@google.com> | 2023-08-31 21:17:46 -0700 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2023-09-01 20:40:28 +0000 |
| commit | 227ec028244b8ad91c7dd5b69fca5150f99a4878 (patch) | |
| tree | 889a6988247e0ff0e2175c37f519b88b378dd378 /src/cmd/internal/obj | |
| parent | 9b0140a6954d65e7a83a7d45a72995ca87301f69 (diff) | |
| download | go-227ec028244b8ad91c7dd5b69fca5150f99a4878.tar.xz | |
cmd/internal/dwarf: replace Sym.Length with Context.Size
Preparatory refactoring before next CL.
Change-Id: I06fb4670b933fddff1a2a70f3cf1eb124cbd86ee
Reviewed-on: https://go-review.googlesource.com/c/go/+/524899
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Diffstat (limited to 'src/cmd/internal/obj')
| -rw-r--r-- | src/cmd/internal/obj/dwarf.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/cmd/internal/obj/dwarf.go b/src/cmd/internal/obj/dwarf.go index f5caa08f0a..47882723dd 100644 --- a/src/cmd/internal/obj/dwarf.go +++ b/src/cmd/internal/obj/dwarf.go @@ -207,6 +207,9 @@ type dwCtxt struct{ *Link } func (c dwCtxt) PtrSize() int { return c.Arch.PtrSize } +func (c dwCtxt) Size(s dwarf.Sym) int64 { + return s.(*LSym).Size +} func (c dwCtxt) AddInt(s dwarf.Sym, size int, i int64) { ls := s.(*LSym) ls.WriteInt(c.Link, ls.Size, size, i) @@ -315,10 +318,6 @@ func (ctxt *Link) dwarfSym(s *LSym) (dwarfInfoSym, dwarfLocSym, dwarfRangesSym, return fn.dwarfInfoSym, fn.dwarfLocSym, fn.dwarfRangesSym, fn.dwarfAbsFnSym, fn.dwarfDebugLinesSym } -func (s *LSym) Length(dwarfContext interface{}) int64 { - return s.Size -} - // textPos returns the source position of the first instruction (prog) // of the specified function. func textPos(fn *LSym) src.XPos { |
