]> Cypherpunks repositories - gostls13.git/commitdiff
[release-branch.go1.24] runtime: add some linknames back for `github.com/bytedance...
author段仪 <duanyi.aster@bytedance.com>
Sun, 16 Feb 2025 15:54:37 +0000 (15:54 +0000)
committerGopher Robot <gobot@golang.org>
Wed, 19 Feb 2025 17:12:30 +0000 (09:12 -0800)
Add some linknames back, therefore sonic (github.com/bytedance/sonic) can work correctly.

For #71672
Fixes #71705

Change-Id: Iae86c837d8a714855106a26766aa08b128e17e58
GitHub-Last-Rev: 4de0a4871766f9e7763394fdcdcaa9d683e97987
GitHub-Pull-Request: golang/go#71673
Reviewed-on: https://go-review.googlesource.com/c/go/+/650375
Auto-Submit: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
src/runtime/stubs.go
src/runtime/symtab.go

index 55153a203892179528a4894fe775f15b9d1240bb..ecf97666d75dec9bdca40557d3045e8fd7653dd6 100644 (file)
@@ -312,6 +312,16 @@ func asmcgocall(fn, arg unsafe.Pointer) int32
 
 func morestack()
 
+// morestack_noctxt should be an internal detail,
+// but widely used packages access it using linkname.
+// Notable members of the hall of shame include:
+//   - github.com/bytedance/sonic
+//
+// Do not remove or change the type signature.
+// See go.dev/issues/67401.
+// See go.dev/issues/71672.
+//
+//go:linkname morestack_noctxt
 func morestack_noctxt()
 
 func rt0_go()
index c3bd5103205cf694e4d0c7b9048629c8c1cf53a2..8c6ef2b4fc60816c2e3d428cde3541e04512dd94 100644 (file)
@@ -480,7 +480,18 @@ var pinnedTypemaps []map[typeOff]*_type
 // the relocated one.
 var aixStaticDataBase uintptr // linker symbol
 
-var firstmoduledata moduledata  // linker symbol
+var firstmoduledata moduledata // linker symbol
+
+// lastmoduledatap should be an internal detail,
+// but widely used packages access it using linkname.
+// Notable members of the hall of shame include:
+//   - github.com/bytedance/sonic
+//
+// Do not remove or change the type signature.
+// See go.dev/issues/67401.
+// See go.dev/issues/71672.
+//
+//go:linkname lastmoduledatap
 var lastmoduledatap *moduledata // linker symbol
 
 var modulesSlice *[]*moduledata // see activeModules
@@ -591,6 +602,16 @@ func moduledataverify() {
 
 const debugPcln = false
 
+// moduledataverify1 should be an internal detail,
+// but widely used packages access it using linkname.
+// Notable members of the hall of shame include:
+//   - github.com/bytedance/sonic
+//
+// Do not remove or change the type signature.
+// See go.dev/issues/67401.
+// See go.dev/issues/71672.
+//
+//go:linkname moduledataverify1
 func moduledataverify1(datap *moduledata) {
        // Check that the pclntab's format is valid.
        hdr := datap.pcHeader