Files
garble/go_std_tables.go
Daniel Martí 7114403786 drop Go 1.25, support Go 1.26
Beyond the usual updating of version strings, re-running `go generate`,
and updating the patches for the linker, we needed extra changes.

First, the linker started being stricter about which packages
are allowed to linkname runtime names by import path.
Stop obfuscating import paths in runtimeAndLinknamed.

Second, the compiler's intrinsics code adds an "add" function
much like the existing "addF", so tweak the regular expression.

Third, note that there is a new runtimeAndDeps windows-only package,
which we find thanks to the recent improvement to cover many platforms.

Fourth, the code around magic numbers in the runtime has changed,
so rewrite the code which patches it via go/ast.

Fixes #990.
2026-03-15 23:36:56 +01:00

293 lines
12 KiB
Go

// Code generated by scripts/gen_go_std_tables.go; DO NOT EDIT.
// Generated from Go versions [go1.26.1].
package main
// runtimeAndDeps contains the runtime package and all of its transitive dependencies
// as reported by 'go list -deps'.
var runtimeAndDeps = map[string]bool{
"internal/abi": true, // go1.26 linux/amd64
"internal/asan": true, // go1.26 linux/amd64
"internal/bytealg": true, // go1.26 linux/amd64
"internal/byteorder": true, // go1.26 linux/amd64
"internal/chacha8rand": true, // go1.26 linux/amd64
"internal/coverage/rtcov": true, // go1.26 linux/amd64
"internal/cpu": true, // go1.26 linux/amd64
"internal/goarch": true, // go1.26 linux/amd64
"internal/godebugs": true, // go1.26 linux/amd64
"internal/goexperiment": true, // go1.26 linux/amd64
"internal/goos": true, // go1.26 linux/amd64
"internal/msan": true, // go1.26 linux/amd64
"internal/profilerecord": true, // go1.26 linux/amd64
"internal/race": true, // go1.26 linux/amd64
"internal/runtime/atomic": true, // go1.26 linux/amd64
"internal/runtime/cgroup": true, // go1.26 linux/amd64
"internal/runtime/exithook": true, // go1.26 linux/amd64
"internal/runtime/gc": true, // go1.26 linux/amd64
"internal/runtime/gc/scan": true, // go1.26 linux/amd64
"internal/runtime/maps": true, // go1.26 linux/amd64
"internal/runtime/math": true, // go1.26 linux/amd64
"internal/runtime/pprof/label": true, // go1.26 linux/amd64
"internal/runtime/sys": true, // go1.26 linux/amd64
"internal/runtime/syscall/linux": true, // go1.26 linux/amd64
"internal/runtime/syscall/windows": true, // go1.26 windows/386
"internal/strconv": true, // go1.26 linux/amd64
"internal/stringslite": true, // go1.26 linux/amd64
"internal/trace/tracev2": true, // go1.26 linux/amd64
"math/bits": true, // go1.26 linux/amd64
"runtime": true, // go1.26 linux/amd64
"unsafe": true, // go1.26 linux/amd64
}
// runtimeAndLinknamed contains the runtime package and all the packages
// which it points to via //go:linkname directives.
// We need to track these as some are not imported as transitive dependencies,
// and we need to load these to properly obfuscate the linkname target names.
//
// Note that runtimeAndLinknamed may contain duplicates with runtimeAndDeps.
// This is on purpose; some packages are in runtimeAndDeps via 'go list -deps'
// but not transitively imported on some platforms, even though they are used
// from the runtime package via //go:linkname directives on those platforms.
// To make sure we have coverage on all platforms, we allow duplicates.
var runtimeAndLinknamed = map[string]bool{
"arena": true, // go1.26
"crypto/fips140": true, // go1.26
"crypto/internal/boring": true, // go1.26
"crypto/internal/boring/bcache": true, // go1.26
"crypto/internal/fips140": true, // go1.26
"crypto/internal/sysrand": true, // go1.26
"crypto/rand": true, // go1.26
"crypto/subtle": true, // go1.26
"crypto/x509/internal/macos": true, // go1.26
"internal/bytealg": true, // go1.26
"internal/coverage/cfile": true, // go1.26
"internal/cpu": true, // go1.26
"internal/godebug": true, // go1.26
"internal/poll": true, // go1.26
"internal/race": true, // go1.26
"internal/reflectlite": true, // go1.26
"internal/runtime/atomic": true, // go1.26
"internal/runtime/cgroup": true, // go1.26
"internal/runtime/maps": true, // go1.26
"internal/sync": true, // go1.26
"internal/synctest": true, // go1.26
"internal/syscall/unix": true, // go1.26
"internal/syscall/windows": true, // go1.26
"maps": true, // go1.26
"os": true, // go1.26
"os/signal": true, // go1.26
"plugin": true, // go1.26
"reflect": true, // go1.26
"runtime": true, // go1.26
"runtime/debug": true, // go1.26
"runtime/metrics": true, // go1.26
"runtime/pprof": true, // go1.26
"runtime/secret": true, // go1.26
"runtime/trace": true, // go1.26
"sync": true, // go1.26
"sync/atomic": true, // go1.26
"sync_test": true, // go1.26
"syscall": true, // go1.26
"syscall/js": true, // go1.26
"time": true, // go1.26
"unique": true, // go1.26
"weak": true, // go1.26
// The net package linknames to the runtime, not the other way around.
"net": true,
// The testing package uses a //go:linkname directive pointing to testing/synctest,
// but it doesn't import the package, presumably to avoid an import cycle.
"testing/synctest": true,
}
var compilerIntrinsics = map[string]map[string]bool{
"crypto/internal/constanttime": {
"Select": true, // go1.26
"boolToUint8": true, // go1.26
},
"internal/runtime/atomic": {
"And": true, // go1.26
"And32": true, // go1.26
"And64": true, // go1.26
"And8": true, // go1.26
"Anduintptr": true, // go1.26
"Cas": true, // go1.26
"Cas64": true, // go1.26
"CasRel": true, // go1.26
"Casint32": true, // go1.26
"Casint64": true, // go1.26
"Casp1": true, // go1.26
"Casuintptr": true, // go1.26
"Load": true, // go1.26
"Load64": true, // go1.26
"Load8": true, // go1.26
"LoadAcq": true, // go1.26
"LoadAcq64": true, // go1.26
"LoadAcquintptr": true, // go1.26
"Loadint32": true, // go1.26
"Loadint64": true, // go1.26
"Loadp": true, // go1.26
"Loaduint": true, // go1.26
"Loaduintptr": true, // go1.26
"Or": true, // go1.26
"Or32": true, // go1.26
"Or64": true, // go1.26
"Or8": true, // go1.26
"Oruintptr": true, // go1.26
"Store": true, // go1.26
"Store64": true, // go1.26
"Store8": true, // go1.26
"StoreRel": true, // go1.26
"StoreRel64": true, // go1.26
"StoreReluintptr": true, // go1.26
"Storeint32": true, // go1.26
"Storeint64": true, // go1.26
"StorepNoWB": true, // go1.26
"Storeuintptr": true, // go1.26
"Xadd": true, // go1.26
"Xadd64": true, // go1.26
"Xaddint32": true, // go1.26
"Xaddint64": true, // go1.26
"Xadduintptr": true, // go1.26
"Xchg": true, // go1.26
"Xchg64": true, // go1.26
"Xchg8": true, // go1.26
"Xchgint32": true, // go1.26
"Xchgint64": true, // go1.26
"Xchguintptr": true, // go1.26
},
"internal/runtime/maps": {
"bitsetFirst": true, // go1.26
"bitsetLowestSet": true, // go1.26
"bitsetRemoveBelow": true, // go1.26
"bitsetShiftOutLowest": true, // go1.26
"ctrlGroupMatchEmpty": true, // go1.26
"ctrlGroupMatchEmptyOrDeleted": true, // go1.26
"ctrlGroupMatchFull": true, // go1.26
"ctrlGroupMatchH2": true, // go1.26
},
"internal/runtime/math": {
"Add64": true, // go1.26
"Mul64": true, // go1.26
"MulUintptr": true, // go1.26
},
"internal/runtime/sys": {
"Bswap32": true, // go1.26
"Bswap64": true, // go1.26
"GetCallerPC": true, // go1.26
"GetCallerSP": true, // go1.26
"GetClosurePtr": true, // go1.26
"Len64": true, // go1.26
"Len8": true, // go1.26
"OnesCount64": true, // go1.26
"Prefetch": true, // go1.26
"PrefetchStreamed": true, // go1.26
"TrailingZeros32": true, // go1.26
"TrailingZeros64": true, // go1.26
"TrailingZeros8": true, // go1.26
},
"math": {
"Abs": true, // go1.26
"Ceil": true, // go1.26
"Copysign": true, // go1.26
"FMA": true, // go1.26
"Floor": true, // go1.26
"Round": true, // go1.26
"RoundToEven": true, // go1.26
"Trunc": true, // go1.26
"sqrt": true, // go1.26
},
"math/big": {
"mulWW": true, // go1.26
},
"math/bits": {
"Add": true, // go1.26
"Add64": true, // go1.26
"Div": true, // go1.26
"Div64": true, // go1.26
"Len": true, // go1.26
"Len16": true, // go1.26
"Len32": true, // go1.26
"Len64": true, // go1.26
"Len8": true, // go1.26
"Mul": true, // go1.26
"Mul64": true, // go1.26
"OnesCount": true, // go1.26
"OnesCount16": true, // go1.26
"OnesCount32": true, // go1.26
"OnesCount64": true, // go1.26
"OnesCount8": true, // go1.26
"Reverse": true, // go1.26
"Reverse16": true, // go1.26
"Reverse32": true, // go1.26
"Reverse64": true, // go1.26
"Reverse8": true, // go1.26
"ReverseBytes16": true, // go1.26
"ReverseBytes32": true, // go1.26
"ReverseBytes64": true, // go1.26
"RotateLeft": true, // go1.26
"RotateLeft16": true, // go1.26
"RotateLeft32": true, // go1.26
"RotateLeft64": true, // go1.26
"RotateLeft8": true, // go1.26
"Sub": true, // go1.26
"Sub64": true, // go1.26
"TrailingZeros16": true, // go1.26
"TrailingZeros32": true, // go1.26
"TrailingZeros64": true, // go1.26
"TrailingZeros8": true, // go1.26
},
"runtime": {
"KeepAlive": true, // go1.26
"memequal": true, // go1.26
"publicationBarrier": true, // go1.26
"slicebytetostringtmp": true, // go1.26
},
"sync": {
"runtime_LoadAcquintptr": true, // go1.26
"runtime_StoreReluintptr": true, // go1.26
},
"sync/atomic": {
"AddInt32": true, // go1.26
"AddInt64": true, // go1.26
"AddUint32": true, // go1.26
"AddUint64": true, // go1.26
"AddUintptr": true, // go1.26
"AndInt32": true, // go1.26
"AndInt64": true, // go1.26
"AndUint32": true, // go1.26
"AndUint64": true, // go1.26
"AndUintptr": true, // go1.26
"CompareAndSwapInt32": true, // go1.26
"CompareAndSwapInt64": true, // go1.26
"CompareAndSwapUint32": true, // go1.26
"CompareAndSwapUint64": true, // go1.26
"CompareAndSwapUintptr": true, // go1.26
"LoadInt32": true, // go1.26
"LoadInt64": true, // go1.26
"LoadPointer": true, // go1.26
"LoadUint32": true, // go1.26
"LoadUint64": true, // go1.26
"LoadUintptr": true, // go1.26
"OrInt32": true, // go1.26
"OrInt64": true, // go1.26
"OrUint32": true, // go1.26
"OrUint64": true, // go1.26
"OrUintptr": true, // go1.26
"StoreInt32": true, // go1.26
"StoreInt64": true, // go1.26
"StoreUint32": true, // go1.26
"StoreUint64": true, // go1.26
"StoreUintptr": true, // go1.26
"SwapInt32": true, // go1.26
"SwapInt64": true, // go1.26
"SwapUint32": true, // go1.26
"SwapUint64": true, // go1.26
"SwapUintptr": true, // go1.26
},
}
var reflectSkipPkg = map[string]bool{
"fmt": true,
}