How to Use go

linkname for Accessing Private Runtime Functions

Use the //go:linkname directive to create a public alias for private runtime functions by linking a local name to the external package path.

Use the //go:linkname compiler directive to create a public alias for a private runtime function by specifying the local name and the full external path. Place this directive immediately before the function declaration in your source file, ensuring the external path matches the package and function name exactly.

//go:linkname runtime_arena_newArena runtime.arena_newArena
func runtime_arena_newArena() unsafe.Pointer