mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.link] cmd/link: hoist dwarfGenerateDebugSyms out of dodata()
Hoist dwarfGenerateDebugSyms call up out of dodata to before loadlibfull. This required a couple of small tweaks to the loader and to loadlibfull. Change-Id: I48ffb450d2e48b9e55775b73a6debcd27dbb7b9c Reviewed-on: https://go-review.googlesource.com/c/go/+/228221 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jeremy Faller <jeremy@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
This commit is contained in:
parent
3216d14f78
commit
eed3ef581b
5 changed files with 21 additions and 22 deletions
|
|
@ -2801,6 +2801,16 @@ func (ctxt *Link) loadlibfull() {
|
|||
// Convert special symbols created by pcln.
|
||||
pclntabFirstFunc = ctxt.loader.Syms[pclntabFirstFunc2]
|
||||
pclntabLastFunc = ctxt.loader.Syms[pclntabLastFunc2]
|
||||
|
||||
// Populate dwarfp from dwarfp2. If we see a symbol index on dwarfp2
|
||||
// whose loader.Syms entry is nil, something went wrong.
|
||||
for _, symIdx := range dwarfp2 {
|
||||
s := ctxt.loader.Syms[symIdx]
|
||||
if s == nil {
|
||||
panic(fmt.Sprintf("nil sym for dwarfp2 element %d", symIdx))
|
||||
}
|
||||
dwarfp = append(dwarfp, s)
|
||||
}
|
||||
}
|
||||
|
||||
func (ctxt *Link) dumpsyms() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue