cmd/link,runtime: merge minfunc const info internal/abi

For #59670

Change-Id: If2b05b1ba30b607b518577b0e11ba5a0b07999c5
GitHub-Last-Rev: a664aa18b5
GitHub-Pull-Request: golang/go#64906
Reviewed-on: https://go-review.googlesource.com/c/go/+/553276
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
qiulaidongfeng 2024-01-06 07:12:43 +00:00 committed by Gopher Robot
parent a557f9dcd7
commit 40fab294de
6 changed files with 11 additions and 12 deletions

View file

@ -14,6 +14,7 @@ import (
"cmd/link/internal/sym"
"encoding/binary"
"fmt"
"internal/abi"
"internal/buildcfg"
"io"
"regexp"
@ -154,8 +155,8 @@ func assignAddress(ldr *loader.Loader, sect *sym.Section, n int, s loader.Sym, v
// However, there is no PC register, only PC_F and PC_B. PC_F denotes the function,
// PC_B the resume point inside of that function. The entry of the function has PC_B = 0.
ldr.SetSymSect(s, sect)
ldr.SetSymValue(s, int64(funcValueOffset+va/ld.MINFUNC)<<16) // va starts at zero
va += uint64(ld.MINFUNC)
ldr.SetSymValue(s, int64(funcValueOffset+va/abi.MINFUNC)<<16) // va starts at zero
va += uint64(abi.MINFUNC)
return sect, n, va
}