diff --git a/src/internal/cpu/cpu_windows.go b/src/internal/cpu/cpu_windows.go index e921a9566e..3587c0dbbb 100644 --- a/src/internal/cpu/cpu_windows.go +++ b/src/internal/cpu/cpu_windows.go @@ -16,5 +16,5 @@ const ( // isProcessorFeaturePresent calls windows IsProcessorFeaturePresent API. // -//go:linkname isProcessorFeaturePresent +//go:linknamestd isProcessorFeaturePresent func isProcessorFeaturePresent(processorFeature uint32) bool // Implemented in runtime package. diff --git a/src/internal/runtime/atomic/linkname.go b/src/internal/runtime/atomic/linkname.go index e5ddcf76e0..72636465fb 100644 --- a/src/internal/runtime/atomic/linkname.go +++ b/src/internal/runtime/atomic/linkname.go @@ -8,27 +8,27 @@ import _ "unsafe" // for linkname // Export some functions via linkname to assembly in sync/atomic. // -//go:linkname Load -//go:linkname Loadp -//go:linkname Load64 -//go:linkname Loaduintptr -//go:linkname Xadd -//go:linkname Xadd64 -//go:linkname Xadduintptr -//go:linkname Xchg -//go:linkname Xchg64 -//go:linkname Xchguintptr -//go:linkname Cas -//go:linkname Cas64 -//go:linkname Casint32 -//go:linkname Casint64 -//go:linkname Casuintptr -//go:linkname Store -//go:linkname Store64 -//go:linkname Storeuintptr -//go:linkname And32 -//go:linkname And64 -//go:linkname Anduintptr -//go:linkname Or32 -//go:linkname Or64 -//go:linkname Oruintptr +//go:linknamestd Load +//go:linknamestd Loadp +//go:linknamestd Load64 +//go:linknamestd Loaduintptr +//go:linknamestd Xadd +//go:linknamestd Xadd64 +//go:linknamestd Xadduintptr +//go:linknamestd Xchg +//go:linknamestd Xchg64 +//go:linknamestd Xchguintptr +//go:linknamestd Cas +//go:linknamestd Cas64 +//go:linknamestd Casint32 +//go:linknamestd Casint64 +//go:linknamestd Casuintptr +//go:linknamestd Store +//go:linknamestd Store64 +//go:linknamestd Storeuintptr +//go:linknamestd And32 +//go:linknamestd And64 +//go:linknamestd Anduintptr +//go:linknamestd Or32 +//go:linknamestd Or64 +//go:linknamestd Oruintptr diff --git a/src/internal/runtime/maps/runtime.go b/src/internal/runtime/maps/runtime.go index 39017c6fa8..4b6051d73e 100644 --- a/src/internal/runtime/maps/runtime.go +++ b/src/internal/runtime/maps/runtime.go @@ -19,7 +19,7 @@ import ( //go:linkname fatal func fatal(s string) -//go:linkname bootstrapRand runtime.bootstrapRand +//go:linknamestd bootstrapRand runtime.bootstrapRand func bootstrapRand() uint64 //go:linkname rand diff --git a/src/reflect/type.go b/src/reflect/type.go index f03bc322fe..cb040037b7 100644 --- a/src/reflect/type.go +++ b/src/reflect/type.go @@ -1719,6 +1719,8 @@ func haveIdenticalUnderlyingType(T, V *abi.Type, cmpTags bool) bool { // there can be more than one with a given string. // Only types we might want to look up are included: // pointers, channels, maps, slices, and arrays. +// +//go:linknamestd compiledTypelinks func compiledTypelinks() ([]*abi.Type, [][]*abi.Type) // rtypeOff should be an internal detail, @@ -2775,7 +2777,7 @@ func adjustAIXGCData(addr *byte) *byte { // adjustAIXGCDataForRuntime adjusts the GCData field pointer // as the runtime requires for AIX. See runtime.getGCMaskOnDemand. // -//go:linkname adjustAIXGCDataForRuntime +//go:linknamestd adjustAIXGCDataForRuntime //go:noescape func adjustAIXGCDataForRuntime(*byte) *byte diff --git a/src/runtime/os_windows.go b/src/runtime/os_windows.go index 5af1b03788..42af420054 100644 --- a/src/runtime/os_windows.go +++ b/src/runtime/os_windows.go @@ -263,7 +263,7 @@ func windows_QueryPerformanceFrequency() int64 { return frequency } -//go:linkname cpu_isProcessorFeaturePresent internal/cpu.isProcessorFeaturePresent +//go:linknamestd cpu_isProcessorFeaturePresent internal/cpu.isProcessorFeaturePresent func cpu_isProcessorFeaturePresent(processorFeature uint32) bool { ret := stdcall(_IsProcessorFeaturePresent, uintptr(processorFeature)) return ret != 0 diff --git a/src/runtime/runtime1.go b/src/runtime/runtime1.go index 835aa8eced..97f3d8e887 100644 --- a/src/runtime/runtime1.go +++ b/src/runtime/runtime1.go @@ -655,7 +655,7 @@ func reflect_typelinks() ([]unsafe.Pointer, [][]int32) { // slice for the main module, and a slice of slices, normally nil, // for other modules. // -//go:linkname reflect_compiledTypelinks reflect.compiledTypelinks +//go:linknamestd reflect_compiledTypelinks reflect.compiledTypelinks func reflect_compiledTypelinks() ([]*abi.Type, [][]*abi.Type) { modules := activeModules() firstTypes := moduleTypelinks(modules[0]) @@ -753,7 +753,7 @@ func reflect_addReflectOff(ptr unsafe.Pointer) int32 { // the new address to use. This is only called on AIX. // See getGCMaskOnDemand. // -//go:linkname reflect_adjustAIXGCDataForRuntime reflect.adjustAIXGCDataForRuntime +//go:linknamestd reflect_adjustAIXGCDataForRuntime reflect.adjustAIXGCDataForRuntime func reflect_adjustAIXGCDataForRuntime(addr *byte) *byte { return (*byte)(add(unsafe.Pointer(addr), aixStaticDataBase-firstmoduledata.data)) }