]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.regabi] cmd/link: recognize internal/abi as runtime package
authorCherry Zhang <cherryyz@google.com>
Tue, 16 Feb 2021 17:58:48 +0000 (12:58 -0500)
committerCherry Zhang <cherryyz@google.com>
Tue, 16 Feb 2021 18:21:51 +0000 (18:21 +0000)
The runtime imports the internal/abi package. Recognize
internal/abi as a runtime dependent, to make trampoline generation
algorithm work.

Fix ARM build.

Change-Id: I26b6778aa41dcb959bc226ff04abe08a5a82c4f6
Reviewed-on: https://go-review.googlesource.com/c/go/+/292610
Reviewed-by: Than McIntosh <thanm@google.com>
Trust: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>

src/cmd/link/internal/ld/data.go

index 6013e0ab0a11ba10b0149fd7b16122bb1e2854ef..2fb790a6ea540b2458fb01d08f0dfa909aec857c 100644 (file)
@@ -55,6 +55,7 @@ func isRuntimeDepPkg(pkg string) bool {
        switch pkg {
        case "runtime",
                "sync/atomic",      // runtime may call to sync/atomic, due to go:linkname
+               "internal/abi",     // used by reflectcall (and maybe more)
                "internal/bytealg", // for IndexByte
                "internal/cpu":     // for cpu features
                return true