mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[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>
This commit is contained in:
parent
8370cbe64d
commit
9bdaf99966
16 changed files with 126 additions and 143 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue