@@ -480,7 +480,18 @@ var pinnedTypemaps []map[typeOff]*_type
480
480
// the relocated one.
481
481
var aixStaticDataBase uintptr // linker symbol
482
482
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
484
495
var lastmoduledatap * moduledata // linker symbol
485
496
486
497
var modulesSlice * []* moduledata // see activeModules
@@ -591,6 +602,16 @@ func moduledataverify() {
591
602
592
603
const debugPcln = false
593
604
605
+ // moduledataverify1 should be an internal detail,
606
+ // but widely used packages access it using linkname.
607
+ // Notable members of the hall of shame include:
608
+ // - github.com/bytedance/sonic
609
+ //
610
+ // Do not remove or change the type signature.
611
+ // See go.dev/issues/67401.
612
+ // See go.dev/issues/71672.
613
+ //
614
+ //go:linkname moduledataverify1
594
615
func moduledataverify1 (datap * moduledata ) {
595
616
// Check that the pclntab's format is valid.
596
617
hdr := datap .pcHeader
0 commit comments