Files
garble/go_std_tables.go
Daniel Martí aed2fd2659 add support for Go 1.25 and drop support for 1.24
While strictly speaking it would be okay to leave Go 1.24 support
in place for the time being, we are behind on a few tasks at the moment
so it's best to keep the setup at master simpler for the next release.
Go 1.25 already came out two weeks ago, and it seems to have been
a fairly smooth release, so I don't suspect any end users will have
trouble upgrading to it.

Note that two changes were necessary for garble to work on Go 1.25.0.

First, we stop deduplicating runtimeAndLinknamed with runtimeAndDeps.
Otherwise, for GOOS=windows, internal/runtime/cgroup would be missing
as it is a //go:linkname target from runtime on all platforms,
but it is not transitively imported from runtime on GOOS=windows.

Second, the testing/synctest package is now part of std,
and it is a //go:linkname target from the testing package
but not a transitive import from it. Teach appendListedPackages that,
when loading all packages for a `go test` run, it should load
the new testing/synctest package too.

Fixes #968.
2025-08-30 21:38:24 +01:00

272 lines
10 KiB
Go

// Code generated by scripts/gen_go_std_tables.go; DO NOT EDIT.
// Generated from Go versions [go1.25.0].
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.25
"internal/asan": true, // go1.25
"internal/bytealg": true, // go1.25
"internal/byteorder": true, // go1.25
"internal/chacha8rand": true, // go1.25
"internal/coverage/rtcov": true, // go1.25
"internal/cpu": true, // go1.25
"internal/goarch": true, // go1.25
"internal/godebugs": true, // go1.25
"internal/goexperiment": true, // go1.25
"internal/goos": true, // go1.25
"internal/msan": true, // go1.25
"internal/profilerecord": true, // go1.25
"internal/race": true, // go1.25
"internal/runtime/atomic": true, // go1.25
"internal/runtime/cgroup": true, // go1.25
"internal/runtime/exithook": true, // go1.25
"internal/runtime/gc": true, // go1.25
"internal/runtime/maps": true, // go1.25
"internal/runtime/math": true, // go1.25
"internal/runtime/strconv": true, // go1.25
"internal/runtime/sys": true, // go1.25
"internal/runtime/syscall": true, // go1.25
"internal/stringslite": true, // go1.25
"internal/trace/tracev2": true, // go1.25
"runtime": true, // go1.25
"unsafe": true, // go1.25
}
// 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 = []string{
"arena", // go1.25
"crypto/internal/boring", // go1.25
"crypto/internal/boring/bcache", // go1.25
"crypto/internal/fips140", // go1.25
"crypto/internal/sysrand", // go1.25
"crypto/rand", // go1.25
"crypto/x509/internal/macos", // go1.25
"internal/bytealg", // go1.25
"internal/coverage/cfile", // go1.25
"internal/cpu", // go1.25
"internal/godebug", // go1.25
"internal/poll", // go1.25
"internal/race", // go1.25
"internal/reflectlite", // go1.25
"internal/runtime/atomic", // go1.25
"internal/runtime/cgroup", // go1.25
"internal/runtime/maps", // go1.25
"internal/sync", // go1.25
"internal/synctest", // go1.25
"internal/syscall/unix", // go1.25
"internal/syscall/windows", // go1.25
"maps", // go1.25
"os", // go1.25
"os/signal", // go1.25
"plugin", // go1.25
"reflect", // go1.25
"runtime", // go1.25
"runtime/debug", // go1.25
"runtime/metrics", // go1.25
"runtime/pprof", // go1.25
"runtime/trace", // go1.25
"sync", // go1.25
"sync/atomic", // go1.25
"sync_test", // go1.25
"syscall", // go1.25
"syscall/js", // go1.25
"time", // go1.25
"unique", // go1.25
"weak", // go1.25
// The net package linknames to the runtime, not the other way around.
// TODO: support this automatically via our script.
"net",
}
var compilerIntrinsics = map[string]map[string]bool{
"internal/runtime/atomic": {
"And": true, // go1.25
"And32": true, // go1.25
"And64": true, // go1.25
"And8": true, // go1.25
"Anduintptr": true, // go1.25
"Cas": true, // go1.25
"Cas64": true, // go1.25
"CasRel": true, // go1.25
"Casint32": true, // go1.25
"Casint64": true, // go1.25
"Casp1": true, // go1.25
"Casuintptr": true, // go1.25
"Load": true, // go1.25
"Load64": true, // go1.25
"Load8": true, // go1.25
"LoadAcq": true, // go1.25
"LoadAcq64": true, // go1.25
"LoadAcquintptr": true, // go1.25
"Loadint32": true, // go1.25
"Loadint64": true, // go1.25
"Loadp": true, // go1.25
"Loaduint": true, // go1.25
"Loaduintptr": true, // go1.25
"Or": true, // go1.25
"Or32": true, // go1.25
"Or64": true, // go1.25
"Or8": true, // go1.25
"Oruintptr": true, // go1.25
"Store": true, // go1.25
"Store64": true, // go1.25
"Store8": true, // go1.25
"StoreRel": true, // go1.25
"StoreRel64": true, // go1.25
"StoreReluintptr": true, // go1.25
"Storeint32": true, // go1.25
"Storeint64": true, // go1.25
"StorepNoWB": true, // go1.25
"Storeuintptr": true, // go1.25
"Xadd": true, // go1.25
"Xadd64": true, // go1.25
"Xaddint32": true, // go1.25
"Xaddint64": true, // go1.25
"Xadduintptr": true, // go1.25
"Xchg": true, // go1.25
"Xchg64": true, // go1.25
"Xchg8": true, // go1.25
"Xchgint32": true, // go1.25
"Xchgint64": true, // go1.25
"Xchguintptr": true, // go1.25
},
"internal/runtime/maps": {
"bitsetFirst": true, // go1.25
"bitsetLowestSet": true, // go1.25
"bitsetRemoveBelow": true, // go1.25
"bitsetShiftOutLowest": true, // go1.25
"ctrlGroupMatchEmpty": true, // go1.25
"ctrlGroupMatchEmptyOrDeleted": true, // go1.25
"ctrlGroupMatchFull": true, // go1.25
"ctrlGroupMatchH2": true, // go1.25
},
"internal/runtime/math": {
"MulUintptr": true, // go1.25
},
"internal/runtime/sys": {
"Bswap32": true, // go1.25
"Bswap64": true, // go1.25
"Len64": true, // go1.25
"Len8": true, // go1.25
"OnesCount64": true, // go1.25
"Prefetch": true, // go1.25
"PrefetchStreamed": true, // go1.25
"TrailingZeros32": true, // go1.25
"TrailingZeros64": true, // go1.25
"TrailingZeros8": true, // go1.25
},
"math": {
"Abs": true, // go1.25
"Ceil": true, // go1.25
"Copysign": true, // go1.25
"FMA": true, // go1.25
"Floor": true, // go1.25
"Round": true, // go1.25
"RoundToEven": true, // go1.25
"Trunc": true, // go1.25
"sqrt": true, // go1.25
},
"math/big": {
"mulWW": true, // go1.25
},
"math/bits": {
"Add": true, // go1.25
"Add64": true, // go1.25
"Div": true, // go1.25
"Div64": true, // go1.25
"Len": true, // go1.25
"Len16": true, // go1.25
"Len32": true, // go1.25
"Len64": true, // go1.25
"Len8": true, // go1.25
"Mul": true, // go1.25
"Mul64": true, // go1.25
"OnesCount": true, // go1.25
"OnesCount16": true, // go1.25
"OnesCount32": true, // go1.25
"OnesCount64": true, // go1.25
"OnesCount8": true, // go1.25
"Reverse": true, // go1.25
"Reverse16": true, // go1.25
"Reverse32": true, // go1.25
"Reverse64": true, // go1.25
"Reverse8": true, // go1.25
"ReverseBytes16": true, // go1.25
"ReverseBytes32": true, // go1.25
"ReverseBytes64": true, // go1.25
"RotateLeft": true, // go1.25
"RotateLeft16": true, // go1.25
"RotateLeft32": true, // go1.25
"RotateLeft64": true, // go1.25
"RotateLeft8": true, // go1.25
"Sub": true, // go1.25
"Sub64": true, // go1.25
"TrailingZeros16": true, // go1.25
"TrailingZeros32": true, // go1.25
"TrailingZeros64": true, // go1.25
"TrailingZeros8": true, // go1.25
},
"runtime": {
"publicationBarrier": true, // go1.25
},
"sync": {
"runtime_LoadAcquintptr": true, // go1.25
"runtime_StoreReluintptr": true, // go1.25
},
"sync/atomic": {
"AddInt32": true, // go1.25
"AddInt64": true, // go1.25
"AddUint32": true, // go1.25
"AddUint64": true, // go1.25
"AddUintptr": true, // go1.25
"AndInt32": true, // go1.25
"AndInt64": true, // go1.25
"AndUint32": true, // go1.25
"AndUint64": true, // go1.25
"AndUintptr": true, // go1.25
"CompareAndSwapInt32": true, // go1.25
"CompareAndSwapInt64": true, // go1.25
"CompareAndSwapUint32": true, // go1.25
"CompareAndSwapUint64": true, // go1.25
"CompareAndSwapUintptr": true, // go1.25
"LoadInt32": true, // go1.25
"LoadInt64": true, // go1.25
"LoadPointer": true, // go1.25
"LoadUint32": true, // go1.25
"LoadUint64": true, // go1.25
"LoadUintptr": true, // go1.25
"OrInt32": true, // go1.25
"OrInt64": true, // go1.25
"OrUint32": true, // go1.25
"OrUint64": true, // go1.25
"OrUintptr": true, // go1.25
"StoreInt32": true, // go1.25
"StoreInt64": true, // go1.25
"StoreUint32": true, // go1.25
"StoreUint64": true, // go1.25
"StoreUintptr": true, // go1.25
"SwapInt32": true, // go1.25
"SwapInt64": true, // go1.25
"SwapUint32": true, // go1.25
"SwapUint64": true, // go1.25
"SwapUintptr": true, // go1.25
},
}
var reflectSkipPkg = map[string]bool{
"fmt": true,
}