Skip to content

Commit 1cf62be

Browse files
committed
runtime: add linkname back on
1 parent b941d2b commit 1cf62be

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/runtime/symtab.go

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,18 @@ var pinnedTypemaps []map[typeOff]*_type
480480
// the relocated one.
481481
var aixStaticDataBase uintptr // linker symbol
482482

483-
var firstmoduledata moduledata // linker symbol
483+
var firstmoduledata moduledata // linker symbol
484+
485+
// lastmoduledatap should be an internal detail,
486+
// but widely used packages access it using linkname.
487+
// Notable members of the hall of shame include:
488+
// - github.com/bytedance/sonic
489+
//
490+
// Do not remove or change the type signature.
491+
// See go.dev/issues/67401.
492+
// See go.dev/issues/71672.
493+
//
494+
//go:linkname lastmoduledatap runtime.lastmoduledatap
484495
var lastmoduledatap *moduledata // linker symbol
485496

486497
var modulesSlice *[]*moduledata // see activeModules

0 commit comments

Comments
 (0)