@ -719,13 +719,14 @@ func (tf *transformer) handleDirectives(comments []string) {
// Once we support go:linkname well and once we can obfuscate the runtime
// Once we support go:linkname well and once we can obfuscate the runtime
// package, this entire map can likely go away.
// package, this entire map can likely go away.
//
//
// The list was obtained via scripts/runtime-related.sh on Go 1.1 5.5 .
// The list was obtained via scripts/runtime-related.sh on Go 1.1 6 .
var runtimeRelated = map [ string ] bool {
var runtimeRelated = map [ string ] bool {
"bufio" : true ,
"bufio" : true ,
"bytes" : true ,
"bytes" : true ,
"compress/flate" : true ,
"compress/flate" : true ,
"compress/gzip" : true ,
"compress/gzip" : true ,
"context" : true ,
"context" : true ,
"crypto/x509/internal/macos" : true ,
"encoding/binary" : true ,
"encoding/binary" : true ,
"errors" : true ,
"errors" : true ,
"fmt" : true ,
"fmt" : true ,
@ -734,10 +735,12 @@ var runtimeRelated = map[string]bool{
"internal/bytealg" : true ,
"internal/bytealg" : true ,
"internal/cpu" : true ,
"internal/cpu" : true ,
"internal/fmtsort" : true ,
"internal/fmtsort" : true ,
"internal/nettrace" : true ,
"internal/oserror" : true ,
"internal/oserror" : true ,
"internal/poll" : true ,
"internal/poll" : true ,
"internal/race" : true ,
"internal/race" : true ,
"internal/reflectlite" : true ,
"internal/reflectlite" : true ,
"internal/singleflight" : true ,
"internal/syscall/execenv" : true ,
"internal/syscall/execenv" : true ,
"internal/syscall/unix" : true ,
"internal/syscall/unix" : true ,
"internal/syscall/windows" : true ,
"internal/syscall/windows" : true ,
@ -746,12 +749,13 @@ var runtimeRelated = map[string]bool{
"internal/testlog" : true ,
"internal/testlog" : true ,
"internal/unsafeheader" : true ,
"internal/unsafeheader" : true ,
"io" : true ,
"io" : true ,
"io/ ioutil": true ,
"io/ fs": true ,
"math" : true ,
"math" : true ,
"math/bits" : true ,
"math/bits" : true ,
"net" : true ,
"os" : true ,
"os" : true ,
"os/signal" : true ,
"os/signal" : true ,
"path /filepath ": true ,
"path ": true ,
"plugin" : true ,
"plugin" : true ,
"reflect" : true ,
"reflect" : true ,
"runtime" : true ,
"runtime" : true ,
@ -760,6 +764,7 @@ var runtimeRelated = map[string]bool{
"runtime/internal/atomic" : true ,
"runtime/internal/atomic" : true ,
"runtime/internal/math" : true ,
"runtime/internal/math" : true ,
"runtime/internal/sys" : true ,
"runtime/internal/sys" : true ,
"runtime/metrics" : true ,
"runtime/pprof" : true ,
"runtime/pprof" : true ,
"runtime/trace" : true ,
"runtime/trace" : true ,
"sort" : true ,
"sort" : true ,
@ -774,6 +779,17 @@ var runtimeRelated = map[string]bool{
"unicode/utf16" : true ,
"unicode/utf16" : true ,
"unicode/utf8" : true ,
"unicode/utf8" : true ,
"unsafe" : true ,
"unsafe" : true ,
"vendor/golang.org/x/net/dns/dnsmessage" : true ,
"vendor/golang.org/x/net/route" : true ,
// These packages were moved in Go 1.16, but 1.15's runtime still
// linknames to them.
"io/ioutil" : true ,
"path/filepath" : true ,
// Go 1.15's "net" package depends on "math/rand", but 1.16's does not.
// Keep it here to support 1.15.
"math/rand" : true ,
}
}
// isPrivate checks if GOPRIVATE matches path.
// isPrivate checks if GOPRIVATE matches path.