aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/internal/objfile
diff options
context:
space:
mode:
authorJeremy Faller <jeremy@golang.org>2020-07-29 11:06:02 -0400
committerJeremy Faller <jeremy@golang.org>2020-08-10 16:55:06 +0000
commit9bdaf99966e4bacb0dd268d773a617a3a3b93f3a (patch)
tree47f3138aa07c00da551e776ba457a583fb4cf6b2 /src/cmd/internal/objfile
parent8370cbe64de345d4635e53202a04712ee6f777e5 (diff)
downloadgo-9bdaf99966e4bacb0dd268d773a617a3a3b93f3a.tar.xz
[dev.link] use per package filenames to build pclntab
In order to prevent renumbering of filenames in pclntab generation, use the per-package file list (previously only used for DWARF generation) as file-indices. This is the largest step to eliminate renumbering of filenames in pclntab. Note, this is probably not the final state of the file table within the object file. In this form, the linker loads all filenames for all objects. I'll move to storing the filenames as regular string symbols,and defaulting all string symbols to using the larger hash value to make generation of pcln simplest, and most memory friendly. Change-Id: I23daafa3f4b4535076e23100200ae0e7163aafe0 Reviewed-on: https://go-review.googlesource.com/c/go/+/245485 Run-TryBot: Jeremy Faller <jeremy@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com>
Diffstat (limited to 'src/cmd/internal/objfile')
-rw-r--r--src/cmd/internal/objfile/goobj.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/internal/objfile/goobj.go b/src/cmd/internal/objfile/goobj.go
index 7c04b6d5ce..e1c2fd5d5c 100644
--- a/src/cmd/internal/objfile/goobj.go
+++ b/src/cmd/internal/objfile/goobj.go
@@ -135,7 +135,7 @@ func (f *goobjFile) PCToLine(pc uint64) (string, int, *gosym.Func) {
return "", 0, nil
}
fileID := int(pcValue(pcfile, pc-uint64(s.Data.Offset), arch))
- fileName := s.Func.File[fileID]
+ fileName := f.goobj.FileList[fileID]
pcline := make([]byte, s.Func.PCLine.Size)
_, err = f.f.ReadAt(pcline, s.Func.PCLine.Offset)
if err != nil {