Skip to content

Commit

Permalink
runtime: add linkname back on
Browse files Browse the repository at this point in the history
  • Loading branch information
AsterDY committed Feb 12, 2025
1 parent b941d2b commit 1cf62be
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/runtime/symtab.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 runtime.lastmoduledatap
var lastmoduledatap *moduledata // linker symbol

var modulesSlice *[]*moduledata // see activeModules
Expand Down

0 comments on commit 1cf62be

Please sign in to comment.