]> Cypherpunks.ru repositories - gostls13.git/commitdiff
[dev.boringcrypto] all: merge master (2f0da6d) into dev.boringcrypto
authorRuss Cox <rsc@golang.org>
Wed, 17 Feb 2021 21:30:12 +0000 (16:30 -0500)
committerRuss Cox <rsc@golang.org>
Wed, 17 Feb 2021 21:43:48 +0000 (16:43 -0500)
Manual edits in src/cmd/compile/internal/reflectdata/reflect.go
to keep build working.

Merge List:

+ 2021-02-17 2f0da6d9e2 go/types: revert "no 'declared but not used' errors for invalid var decls"
+ 2021-02-17 70c37ee7d0 cmd/compile/internal/test: gofmt abiutils_test.go
+ 2021-02-16 84825599dc all: merge branch dev.regabi (d3cd4830ad) into master
+ 2021-02-16 d3cd4830ad [dev.regabi] test: run abi/regabipragma test with -c=1
+ 2021-02-16 03cea563d1 [dev.regabi] all: merge master (5faf941) into dev.regabi
+ 2021-02-16 b8fb049c7a [dev.regabi] cmd/go: copy internal/abi in TestNewReleaseRebuildsStalePackagesInGOPATH
+ 2021-02-16 5faf941df0 internal/goversion: update Version to 1.17
+ 2021-02-16 ed55da46ab [dev.regabi] go/types: overlapping embedded interfaces requires go1.14
+ 2021-02-16 7696c94334 [dev.regabi] go/types: type alias decl requires go1.9
+ 2021-02-16 c2358a1ae7 [dev.regabi] runtime: stub out spillArgs and unspillArgs
+ 2021-02-16 8cfbf34dd9 internal/abi: set register count constants to zero for regabi experiment
+ 2021-02-16 6f3da9d2f6 README: pull gopher image from website
+ 2021-02-16 d28aae26b0 [dev.regabi] cmd/link: recognize internal/abi as runtime package
+ 2021-02-16 098504c73f cmd/link: generate trampoline for inter-dependent packages
+ 2021-02-16 1004a7cb31 runtime/metrics: update documentation to current interface
+ 2021-02-16 6530f2617f doc/go1.16: remove draft notice
+ 2021-02-16 353e111455 doc/go1.16: fix mismatched id attribute
+ 2021-02-16 e0215315f5 [dev.regabi] reflect: support for register ABI on amd64 for reflect.(Value).Call
+ 2021-02-16 f0d23c9dbb internal/poll: netpollcheckerr before sendfile
+ 2021-02-16 0cb3415154 doc: remove all docs not tied to distribution
+ 2021-02-16 626ef08127 doc: remove install.html and install-source.html
+ 2021-02-16 30641e36aa internal/poll: if copy_file_range returns 0, assume it failed
+ 2021-02-15 33d72fd412 doc/faq: update generics entry to reflect accepted proposal
+ 2021-02-15 852ce7c212 cmd/go: provide a more helpful suggestion for "go vet -?"
+ 2021-02-13 66c27093d0 cmd/link: fix typo in link_test.go
+ 2021-02-13 b81efb7ec4 [dev.regabi] go/types: add support for language version checking
+ 2021-02-13 a7e9b4b948 [dev.regabi] go/types: untyped shift counts must fit into uint
+ 2021-02-13 060fa49bd2 [dev.regabi] go/types: refuse excessively long constants
+ 2021-02-12 baa6c75dce [dev.regabi] internal/abi: add new internal/abi package for ABI constants
+ 2021-02-12 d1fd9a8863 [dev.regabi] all: merge master (ff0e93e) into dev.regabi
+ 2021-02-12 ff0e93ea31 doc/go1.16: note that package path elements beginning with '.' are disallowed
+ 2021-02-11 249da7ec02 CONTRIBUTORS: update for the Go 1.16 release
+ 2021-02-11 864d4f1c6b cmd/go: multiple small 'go help' fixes
+ 2021-02-11 26ceae85a8 spec: More precise wording in section on function calls.
+ 2021-02-11 930c2c9a68 cmd/go: reject embedded files that can't be packed into modules
+ 2021-02-11 e5b08e6d5c io/fs: allow backslash in ValidPath, reject in os.DirFS.Open
+ 2021-02-10 ed8079096f cmd/compile: mark concrete call of reflect.(*rtype).Method as REFLECTMETHOD
+ 2021-02-10 59703d53e2 [dev.regabi] cmd/link: stop using ABI aliases if wrapper is enabled
+ 2021-02-09 e9c9683597 cmd/go: suppress errors from 'go get -d' for packages that only conditionally exist
+ 2021-02-09 168d6a49a5 [dev.regabi] go/types: use 512 bits as max. integer precision
+ 2021-02-09 0a62067708 [dev.regabi] go/types: adjust importer to match compiler importer
+ 2021-02-09 1c58fcf7ed [dev.regabi] go/types: handle untyped constant arithmetic overflow
+ 2021-02-09 493363ccff [dev.regabi] go/types: must not import a package called "init"
+ 2021-02-09 e0ac989cf3 archive/tar: detect out of bounds accesses in PAX records resulting from padded lengths
+ 2021-02-09 c48d1503ba [dev.regabi] go/types: report unused packages in source order
+ 2021-02-09 813958f13c [dev.regabi] go/types: factor out sorting of methods
+ 2021-02-09 11d15c171b [dev.regabi] go/types: convert untyped arguments to delete
+ 2021-02-09 c9d6f45fec runtime/metrics: fix a couple of documentation typpos
+ 2021-02-09 cea4e21b52 io/fs: backslash is always a glob meta character
+ 2021-02-08 dc725bfb3c doc/go1.16: mention new vet check for asn1.Unmarshal
+ 2021-02-08 618e3c15bd [dev.regabi] go/types: consistently report nil type as "untyped nil"
+ 2021-02-08 50449de66a [dev.regabi] all: merge master (1901853) into dev.regabi
+ 2021-02-08 7b0dfb177f [dev.regabi] runtime: use g register in some assembly functions on AMD64
+ 2021-02-08 2e60c00f56 [dev.regabi] cmd/internal/obj/x86: use g register in stack bounds check
+ 2021-02-08 22f9e1ccbc [dev.regabi] runtime: initialize special registers before sigpanic
+ 2021-02-08 5d7dc53888 [dev.regabi] cmd/compile, runtime: reserve R14 as g registers on AMD64
+ 2021-02-08 1901853098 runtime/metrics: fix panic in readingAllMetric example
+ 2021-02-08 ed3e4afa12 syscall/plan9: remove spooky fd action at a distance
+ 2021-02-08 a21de9ec73 [dev.regabi] cmd/link: resolve symbol ABI in shared linkage
+ 2021-02-05 724d0720b3 doc/go1.16: add missed heading tag in vet section
+ 2021-02-05 b54cd94d47 embed, io/fs: clarify that leading and trailing slashes are disallowed
+ 2021-02-05 4516afebed testing/fstest: avoid symlink-induced failures in tester
+ 2021-02-05 8fa84772ba [dev.regabi] runtime: delete gosave function
+ 2021-02-05 946351d5a2 [dev.regabi] runtime: zero X15 in racecall
+ 2021-02-05 397a46a10a [dev.regabi] cmd/asm: define g register on AMD64
+ 2021-02-05 e79c2fd428 [dev.regabi] runtime: mark racecallbackthunk as ABIInternal
+ 2021-02-05 7cc6de59f2 [dev.regabi] runtime: don't mark rt0_go ABIInternal
+ 2021-02-05 63de211014 [dev.regabi] runtime/cgo: call setg_gcc in crosscall_amd64
+ 2021-02-04 120b819f45 [dev.regabi] go/types: report error for invalid main function signature
+ 2021-02-04 52d5cb2822 [dev.regabi] cmd/internal/obj: access Attribute atomically
+ 2021-02-04 bc451b5770 [dev.regabi] go/types: port check_test.go ergonomics from dev.typeparams
+ 2021-02-04 afd67f3334 [dev.regabi] go/types: no "declared but not used" errors for invalid var decls
+ 2021-02-04 8869086d8f runtime: fix typo in histogram.go
+ 2021-02-03 401d7e5a24 [dev.regabi] cmd/compile: reserve X15 as zero register on AMD64
+ 2021-02-03 bfc7418e6d [dev.regabi] runtime, syscall, etc.: mark Darwin syscall wrappers as ABIInternal
+ 2021-02-03 e491c6eea9 math/big: fix comment in divRecursiveStep
+ 2021-02-02 23b0c1f76e [dev.regabi] all: merge master (fca94ab) into dev.regabi
+ 2021-02-02 fca94ab3ab spec: improve the example in Type assertions section
+ 2021-02-02 98f8454a73 cmd/link: don't decode type symbol in shared library in deadcode
+ 2021-02-02 1426a571b7 cmd/link: fix off-by-1 error in findShlibSection
+ 2021-02-01 32e789f4fb test: fix incorrectly laid out instructions in issue11656.go
+ 2021-02-01 ca6999e27c [dev.regabi] test: add a test for inlining closures
+ 2021-02-01 0b6cfea634 doc/go1.16: document that on OpenBSD syscalls are now made through libc
+ 2021-02-01 26e29aa15a cmd/link: disable TestPIESize if CGO isn't enabled
+ 2021-02-01 6ac91e460c doc/go1.16: minor markup fixes
+ 2021-01-29 44361140c0 embed: update docs for proposal tweaks
+ 2021-01-29 68058edc39 runtime: document pointer write atomicity for memclrNoHeapPointers
+ 2021-01-28 c8bd8010ff syscall: generate readlen/writelen for openbsd libc
+ 2021-01-28 41bb49b878 cmd/go: revert TestScript/build_trimpath to use ioutil.ReadFile
+ 2021-01-28 725a642c2d runtime: correct syscall10/syscall10X on openbsd/amd64
+ 2021-01-28 4b068cafb5 doc/go1.16: document go/build/constraint package
+ 2021-01-28 376518d77f runtime,syscall: convert syscall on openbsd/arm64 to libc
+ 2021-01-27 aca22bddf2 [dev.regabi] cmd/compile: remove nested functions from expands_calls.go
+ 2021-01-27 667e08ba8c [dev.regabi] cmd/go: Use GOMAXPROCS to limit default build, compile parallelism
+ 2021-01-27 00f2ff5c94 api/go1.16: add go/build/constraint APIs
+ 2021-01-27 35334caf18 crypto/x509: remove leftover CertificateRequest field
+ 2021-01-27 a5a5e2c968 runtime: make sure to remove open-coded defer entries in all cases after a recover
+ 2021-01-27 8cfa01943a runtime: block console ctrlhandler when the signal is handled
+ 2021-01-27 ff9e8364c6 cmd/go: skip issue33139 when the 'cc' script command is unavailable
+ 2021-01-27 cd176b3615 runtime: switch runtime to libc for openbsd/arm64
+ 2021-01-27 6c8fbfbdcf runtime: convert openbsd/arm64 locking to libc
+ 2021-01-27 5cdf0da1bf syscall: clean up mkasm related changes
+ 2021-01-27 210f70e298 doc/go1.16: fix closing brace in .Export format
+ 2021-01-27 0f797f168d math: fix typo in sqrt.go code comment
+ 2021-01-26 9b636feafe [dev.regabi] cmd/compile: missing last patch set for cl286013
+ 2021-01-26 f7dad5eae4 [dev.regabi] cmd/compile: remove leftover code form late call lowering work
+ 2021-01-26 8634a234df runtime,syscall: convert syscall on openbsd/amd64 to libc
+ 2021-01-26 1d5e14632e os: further document limitations around naked file descriptors
+ 2021-01-25 5e4a0cdde3 [dev.regabi] all: merge master (bf0f7c9) into dev.regabi
+ 2021-01-26 cf263e9f77 os: correct names in CreateTemp and MkdirTemp doc comments
+ 2021-01-26 ce8b318624 net/http/fcgi: remove locking added to prevent a test-only race
+ 2021-01-25 bf0f7c9d78 doc/go1.16: mention os.DirFS in os section
+ 2021-01-25 deaf29a8a8 cmd/compile: fix order-of-assignment issue w/ defers
+ 2021-01-25 ad2ca26a52 doc/go1.16: mention os.DirEntry and types moved from os to io/fs
+ 2021-01-25 a51921fa5b doc/go1.16: mention new testing/iotest functions
+ 2021-01-25 e6b6d107f7 doc/go1.16: mention deprecation of io/ioutil
+ 2021-01-25 7eaaf28cae [dev.regabi] cmd/compile: disallow taking address of SSA'd values
+ 2021-01-25 96a276363b doc/go1.16: mention go/build changes
+ 2021-01-25 3d85c69a0b html/template: revert "avoid race when escaping updates template"
+ 2021-01-25 54514c6b28 cmd/go: fix TestScript/cgo_path, cgo_path_space when CC set
+ 2021-01-25 6f5e79f470 [dev.regabi] cmd/compile/internal: specify memory layout
+ 2021-01-25 cabffc199d [dev.regabi] cmd/compile/internal: add internal ABI specification
+ 2021-01-25 6de8443f3b doc/asm: add a section on go_asm.h, clean up go_tls.h section
+ 2021-01-25 6a4739ccc5 [dev.regabi] cmd/compile: enable rational constant arithmetic
+ 2021-01-25 be9612a832 [dev.regabi] os: disable TestDirFS until #42637 is fixed
+ 2021-01-25 8ee3d39838 [dev.regabi] cmd/go: workaround -race issue on ppc64le
+ 2021-01-25 54b251f542 lib/time, time/tzdata: update tzdata to 2021a
+ 2021-01-25 5a76c3d548 [dev.regabi] cmd/compile: modify abiutils for recently updated ABI
+ 2021-01-25 ff82cc971a os: force consistent mtime before running fstest on directory on Windows
+ 2021-01-25 044f937a73 doc/go1.16: fix WalkDir and Walk links
+ 2021-01-25 063c72f06d [dev.regabi] cmd/compile: backport changes from dev.typeparams (9456804)
+ 2021-01-23 b634f5d97a doc/go1.16: add crypto/x509 memory optimization
+ 2021-01-23 9897655c61 doc/go1.16: reword ambiguously parsable sentence
+ 2021-01-23 cd99385ff4 cmd/internal/obj/arm64: fix VMOVQ instruction encoding error
+ 2021-01-23 d05d6fab32 [dev.regabi] cmd/compile: replace ir.Name map with ir.NameSet for SSA 2
+ 2021-01-23 66ee8b158f runtime: restore cgo_import_dynamic for libc.so on openbsd
+ 2021-01-23 48badc5fa8 [dev.regabi] cmd/compile: fix escape analysis problem with closures
+ 2021-01-23 51e1819a8d [dev.regabi] cmd/compile: scan body of closure in tooHairy to check for disallowed nodes
+ 2021-01-22 25c39e4fb5 io/ioutil: fix example test for WriteFile to allow it to run in the playground
+ 2021-01-22 eb21b31e48 runtime: define dummy msanmove
+ 2021-01-22 3a778ff50f runtime: check for g0 stack last in signal handler
+ 2021-01-22 a2cef9b544 cmd/go: don't lookup the path for CC when invoking cgo
+ 2021-01-22 7e0a81d280 [dev.regabi] all: merge master (dab3e5a) into dev.regabi
+ 2021-01-22 dab3e5affe runtime: switch runtime to libc for openbsd/amd64
+ 2021-01-22 a1b53d85da cmd/go: add documentation for test and xtest fields output by go list
+ 2021-01-22 b268b60774 runtime: remove pthread_kill/pthread_self for openbsd
+ 2021-01-22 ec4051763d runtime: fix typo in mgcscavenge.go
+ 2021-01-22 7ece3a7b17 net/http: fix flaky TestDisableKeepAliveUpgrade
+ 2021-01-22 50cba0506f time: clarify Timer.Reset behavior on AfterFunc Timers
+ 2021-01-22 cf10e69f17 doc/go1.16: mention net/http.Transport.GetProxyConnectHeader
+ 2021-01-22 ec1b945265 doc/go1.16: mention path/filepath.WalkDir
+ 2021-01-22 11def3d40b doc/go1.16: mention syscall.AllThreadsSyscall
+ 2021-01-21 07b0235609 doc/go1.16: add notes about package-specific fs.FS changes
+ 2021-01-21 e2b4f1fea5 doc/go1.16: minor formatting fix
+ 2021-01-21 9f43a9e07b doc/go1.16: mention new debug/elf constants
+ 2021-01-21 3c2f11ba5b cmd/go: overwrite program name with full path
+ 2021-01-21 953d1feca9 all: introduce and use internal/execabs
+ 2021-01-21 b186e4d70d cmd/go: add test case for cgo CC setting
+ 2021-01-21 5a8a2265fb cmd/cgo: report exec errors a bit more clearly
+ 2021-01-21 46e2e2e9d9 cmd/go: pass resolved CC, GCCGO to cgo
+ 2021-01-21 3d40895e36 runtime: switch openbsd/arm64 to pthreads
+ 2021-01-21 d95ca91380 crypto/elliptic: fix P-224 field reduction
+ 2021-01-21 d7e71c01ad [dev.regabi] cmd/compile: replace ir.Name map with ir.NameSet for dwarf
+ 2021-01-21 5248f59a22 [dev.regabi] cmd/compile: replace ir.Name map with ir.NameSet for SSA
+ 2021-01-21 970d8b6cb2 [dev.regabi] cmd/compile: replace ir.Name map with ir.NameSet in inlining
+ 2021-01-21 68a4664475 [dev.regabi] cmd/compile: remove tempAssigns in walkCall1
+ 2021-01-21 fd9a391cdd [dev.regabi] cmd/compile: remove CallExpr.Rargs
+ 2021-01-21 19a6db6b63 [dev.regabi] cmd/compile: make sure mkcall* passed non-nil init
+ 2021-01-21 9f036844db [dev.regabi] cmd/compile: use ir.DoChildren directly in inlining
+ 2021-01-21 213c3905e9 [dev.regabi] cmd/compile: use node walked flag to prevent double walk for walkSelect
+ 2021-01-20 1760d736f6 [dev.regabi] cmd/compile: exporting, importing, and inlining functions with OCLOSURE
+ 2021-01-20 ecf4ebf100 cmd/internal/moddeps: check content of all modules in GOROOT
+ 2021-01-20 92cb157cf3 [dev.regabi] cmd/compile: late expansion of return values
+ 2021-01-20 d2d155d1ae runtime: don't adjust timer pp field in timerWaiting status
+ 2021-01-20 803d18fc6c cmd/go: set Incomplete field on go list output if no files match embed
+ 2021-01-20 6e243ce71d cmd/go: have go mod vendor copy embedded files in subdirs
+ 2021-01-20 be28e5abc5 cmd/go: fix mod_get_fallback test
+ 2021-01-20 928bda4f4a runtime: convert openbsd/amd64 locking to libc
+ 2021-01-19 824f2d635c cmd/go: allow go fmt to complete when embedded file is missing
+ 2021-01-19 0575e35e50 cmd/compile: require 'go 1.16' go.mod line for //go:embed
+ 2021-01-19 9423d50d53 [dev.regabi] cmd/compile: use '%q' for printing rune values less than 128
+ 2021-01-19 ccb2e90688 cmd/link: exit before Asmb2 if error
+ 2021-01-19 ca5774a5a5 embed: treat uninitialized FS as empty
+ 2021-01-19 d047c91a6c cmd/link,runtime: switch openbsd/amd64 to pthreads
+ 2021-01-19 61debffd97 runtime: factor out usesLibcall
+ 2021-01-19 9fed39d281 runtime: factor out mStackIsSystemAllocated
+ 2021-01-19 a2f825c542 [dev.regabi] cmd/compile: directly create go.map and go.track symbols
+ 2021-01-19 4a4212c0e5 [dev.regabi] cmd/compile: refactor Linksym creation
+ 2021-01-19 4f5c603c0f [dev.regabi] cmd/compile: cleanup callTargetLSym
+ 2021-01-18 dbab079835 runtime: free Windows event handles after last lock is dropped
+ 2021-01-18 5a8fbb0d2d os: do not close syscall.Stdin in TestReadStdin
+ 2021-01-18 422f38fb6c [dev.regabi] cmd/compile: move stack objects to liveness
+ 2021-01-18 6113db0bb4 [dev.regabi] cmd/compile: convert OPANIC argument to interface{} during typecheck
+ 2021-01-18 4c835f9169 [dev.regabi] cmd/compile: use LinksymOffsetExpr in TypePtr/ItabAddr
+ 2021-01-18 0ffa1ead6e [dev.regabi] cmd/compile: use *obj.LSym instead of *ir.Name for staticdata functions
+ 2021-01-17 7e0fa38aad [dev.regabi] cmd/compile: remove unneeded packages from ir.Pkgs
+ 2021-01-17 99a5db11ac [dev.regabi] cmd/compile: use LinksymOffsetExpr in walkConvInterface
+ 2021-01-17 87845d14f9 [dev.regabi] cmd/compile: add ir.TailCallStmt
+ 2021-01-17 e3027c6828 [dev.regabi] cmd/compile: fix linux-amd64-noopt builder
+ 2021-01-17 59ff93fe64 [dev.regabi] cmd/compile: rename NameOffsetExpr to LinksymOffsetExpr
+ 2021-01-17 82b9cae700 [dev.regabi] cmd/compile: change ir.NameOffsetExpr to use *obj.LSym instead of *Name
+ 2021-01-17 88956fc4b1 [dev.regabi] cmd/compile: stop analyze NameOffsetExpr.Name_ in escape analysis
+ 2021-01-17 7ce2a8383d [dev.regabi] cmd/compile: simplify stack temp initialization
+ 2021-01-17 ba0e8a92fa [dev.regabi] cmd/compile: refactor temp construction in walk
+ 2021-01-17 78e5aabcdb [dev.regabi] cmd/compile: replace Node.HasCall with walk.mayCall
+ 2021-01-16 6de9423445 [dev.regabi] cmd/compile: cleanup OAS2FUNC ordering
+ 2021-01-16 a956a0e909 [dev.regabi] cmd/compile, runtime: fix up comments/error messages from recent renames
+ 2021-01-16 ab3b67abfd [dev.regabi] cmd/compile: remove ONEWOBJ
+ 2021-01-16 c9b1445ac8 [dev.regabi] cmd/compile: remove TypeAssertExpr {Src,Dst}Type fields
+ 2021-01-15 682a1d2176 runtime: detect errors in DuplicateHandle
+ 2021-01-15 9f83418b83 cmd/link: remove GOROOT write in TestBuildForTvOS
+ 2021-01-15 ec9470162f cmd/compile: allow embed into any string or byte slice type
+ 2021-01-15 54198b04db cmd/compile: disallow embed of var inside func
+ 2021-01-15 b386c735e7 cmd/go: fix go generate docs
+ 2021-01-15 bb5075a525 syscall: remove RtlGenRandom and move it into internal/syscall
+ 2021-01-15 1deae0b597 os: invoke processKiller synchronously in testKillProcess
+ 2021-01-15 03a875137f [dev.regabi] cmd/compile: unexport reflectdata.WriteType
+ 2021-01-15 14537e6e54 [dev.regabi] cmd/compile: move stkobj symbol generation to SSA
+ 2021-01-15 ab523fc510 [dev.regabi] cmd/compile: don't promote Byval CaptureVars if Addrtaken
+ 2021-01-15 ff196c3e84 crypto/x509: update iOS bundled roots to version 55188.40.9
+ 2021-01-15 b7a698c73f [dev.regabi] test: disable test on windows because expected contains path separators.
+ 2021-01-15 4be7af23f9 [dev.regabi] cmd/compile: fix ICE during ir.Dump
+ 2021-01-14 e125ccd10e cmd/go: in 'go mod edit', validate versions given to -retract and -exclude
+ 2021-01-14 eb330020dc cmd/dist, cmd/go: pass -arch for C compilation on Darwin
+ 2021-01-14 84e8a06f62 cmd/cgo: remove unnecessary space in cgo export header
+ 2021-01-14 0c86b999c3 cmd/test2json: document passing -test.paniconexit0
+ 2021-01-14 9135795891 cmd/go/internal/load: report positions for embed errors
+ 2021-01-14 35b9c66601 [dev.regabi] cmd/compile,cmd/link: additional code review suggestions for CL 270863
+ 2021-01-14 d9b79e53bb cmd/compile: fix wrong complement for arm64 floating-point comparisons
+ 2021-01-14 c73232d08f cmd/go/internal/load: refactor setErrorPos to PackageError.setPos
+ 2021-01-14 6aa28d3e06 go/build: report positions for go:embed directives
+ 2021-01-14 9734fd482d [dev.regabi] cmd/compile: use node walked flag to prevent double walk for walkSwitch
+ 2021-01-14 f97983249a [dev.regabi] cmd/compile: move more PAUTOHEAP to SSA construction
+ 2021-01-14 4476300425 [dev.regabi] cmd/compile: use byte for CallExpr.Use
+ 2021-01-14 5a5ab24689 [dev.regabi] cmd/compile: do not rely on CallExpr.Rargs for detect already walked calls
+ 2021-01-14 983ac4b086 [dev.regabi] cmd/compile: fix ICE when initializing blank vars
+ 2021-01-13 7eb31d999c cmd/go: add hints to more missing sum error messages
+ 2021-01-13 d6d4673728 [dev.regabi] cmd/compile: fix GOEXPERIMENT=regabi builder
+ 2021-01-13 c41b999ad4 [dev.regabi] cmd/compile: refactor abiutils from "gc" into new "abi"
+ 2021-01-13 861707a8c8 [dev.regabi] cmd/compile: added limited //go:registerparams pragma for new ABI dev
+ 2021-01-13 c1370e918f [dev.regabi] cmd/compile: add code to support register ABI spills around morestack calls
+ 2021-01-13 2abd24f3b7 [dev.regabi] test: make run.go error messages slightly more informative
+ 2021-01-13 9a19481acb [dev.regabi] cmd/compile: make ordering for InvertFlags more stable
+ 2021-01-12 d9acf6f3a3 [dev.regabi] cmd/compile: remove Func.ClosureType
+ 2021-01-12 41352fd401 [dev.regabi] cmd/compile: transform closures during walk
+ 2021-01-12 d6ad88b4db [dev.regabi] cmd/compile: compile functions before closures
+ 2021-01-12 432f9ffb11 [dev.regabi] cmd/compile: unindent compileFunctions
+ 2021-01-12 cc90e7a51e [dev.regabi] cmd/compile: always use the compile queue
+ 2021-01-12 cd5b74d2df [dev.regabi] cmd/compile: call NeedFuncSym in InitLSym
+ 2021-01-12 ba76567bc2 cmd/go/internal/modload: delete unused *mvsReqs.next method
+ 2021-01-12 665def2c11 encoding/asn1: document unmarshaling behavior for IMPLICIT string fields
+ 2021-01-12 95acd8121b [dev.regabi] cmd/compile: remove Name.Typegen
+ 2021-01-12 12ee55ba7b [dev.regabi] cmd/compile: stop using Vargen for import/export
+ 2021-01-12 b4d2a0445b [dev.regabi] cmd/compile: refactor closure var setup/teardown
+ 2021-01-12 f57f484053 [dev.regabi] cmd/compile: decouple escape analysis from Name.Vargen
+ 2021-01-11 81ea89adf3 cmd/go: fix non-script staleness checks interacting badly with GOFLAGS
+ 2021-01-11 759309029f doc: update editors.html for Go 1.16
+ 2021-01-11 c3b4c7093a cmd/internal/objfile: don't require runtime.symtab symbol for XCOFF
+ 2021-01-10 7fd84c6e46 [dev.regabi] cmd/compile: remove OCLOSUREREAD
+ 2021-01-10 c9c26d7ffb [dev.regabi] cmd/compile: use ClosureVars for method value wrappers
+ 2021-01-10 950cf4d46c [dev.regabi] cmd/compile: bind closure vars during SSA constructions
+ 2021-01-10 8b2efa990b [dev.regabi] cmd/compile: deref PAUTOHEAPs during SSA construction
+ 2021-01-08 59bfc18e34 cmd/go: add hint to read 'go help vcs' to GOVCS errors
+ 2021-01-08 6ee9b118a2 [dev.regabi] cmd/compile: remove fmt_test code; it has outlived its usefulness
+ 2021-01-08 cd6f3a54e4 cmd/go: revise 'go help' documentation for modules
+ 2021-01-08 6192b98751 cmd/go: make hints in error messages more consistent
+ 2021-01-08 25886cf4bd cmd/go: preserve sums for indirect deps fetched by 'go mod download'
+ 2021-01-08 6250833911 runtime/metrics: mark histogram metrics as cumulative
+ 2021-01-08 8f6a9acbb3 runtime/metrics: remove unused StopTheWorld Description field
+ 2021-01-08 6598c65646 cmd/compile: fix exponential-time init-cycle reporting
+ 2021-01-08 fefad1dc85 test: fix timeout code for invoking compiler
+ 2021-01-08 6728118e0a cmd/go: pass signals forward during "go tool"
+ 2021-01-08 e65c543f3c go/build/constraint: add parser for build tag constraint expressions
+ 2021-01-08 0c5afc4fb7 testing/fstest,os: clarify racy behavior of TestFS
+ 2021-01-08 32afcc9436 runtime/metrics: change unit on *-by-size metrics to match bucket unit
+ 2021-01-08 c6513bca5a io/fs: minor corrections to Glob doc
+ 2021-01-08 b241938e04 [dev.regabi] cmd/compile: fix some methods error text
+ 2021-01-08 304f769ffc cmd/compile: don't short-circuit copies whose source is volatile
+ 2021-01-08 ae97717133 runtime,runtime/metrics: use explicit histogram boundaries
+ 2021-01-08 a9ccd2d795 go/build: skip string literal while findEmbed
+ 2021-01-08 d92f8add32 archive/tar: fix typo in comment
+ 2021-01-08 cab1202183 cmd/link: accept extra blocks in TestFallocate
+ 2021-01-08 ee4d32249b io/fs: minor corrections to Glob release date
+ 2021-01-08 54bd1ccce2 cmd: update to latest golang.org/x/tools
+ 2021-01-07 9ec21a8f34 Revert "reflect: support multiple keys in struct tags"
+ 2021-01-07 091414b5b7 io/fs: correct WalkDirFunc documentation
+ 2021-01-07 9b55088d6b doc/go1.16: add release note for disallowing non-ASCII import paths
+ 2021-01-07 fa90aaca7d cmd/compile: fix late expand_calls leaf type for OpStructSelect/OpArraySelect
+ 2021-01-07 7cee66d4cb cmd/go: add documentation for Embed fields in go list output
+ 2021-01-07 e60cffa4ca html/template: attach functions to namespace
+ 2021-01-07 6da2d3b7d7 cmd/link: fix typo in asm.go
+ 2021-01-07 df81a15819 runtime: check mips64 VDSO clock_gettime return code
+ 2021-01-06 4787e906cf crypto/x509: rollback new CertificateRequest fields
+ 2021-01-06 c9658bee93 cmd/go: make module suggestion more friendly
+ 2021-01-06 4c668b25c6 runtime/metrics: fix panic message for Float64Histogram
+ 2021-01-06 d2131704a6 net/http/httputil: fix deadlock in DumpRequestOut
+ 2021-01-05 3e1e13ce6d cmd/go: set cfg.BuildMod to "readonly" by default with no module root
+ 2021-01-05 0b0d004983 cmd/go: pass embedcfg to gccgo if supported
+ 2021-01-05 cb05a0aa6a [dev.regabi] cmd/compile: remove toolstash scaffolding
+ 2021-01-05 9821838832 [dev.regabi] cmd/compile: remove CaptureVars
+ 2021-01-05 fd43831f44 [dev.regabi] cmd/compile: reimplement capture analysis
+ 2021-01-05 fb69c67cad [dev.regabi] test: enable finalizer tests on !amd64
+ 2021-01-05 1b85e7c057 cmd/go: don't scan gccgo standard library packages for imports
+ 2021-01-05 81f4f0e912 [dev.regabi] cmd/compile: remove race-y check in Name.Canonical
+ 2021-01-05 6b37b15d95 runtime: don't take allglock in tracebackothers
+ 2021-01-05 4a9d9adea4 [dev.regabi] cmd/compile: remove initname function
+ 2021-01-05 77365c5ed7 [dev.regabi] cmd/compile: add Name.Canonical and move Byval
+ 2021-01-05 e09783cbc0 [dev.regabi] cmd/compile: make ir.StaticValue safer
+ 2021-01-05 9aa950c407 [dev.regabi] cmd/compile: make ir.OuterValue safer
+ 2021-01-05 eb626409d1 [dev.regabi] cmd/compile: simplify CaptureVars
+ 2021-01-05 c28ca67a96 [dev.regabi] cmd/compile: fix ir.Dump for []*CaseClause, etc
+ 2021-01-04 9eef49cfa6 math/rand: fix typo in comment
+ 2021-01-04 b01fb2af9e testing/fstest: fix typo in error message
+ 2021-01-04 f24e40c14a [dev.regabi] cmd/compile: remove Name.Class_ accessors
+ 2021-01-04 d89705e087 [dev.regabi] cmd/compile: fix re-export of parameters
+ 2021-01-04 290b4154b7 [dev.regabi] cmd/compile: fix ICE due to large uint64 constants
+ 2021-01-04 a30fd52884 [dev.regabi] cmd/compile: use ir.NewNameAt in SubstArgTypes
+ 2021-01-03 8fc44cf0fa [dev.regabi] cmd/compile: remove a couple CloneName calls
+ 2021-01-03 907a4bfdc7 [dev.regabi] cmd/compile: fix map assignment order
+ 2021-01-03 f2e6dab048 [dev.regabi] cmd/compile: remove walkReturn "common case" path
+ 2021-01-03 d36a6bf44d [dev.regabi] cmd/compile: improve walkReturn common case
+ 2021-01-03 a317067d65 [dev.regabi] cmd/compile: improve ascompatee
+ 2021-01-03 5d80a590a2 [dev.regabi] cmd/compile: simplify walkReturn
+ 2021-01-03 bb1b6c95c2 [dev.regabi] cmd/compile: remove Node.{,Set}Walkdef
+ 2021-01-03 57c426c9a5 [dev.regabi] cmd/compile: tighten typecheckdef to *ir.Name
+ 2021-01-03 b1747756e3 [dev.regabi] cmd/compile: reorganize escape analysis somewhat
+ 2021-01-02 f2538033c0 [dev.regabi] cmd/compile: remove Nodes.Set [generated]
+ 2021-01-02 2f2d4b4e68 [dev.regabi] cmd/compile: remove {Ptr,Set}Init from Node interface
+ 2021-01-01 3dd5867605 doc: 2021 is the Year of the Gopher
+ 2021-01-01 1544a03198 [dev.regabi] cmd/compile: refactor redundant type conversion [generated]
+ 2021-01-01 7958a23ea3 [dev.regabi] cmd/compile: use *ir.Name where possible in inl.go
+ 2021-01-01 bfa97ba48f [dev.regabi] test: add another closure test case
+ 2021-01-01 67ad695416 [dev.regabi] cmd/compile: split escape analysis state
+ 2021-01-01 fad9a8b528 [dev.regabi] cmd/compile: simplify inlining of closures
+ 2021-01-01 7d55669847 [dev.regabi] cmd/compile: simplify dwarfgen.declPos
+ 2021-01-01 9ed1577779 [dev.regabi] cmd/compile: remove Func.ClosureEnter
+ 2021-01-01 ece345aa69 [dev.regabi] cmd/compile: expand documentation for Func.Closure{Vars,Enter}
+ 2021-01-01 6ddbc75efd [dev.regabi] cmd/compile: earlier deadcode removal
+ 2021-01-01 68e6fa4f68 [dev.regabi] cmd/compile: fix package-initialization order
+ 2021-01-01 3a4474cdfd [dev.regabi] cmd/compile: some more manual shuffling
+ 2021-01-01 0f1d2129c4 [dev.regabi] cmd/compile: reshuffle type-checking code [generated]
+ 2021-01-01 b8fd3440cd [dev.regabi] cmd/compile: report unused variables during typecheck
+ 2021-01-01 fd22df9905 [dev.regabi] cmd/compile: remove idempotent Name() calls [generated]
+ 2020-12-31 dfbcff80c6 [dev.regabi] cmd/compile: make copyExpr return *ir.Name directly
+ 2020-12-31 77fd81a3e6 [dev.regabi] cmd/compile: use names for keep alive variables in function call
+ 2020-12-31 8fe1197654 [dev.regabi] cmd/compile: remove Name.orig
+ 2020-12-31 477b049060 [dev.regabi] cmd/compile: fix printing of method expressions
+ 2020-12-31 95ce805d14 io/fs: remove darwin/arm64 special condition
+ 2020-12-30 20d0991b86 lib/time, time/tzdata: update tzdata to 2020f
+ 2020-12-30 ed301733bb misc/cgo/testcarchive: remove special flags for Darwin/ARM
+ 2020-12-30 0ae2e032f2 misc/cgo/test: enable TestCrossPackageTests on darwin/arm64
+ 2020-12-30 178c667db2 [dev.regabi] cmd/compile: fix OSLICEARR comments
+ 2020-12-30 f0d99def5b [dev.regabi] cmd/compile: add newline to ir.Dump
+ 2020-12-30 451693af71 [dev.regabi] cmd/compile: simplify typecheckdef
+ 2020-12-30 0c1a899a6c [dev.regabi] cmd/compile: fix defined-pointer method call check
+ 2020-12-30 f9b67f76a5 [dev.regabi] cmd/compile: change ir.DoChildren to use bool result type
+ 2020-12-30 499851bac8 [dev.regabi] cmd/compile: generalize ir/mknode.go
+ 2020-12-30 82ab3d1448 [dev.regabi] cmd/compile: use *ir.Name for Decl.X
+ 2020-12-30 9958b7ed3e [dev.regabi] cmd/compile: unexport ir.FmtNode
+ 2020-12-29 780b4de16b misc/ios: fix wording for command line instructions
+ 2020-12-29 b4a71c95d2 doc/go1.16: reference misc/ios/README for how to build iOS programs
+ 2020-12-29 f83e0f6616 misc/ios: add to README how to build ios executables
+ 2020-12-29 f5816624cd [dev.regabi] cmd/compile: change AddrExpr.Alloc to AddrExpr.Prealloc
+ 2020-12-29 850aa7c60c [dev.regabi] cmd/compile: use *ir.Name instead of ir.Node for CaseClause.Var
+ 2020-12-29 37babc97bb [dev.regabi] cmd/compile: allow visitor visits *ir.Name
+ 2020-12-29 5cf3c87fa6 [dev.regabi] cmd/compile: generate case/comm clause functions in mknode.go
+ 2020-12-29 b3e1ec97fd [dev.regabi] cmd/compile: move new addrtaken bit back to the old name
+ 2020-12-29 0620c674dd [dev.regabi] cmd/compile: remove original addrtaken bit
+ 2020-12-29 0523d525ae [dev.regabi] cmd/compile: separate out address taken computation from typechecker
+ 2020-12-29 9ea272e5ec [dev.regabi] cmd/compile: simplify ir.Func somewhat
+ 2020-12-29 e40cb4d4ae [dev.regabi] cmd/compile: remove more unused code
+ 2020-12-29 6f30c95048 [dev.regabi] cmd/compile: remove unneeded indirection
+ 2020-12-29 171fc6f223 [dev.regabi] cmd/compile: remove workarounds for go/constant issues
+ 2020-12-29 33801cdc62 [dev.regabi] cmd/compile: use Ntype where possible
+ 2020-12-29 82ad3083f8 [dev.regabi] cmd/compile: remove typ from AssignOpStmt
+ 2020-12-29 e34c44a7c4 [dev.regabi] cmd/compile: refactoring typecheck arith
+ 2020-12-29 a5ec920160 [dev.regabi] cmd/compile: more Linksym cleanup
+ 2020-12-29 ec59b197d5 [dev.regabi] cmd/compile: rewrite to use linksym helpers [generated]
+ 2020-12-29 25c613c02d [dev.regabi] cmd/compile: add Linksym helpers
+ 2020-12-29 289da2b33e [dev.regabi] cmd/compile: move Node.Opt to Name
+ 2020-12-29 6acbae4fcc [dev.regabi] cmd/compile: address some ir TODOs
+ 2020-12-29 4629f6a51d [dev.regabi] cmd/compile: merge {Selector,CallPart,Method}Expr
+ 2020-12-29 e563715b30 [dev.regabi] cmd/compile: remove Sym.Importdef
+ 2020-12-29 3f370b75fb [dev.regabi] cmd/compile: cleanup //go:generate directives
+ 2020-12-28 4fd9455882 io/fs: fix typo in comment
+ 2020-12-28 07569dac4e [dev.regabi] all: merge master (1d78139) into dev.regabi
+ 2020-12-28 76136be027 [dev.regabi] cmd/compile: check for recursive import in ImportBody
+ 2020-12-28 fda7ec3a3f [dev.regabi] cmd/compile: remove Name.IsDDD, etc
+ 2020-12-28 098a6490b9 [dev.regabi] cmd/compile: remove Declare in makepartialcall
+ 2020-12-28 137f0d2e06 [dev.regabi] cmd/compile: remove unnecessary Name.Sym call
+ 2020-12-28 3383b5c74a [dev.regabi] cmd/compile: flatten dependency graph [generated]
+ 2020-12-28 f8afb8216a [dev.regabi] cmd/compile: rename CommStmt and CaseStmt [generated]
+ 2020-12-28 5f3bd59a0d [dev.regabi] cmd/compile: remove some unneeded code in package ir
+ 2020-12-28 3bdafb0d82 [dev.regabi] cmd/compile: remove CommStmt.List
+ 2020-12-28 2ecf52b841 [dev.regabi] cmd/compile: separate CommStmt from CaseStmt
+ 2020-12-28 ed9772e130 [dev.regabi] cmd/compile: add explicit file name in types generation
+ 2020-12-28 a59d26603f [dev.regabi] cmd/compile: use []*CaseStmt in {Select,Switch}Stmt
+ 2020-12-28 fbc4458c06 [dev.regabi] cmd/compile: simplify some tree traversal code
+ 2020-12-28 6c67677541 [dev.regabi] cmd/compile: simplify FuncName and PkgFuncName
+ 2020-12-28 676d794b81 [dev.regabi] cmd/compile: remove refersToCommonName
+ 2020-12-28 c98548e110 [dev.regabi] cmd/compile: merge ascompatee, ascompatee1, and reorder3
+ 2020-12-28 4c215c4fa9 [dev.regabi] cmd/compile: simplify and optimize reorder3
+ 2020-12-28 e6c973198d [dev.regabi] cmd/compile: stop mangling SelectorExpr.Sel for ODOTMETH
+ 2020-12-28 135ce1c485 [dev.regabi] cmd/compile: desugar OMETHEXPR into ONAME during walk
+ 2020-12-28 0f732f8c91 [dev.regabi] cmd/compile: minor walkExpr cleanups
+ 2020-12-28 0de8eafd98 [dev.regabi] cmd/compile: remove SelectorExpr.Offset field
+ 2020-12-28 a4f335f420 [dev.regabi] cmd/compile: always use a Field for ODOTPTR expressions
+ 2020-12-26 1d78139128 runtime/cgo: fix Android build with NDK 22
+ 2020-12-25 2018b68a65 net/mail: don't use MDT in test
+ 2020-12-25 e4f293d853 [dev.regabi] cmd/compile: fix OCALLMETH desugaring
+ 2020-12-25 1d9a1f67d5 [dev.regabi] cmd/compile: don't emit reflect data for method types
+ 2020-12-25 396b6c2e7c [dev.regabi] cmd/compile: cleanup assignment typechecking
+ 2020-12-25 e24d2f3d05 [dev.regabi] cmd/compile: remove typ from RangeStmt
+ 2020-12-25 2785c691c2 [dev.regabi] cmd/compile: cleanup devirtualization docs
+ 2020-12-25 4b1d0fe66f [dev.regabi] cmd/compile: new devirtualization pkg [generated]
+ 2020-12-24 082cc8b7d9 [dev.regabi] cmd/compile: change ir.IsAssignable -> ir.IsAddressable
+ 2020-12-24 27b248b307 [dev.regabi] cmd/compile: separate range stmt Vars to Key, Value nodes
+ 2020-12-23 40818038bf [dev.regabi] cmd/compile: change CaseStmt.Vars to Var
+ 2020-12-23 b116404444 runtime: shift timeHistogram buckets and allow negative durations
+ 2020-12-23 8db7e2fecd runtime: fix allocs-by-size and frees-by-size buckets
+ 2020-12-23 fb96f07e1a runtime: fix nStackRoots comment about stack roots
+ 2020-12-23 d1502b3c72 lib/time, time/tzdata: update tzdata to 2020e
+ 2020-12-23 30c99cbb7a cmd/go: add the Retract field to 'go help mod edit' definition of the GoMod struct
+ 2020-12-23 49d0b239cb doc: fix a typo in contribute.html
+ 2020-12-23 9eeed291bc [dev.regabi] cmd/compile: eliminate usage of ir.Node in liveness
+ 2020-12-23 d1d64e4cea [dev.regabi] cmd/compile: split SliceExpr.List into separate fields
+ 2020-12-23 98a73030b0 cmd/go: in 'go get', promote named implicit dependencies to explicit
+ 2020-12-23 d19018e8f1 [dev.regabi] cmd/compile: split SliceHeaderExpr.LenCap into separate fields
+ 2020-12-23 53f082b0ee [dev.regabi] cmd/compile: cleanup export code further
+ 2020-12-23 31267f82e1 [dev.regabi] cmd/compile: simplify function/interface/struct typechecking
+ 2020-12-23 addade2cce [dev.regabi] cmd/compile: prefer types constructors over typecheck
+ 2020-12-23 18ebfb49e9 [dev.regabi] cmd/compile: cleanup noder
+ 2020-12-23 87a592b356 [dev.regabi] cmd/compile: cleanup import/export code
+ 2020-12-23 5898025026 [dev.regabi] cmd/compile: update mkbuiltin.go to use new type constructors
+ 2020-12-23 63c96c2ee7 [dev.regabi] cmd/compile: update mkbuiltin.go and re-enable TestBuiltin
+ 2020-12-23 37f138df6b [dev.regabi] cmd/compile: split out package test [generated]
+ 2020-12-23 3d8a3cb06b [dev.regabi] cmd/compile: split out package pkginit [generated]
+ 2020-12-23 3f04d964ab [dev.regabi] cmd/compile: split up walkexpr1, walkstmt [generated]
+ 2020-12-23 e4895ab4c0 [dev.regabi] cmd/compile: split out package walk [generated]
+ 2020-12-23 01fd2d05c8 [dev.regabi] cmd/compile: split out package dwarfgen [generated]
+ 2020-12-23 6c34d2f420 [dev.regabi] cmd/compile: split out package ssagen [generated]
+ 2020-12-23 de65151e50 [dev.regabi] cmd/compile: split out package reflectdata [generated]
+ 2020-12-23 4dfb5d91a8 [dev.regabi] cmd/compile: split out package staticdata [generated]
+ 2020-12-23 fbc82f03b1 [dev.regabi] cmd/compile: split out package noder [generated]
+ 2020-12-23 de454eef5f [dev.regabi] cmd/compile: split out package escape [generated]
+ 2020-12-23 071ab0a14c [dev.regabi] cmd/compile: split out package liveness [generated]
+ 2020-12-23 0ced54062e [dev.regabi] cmd/compile: split out package objw [generated]
+ 2020-12-23 575fd6ff0a [dev.regabi] cmd/compile: split out package inline [generated]
+ 2020-12-23 0256ba99a8 [dev.regabi] cmd/compile: split up typecheck1 [generated]
+ 2020-12-23 b9693d7627 [dev.regabi] cmd/compile: split out package typecheck [generated]
+ 2020-12-23 dac0de3748 [dev.regabi] cmd/compile: move type size calculations into package types [generated]
+ 2020-12-23 527a1895d6 [dev.regabi] cmd/compile: move helpers into package ir [generated]
+ 2020-12-23 65c4c6dfb2 [dev.regabi] cmd/compile: group known symbols, packages, names [generated]
+ 2020-12-23 9ee309255a [dev.regabi] cmd/compile: move helpers into package types [generated]
+ 2020-12-23 ead4957892 [dev.regabi] cmd/compile: move helpers into package base [generated]
+ 2020-12-23 440308ffd7 [dev.regabi] cmd/compile: simplify Nodes usage [generated]
+ 2020-12-23 f9d373720e [dev.regabi] cmd/compile: remove Left, Right etc methods [generated]
+ 2020-12-23 14d667341f [dev.regabi] cmd/compile: remove Node.Left etc [generated]
+ 2020-12-23 6f27d29be0 [dev.regabi] cmd/compile: remove ir.Nod [generated]
+ 2020-12-23 fd6ba1c8a2 os/signal: fix a deadlock with syscall.AllThreadsSyscall() use
+ 2020-12-23 69cf39089f [dev.regabi] cmd/compile: do not die in early base.FlushErrors
+ 2020-12-23 6d03cde88a [dev.regabi] cmd/dist: automatically bootstrap cmd subdirs
+ 2020-12-23 b0b0d98283 runtime: linux iscgo support for not blocking nptl signals
+ 2020-12-23 d1d1099c91 [dev.regabi] cmd/compile: fixes for big rewrite
+ 2020-12-22 223331fc0c cmd/go/internal/modload: add hint for missing implicit dependency
+ 2020-12-22 ec741b0447 [dev.regabi] all: merge master (c9fb4eb) into dev.regabi
+ 2020-12-22 acc32ea124 [dev.regabi] codereview.cfg: add config for dev.regabi
+ 2020-12-22 c9fb4eb0a2 cmd/link: handle grouped resource sections
+ 2020-12-22 c40934b33d [dev.regabi] cmd/compile: adjust one case in walkexpr
+ 2020-12-22 280e7fd1ee [dev.regabi] cmd/compile: only access Func method on concrete types
+ 2020-12-22 51ba53f5c2 [dev.regabi] cmd/compile: separate misc for gc split
+ 2020-12-22 572f168ed2 [dev.regabi] cmd/compile: separate various from Main
+ 2020-12-22 3b12c6dc08 [dev.regabi] cmd/compile: separate typecheck more cleanly
+ 2020-12-22 7c8f5356ab [dev.regabi] cmd/compile: separate dowidth better
+ 2020-12-22 c06a354bcc test: trigger SIGSEGV instead of SIGTRAP in issue11656.go
+ 2020-12-22 0aa9b4709a cmd/pack: r command create output file if not exist
+ 2020-12-22 cb28c96be8 [dev.regabi] cmd/compile,cmd/link: initial support for ABI wrappers
+ 2020-12-22 c8610e4700 [dev.regabi] cmd/compile: add ir.BasicLit to represent literals
+ 2020-12-22 3512cde10a [dev.regabi] cmd/compile: stop reusing Ntype for OSLICELIT length
+ 2020-12-22 2755361e6a [dev.regabi] cmd/compile: change noder.declNames to returns ir.Names
+ 2020-12-22 301af2cb71 [dev.regabi] runtime/race: adjust test pattern match for ABI wrapper
+ 2020-12-22 4d27c4c223 runtime: correct error handling in several FreeBSD syscall wrappers
+ 2020-12-22 9b6147120a cmd/pack: treat compiler's -linkobj output as "compiler object"
+ 2020-12-22 306b2451c8 [dev.regabi] runtime: fix ABI targets in runtime.panic{Index,Slice} shims
+ 2020-12-21 bc7e4d9257 syscall: don't generate ptrace on iOS
+ 2020-12-21 94cfeca0a5 [dev.regabi] cmd/compile: stop using ONONAME with Name
+ 2020-12-21 cb4898a77d [dev.regabi] cmd/compile: simplify declaration importing
+ 2020-12-21 06915ac14d [dev.regabi] cmd/compile: move itabname call out of implements
+ 2020-12-21 6cff874c47 runtime/metrics: add Read examples
+ 2020-12-21 4e8f681eff Merge "[dev.regabi] all: merge master into dev.regabi" into dev.regabi
+ 2020-12-21 1a523c8ab0 [dev.regabi] cmd/compile: separate nowritebarrierrec from main
+ 2020-12-21 e999c17022 [dev.regabi] cmd/compile: separate ssa from other phases
+ 2020-12-21 4836e28ac0 [dev.regabi] cmd/compile: separate noder more cleanly
+ 2020-12-21 85ce6ecfe3 [dev.regabi] cmd/compile: separate exportsym more cleanly
+ 2020-12-21 1a3b036b83 [dev.regabi] cmd/compile: collect global compilation state
+ 2020-12-21 2153a99914 [dev.regabi] cmd/compile: setup to move Addrconst, Patch into cmd/internal/obj
+ 2020-12-21 0bb0baf683 [dev.regabi] cmd/compile: cleanup for concrete types - more
+ 2020-12-21 ca8e17164e [dev.regabi] all: merge master into dev.regabi
+ 2020-12-21 8438a5779b runtime: use _exit on darwin
+ 2020-12-21 cb95819cf6 runtime: detect netbsd netpoll overrun in sysmon
+ 2020-12-21 53c984d976 runtime: skip wakep call in wakeNetPoller on Plan 9
+ 2020-12-21 9abbe27710 test: skip issue11656.go on mips/mips64/ppc64
+ 2020-12-20 89b44b4e2b cmd/compile: recognize reassignments involving receives
+ 2020-12-19 55b58018f4 test: for issue11656 try to execute trap, not call it
+ 2020-12-18 626cc7c02d test: permit "exponent too large" error
+ 2020-12-18 139cd0e12f go/build: make TestDependencies work again
+ 2020-12-18 2de7866470 os: remove dependency on strings package
+ 2020-12-18 c45313bf45 [dev.regabi] cmd/compile: remove prealloc map
+ 2020-12-18 ffb0cb7044 [dev.regabi] cmd/compile: remove uses of Name.Offset, Name.copy
+ 2020-12-18 c76be2a24e [dev.regabi] cmd/compile: add ONAMEOFFSET, delete to-be-deleted fields
+ 2020-12-18 4e8f1e139f [dev.regabi] cmd/compile: cleanup for concrete types - sinit
+ 2020-12-18 27aba22651 [dev.regabi] cmd/compile: cleanup for concrete types - walk
+ 2020-12-18 0b9cb63b8d [dev.regabi] cmd/compile: rename ir.Find to ir.Any and update uses
+ 2020-12-18 ae652a4ac9 os/signal: fix flaky tests for NotifyContext.
+ 2020-12-18 740851baca cmd/link: avoid use of -T when linking with lld
+ 2020-12-18 f1778c28a9 test: recognize and use gc build tag
+ 2020-12-17 8fcf318123 api/go1.16: remove crypto/tls APIs that are moved to Go 1.17
+ 2020-12-17 520f3b72db crypto/tls: revert "add HandshakeContext method to Conn"
+ 2020-12-17 2ff33f5e44 api: promote next to go1.16
+ 2020-12-17 aeedc9f804 [dev.regabi] cmd/compile: remove OSELRECV
+ 2020-12-17 0328c3b660 [dev.regabi] cmd/compile: use OSELRECV2 for all <-c variants
+ 2020-12-17 88e1415d08 [dev.regabi] cmd/compile: add type assertion in regabi test
+ 2020-12-17 9c384e881e [dev.regabi] cmd/compile: cleanup for concrete types - mop-up
+ 2020-12-17 be64c8bece [dev.regabi] cmd/compile: cleanup for concrete types - noder
+ 2020-12-17 5024396563 [dev.regabi] cmd/compile: cleanup for concrete types - subr
+ 2020-12-17 dd67b13d07 [dev.regabi] cmd/compile: cleanup for concrete types - range, select, swt
+ 2020-12-17 42fec2ded4 [dev.regabi] cmd/compile: cleanup for concrete types - const
+ 2020-12-17 389ae3d5ba [dev.regabi] cmd/compile: cleanup for concrete types - inl
+ 2020-12-17 5fe64298a4 [dev.regabi] cmd/compile: cleanup for concrete types - import/export
+ 2020-12-17 aa55d4e54b [dev.regabi] cmd/compile: cleanup for concrete types - escape
+ 2020-12-17 846740c17f [dev.regabi] cmd/compile: cleanup for concrete types - ssa
+ 2020-12-17 bf9bbbd6ed [dev.regabi] cmd/compile: cleanup for concrete types - order
+ 2020-12-17 4ac6a6317b [dev.regabi] cmd/compile: cleanup for concrete types - typecheck
+ 2020-12-17 f6efa3d4a4 [dev.regabi] cmd/compile: simplify ir.Find, replace ir.Inspect with ir.Visit
+ 2020-12-17 f6d2834f8f [dev.regabi] cmd/compile: limit Implicit method to nodes where it is defined
+ 2020-12-17 7fde0d2b50 [dev.regabi] cmd/compile: remove use of Initorder, Offset Node fields for initorder
+ 2020-12-17 114af2a044 [dev.regabi] cmd/compile: change Nodes to be a slice
+ 2020-12-17 4dfc7333f4 [dev.regabi] cmd/compile: update ir/fmt for concrete types
+ 2020-12-17 a997543292 [dev.regabi] cmd/compile: fix potential closure waste in Order
+ 2020-12-17 578fbbe3aa [dev.regabi] cmd/compile: rewrite some generic ir.Nod calls
+ 2020-12-17 5ae70b85c6 [dev.regabi] cmd/compile: cleanup preparing for concrete types, 2
+ 2020-12-17 fa06894b36 [dev.regabi] cmd/compile: cleanup preparing for concrete types
+ 2020-12-17 5a4db102b2 html/template: avoid race when escaping updates template
+ 2020-12-16 b0f01e17f8 go/types: report error for invalid (but empty) expr switch
+ 2020-12-16 5abda2618b cmd/link: handle large relocation addend on darwin/arm64
+ 2020-12-16 a318d56c1e cmd/link: pass arch-specific flags to external linker when testing supported flag
+ 2020-12-16 f4e7a6b905 cmd/internal/goobj: fix buglet in object file reader
+ 2020-12-16 75e16f5127 doc/go1.16: add link to reflect.StructTag
+ 2020-12-16 08b5091d03 net: close connection in localServer teardown
+ 2020-12-16 8981092d71 cmd/link: ignore SEH marking on PE objects
+ 2020-12-15 731bb54038 test: update for gofrontend error message changes
+ 2020-12-15 129bb1917b doc/go1.15: mention 1.15.3 cgo restriction on empty structs
+ 2020-12-15 685a322fe4 test: match gofrontend error messages
+ 2020-12-15 3d6467824c test: only require issue11674 errors with gc compiler
+ 2020-12-15 7cdc84a15b test: remove bug429 (duplicates runtime.TestSimpleDeadlock)
+ 2020-12-15 412dc2f4d3 test: adjust issue11371 to fit in required precision
+ 2020-12-15 8e2d74b705 test: only check for issue11362 error with gc
+ 2020-12-15 f8ac237032 test: import file name for issue19028
+ 2020-12-15 a508840c67 doc/go1.16: fix path, path/filepath release notes
+ 2020-12-15 5046cb8a6e doc/go1.16: fix formatting in net, net/http and net/http/httputil sections
+ 2020-12-15 3298300ddf text/template: error on range over send channel
+ 2020-12-15 4c2d66f642 [dev.regabi] cmd/compile: use ir.Ident for imported identifiers
+ 2020-12-15 305d93ef84 [dev.regabi] cmd/compile: type check externdcl earlier
+ 2020-12-15 9f16620f46 [dev.regabi] cmd/compile: fix latent Sym.SetPkgDef issue
+ 2020-12-15 5a25a3fd1d test: recognize gofrontend error messages
+ 2020-12-14 fea898a4b0 [dev.regabi] cmd/compile: intercept the making of OADDR nodes
+ 2020-12-14 663cd862ed cmd/link: do not mark resource section as writable
+ 2020-12-14 48dfa2b2dc cmd/link: deal with ADDR32NB relocations the same way as ADDR32 on arm
+ 2020-12-14 033390d9ad cmd/link: recognize arm header of PE objects
+ 2020-12-14 48906a6d57 net/http/pprof: don't treat os.Args as format string in Cmdline handler
+ 2020-12-14 6e3cc5c56f go/types: report invalid ... in conversions
+ 2020-12-14 278b9a8a4a io/fs: fix package reference in FS godoc
+ 2020-12-14 617383377f [dev.regabi] cmd/compile: reorg generated array hash loop
+ 2020-12-14 d06794da4a doc/go1.16: add missing <code> tag
+ 2020-12-14 dea6d94a44 math/big: add test for recursive division panic
+ 2020-12-14 2f5b1a3974 test: make a race detector test robust to timing variations
+ 2020-12-14 c81343ce3a net/http: attempt deadlock fix in TestDisableKeepAliveUpgrade
+ 2020-12-14 828746ec57 debug/dwarf: don't try to parse addr/rnglists header
+ 2020-12-14 be10af7c4e test: match gofrontend error messages
+ 2020-12-14 89f38323fa [dev.regabi] cmd/compile: add register ABI analysis utilities
+ 2020-12-14 ce61ccca8f test: match gofrontend error messages
+ 2020-12-14 a58be734ea cmd/compile: fix incorrect shift count type with s390x rules
+ 2020-12-14 8ce37e4110 [dev.regabi] cmd/compile: fix noopt builder
+ 2020-12-14 7e17b46c58 [dev.regabi] cmd/compile/internal/types: add IsScalar query method
+ 2020-12-14 2b76429eb0 [dev.regabi] cmd/compile: refactor type initialization code into helper
+ 2020-12-14 9c5241e520 [dev.regabi] cmd/compile: remove unnecessary String methods
+ 2020-12-14 267975dc47 Merge branch 'master' into dev.regabi
+ 2020-12-14 64d8846aae cmd/go: print hint when 'go install' run without version outside module
+ 2020-12-14 451b6b38fd cmd/go: refactor error reporting in internal/load
+ 2020-12-14 0a02371b05 cmd/compile: set correct type for OpIData
+ 2020-12-11 41d8e61a6b doc: make clear that Go 1.4 is not required for bootstrap
+ 2020-12-11 14305527f6 cmd/compile: fix select statement evaluation order corner case
+ 2020-12-11 1341a3decd cmd/go: add documentation for the -overlay flag
+ 2020-12-11 e508c1c67b cmd/link/internal/loadelf: support additional ELF relocations on mips64
+ 2020-12-11 58e381b0b2 cmd/vet: vendor in x/tools, update structtag vet check
+ 2020-12-10 e012d0dc34 syscall: drop references to Unix epoch in Timeval/Timespec docs
+ 2020-12-10 1fe891a937 doc/go1.16: add vet release note for CL 235677
+ 2020-12-10 6d3d3fb37f doc/go1.16: address some remaining high-level TODOs
+ 2020-12-10 6a64f6dc31 cmd/go: encode backslash and newline in response files
+ 2020-12-10 985d91666c runtime/metrics: add a note about floating-point values to package docs
+ 2020-12-10 e0d20e52ee runtime/metrics: expand Read documention with caveats
+ 2020-12-10 d0f40d2922 runtime/metrics: add ordering line to supported metrics docs
+ 2020-12-10 6d2b3351f6 test: match gofrontend error messages
+ 2020-12-10 e5522c882d std: update golang.org/x/net to 20201209123823-ac852fbbde11
+ 2020-12-10 422dc83baa database/sql: fix typo in comment
+ 2020-12-10 56b783ad94 cmd/go, cmd/asm: pass -linkshared to assembler for shared linkage builds
+ 2020-12-10 b110733327 cmd/link: reject too-large relocation addend on darwin/arm64
+ 2020-12-10 0aba8f24cb cmd/link: truncate file after code signature
+ 2020-12-10 6c64b6db68 cmd/compile: don't constant fold divide by zero
+ 2020-12-09 89f465c2b5 go/types: avoid endless recursion in the Comparable predicate
+ 2020-12-09 f1980efb92 all: update to use os.ReadDir where appropriate
+ 2020-12-09 4f1b0a44cb all: update to use os.ReadFile, os.WriteFile, os.CreateTemp, os.MkdirTemp
+ 2020-12-09 63bc23b545 [dev.regabi] cmd/compile: first start towards using Ident
+ 2020-12-09 eae8fd519b [dev.regabi] cmd/compile: iexport debug crumbs for toolstash
+ 2020-12-09 837b35cc55 [dev.regabi] cmd/compile: adjust IR representations
+ 2020-12-09 0c49440664 [dev.regabi] cmd/compile: arrange for walkstmt, walkexpr, to return from switch cases
+ 2020-12-09 4090af83c5 [dev.regabi] cmd/compile: use reflection in ir.Dump
+ 2020-12-09 e2d278bfeb [dev.regabi] cmd/compile: two small fixes
+ 2020-12-09 5627a4dc30 runtime/metrics: simplify test to support more environments
+ 2020-12-09 db6032dd0c cmd/compile: fix message typo
+ 2020-12-09 854a2f8e01 net/http: add connections back that haven't been canceled
+ 2020-12-09 6fa06d960b runtime: prevent stack growth after fork in runtime.sigfillset
+ 2020-12-09 ae9b442df2 doc: add description of new framepointer vet check
+ 2020-12-08 31496cfde5 cmd/vet: vendor in x/tools, enable framepointer vet check
+ 2020-12-08 01b76d5fbc go/types: correct error position for inherited const init expressions
+ 2020-12-08 48d6275952 doc/go1.16: improve channel race detector changes description
+ 2020-12-08 dbf2fc8cff [dev.regabi] cmd/compile: replace many uses of ir.Node with *ir.Name
+ 2020-12-08 bb31c75343 [dev.regabi] cmd/compile: ir.Node is no longer an ssa.Aux
+ 2020-12-08 6db970e20a [dev.regabi] cmd/compile: rewrite Aux uses of ir.Node to *ir.Name [generated]
+ 2020-12-08 1c8943a6ad [dev.regabi] cmd/compile: introduce FwdRefAux for wrapping ir.Node as ssa.Aux
+ 2020-12-08 9c91cab0da runtime: correct sigfwd on openbsd/mips64
+ 2020-12-08 dcec658f6c [dev.regabi] cmd/compile: change LocalSlot.N to *ir.Name
+ 2020-12-08 1a98ab0e2d [dev.regabi] cmd/compile: add ssa.Aux tag interface for Value.Aux
+ 2020-12-07 6362d01c15 doc/go1.16: update linker stats
+ 2020-12-07 9b8c272558 reflect: document multiple keys in struct tags
+ 2020-12-07 63722da46b [dev.regabi] cmd/compile: fix comment
+ 2020-12-07 7ad6596c47 io/fs: fix Sub method error text
+ 2020-12-07 6d783e7440 [dev.regabi] cmd/compile: export all Node fields [generated]
+ 2020-12-07 2de0af3b1b [dev.regabi] cmd/compile: prepare mknode for rename of Func.body
+ 2020-12-07 724374f859 [dev.regabi] cmd/compile: rewrite stale format strings
+ 2020-12-07 61889ba680 [dev.regabi] cmd/compile: simplify fmtmap
+ 2020-12-07 6ea2b8c54c [dev.regabi] cmd/compile: clean up and document formatting
+ 2020-12-07 bb4a37bd93 [dev.regabi] cmd/compile: move Type, Sym printing to package types [generated]
+ 2020-12-07 70155cca81 [dev.regabi] cmd/compile: untangle FmtFlag, FmtMode
+ 2020-12-07 3904a62829 [dev.regabi] cmd/compile: remove mode.Sprintf etc in printer
+ 2020-12-07 fb17dfa43d [dev.regabi] cmd/compile: narrow interface between ir and types
+ 2020-12-07 3b25f3c150 [dev.regabi] cmd/compile: simplify Op, Node, Nodes printing
+ 2020-12-07 8ce2605c5b [dev.regabi] cmd/compile: untangle ir.Dump printing
+ 2020-12-07 158c9dd131 [dev.regabi] cmd/compile: reorganize ir/fmt.go
+ 2020-12-07 a79742f39a [dev.regabi] cmd/compile: remove "short" node header mode
+ 2020-12-07 ef5964dd6b [dev.regabi] cmd/compile: arrange for typecheck1 to end in switch
+ 2020-12-07 dcc640e839 [dev.regabi] test: add exhaustive test of evaluated but not used
+ 2020-12-07 2cec6c4a8c [dev.regabi] cmd/compile: generate Node methods using program
+ 2020-12-07 50cdb2d8e9 runtime/cgo: fix building on musl
+ 2020-12-07 8d34585171 doc/go1.16: announce openbsd/mips64 port
+ 2020-12-07 9c0e2db051 test: add new test that gofrontend failed to handle
+ 2020-12-07 7f9a2bc2bc doc/go1.16: fix typo
+ 2020-12-07 ac0ba6707c doc/go1.16: add missing </a> tag
+ 2020-12-07 c155931974 internal/cpu: add darwin/arm64 CPU feature detection support
+ 2020-12-07 d90b199e9c [dev.regabi] cmd/compile: silence errors about missing blank methods
+ 2020-12-07 e10c94af26 doc/go1.16: document riscv64 port changes
+ 2020-12-06 e885df2731 [dev.regabi] cmd/compile: change iexport to avoid map[ir.Node]
+ 2020-12-06 2d4c95565a [dev.regabi] cmd/compile: change nowritebarrierrec to use map[*ir.Func]
+ 2020-12-06 1b5eed8982 [dev.regabi] cmd/compile: replace NodeQueue with NameQueue
+ 2020-12-06 6c5967e528 [dev.regabi] cmd/compile: change NodeSet to NameSet
+ 2020-12-05 3b2a578166 internal/cpu: fix typo in cpu_arm64.go
+ 2020-12-05 be9379f8a8 syscall: correct CertOpenStore to expect a 0 return value on failure
+ 2020-12-04 4de4480dc3 doc/go1.16: cleanup crypto release notes
+ 2020-12-04 0b99ea3b16 cmd/vendor: sync pprof@v0.0.0-20201203190320-1bf35d6f28c2
+ 2020-12-04 46b6e70e3b [dev.regabi] cmd/compile: replace ir.Node with *ir.Name in Order
+ 2020-12-04 b75f51c645 [dev.regabi] cmd/compile: replace ir.Node with *ir.Name in Liveness
+ 2020-12-04 133b03e1c3 [dev.regabi] cmd/compile: rewrite code to use DeclaredBy
+ 2020-12-04 d9cb84c84b [dev.regabi] cmd/compile: add SameSource, Uses, and DeclaredBy helpers
+ 2020-12-04 edf60be151 doc/go1.16: document no language changes
+ 2020-12-04 5dbd2e8e44 [dev.regabi] cmd/compile: remove DeepCopyNode interface
+ 2020-12-04 9ab3d854ad [dev.regabi] cmd/compile: avoid general traversal in deadcode
+ 2020-12-04 bb5aa2b664 [dev.regabi] cmd/compile: implement editChildren for nodes
+ 2020-12-04 4725c3ffd1 [dev.regabi] cmd/compile: implement doChildren for nodes
+ 2020-12-04 18f2df7e81 [dev.regabi] cmd/compile: implement copy for nodes
+ 2020-12-04 d855b30fe4 [dev.regabi] cmd/compile: use ir.EditChildren for inline rewriting
+ 2020-12-04 b9df26d7a8 [dev.regabi] cmd/compile: use ir.Find for "search" traversals
+ 2020-12-04 0d1b44c645 [dev.regabi] cmd/compile: introduce IR visitors
+ 2020-12-04 7fcf5b994c [dev.regabi] cmd/compile: replace inlcopy with ir.DeepCopy
+ 2020-12-04 989a3f5041 [dev.regabi] cmd/compile: adjustments to Copy and DeepCopy
+ 2020-12-04 99ecfcae31 [dev.regabi] cmd/compile: swap inlining order of if then vs else blocks
+ 2020-12-04 478bde3a43 io/fs: add Sub
+ 2020-12-04 5d4569197e cmd/go/internal/modload: fix minor errors in comments
+ 2020-12-04 21cfadf0dc runtime: avoid receiving preemotion signal while exec'ing
+ 2020-12-04 7358064508 doc/go1.16: preannounce dropping macOS 10.12 support
+ 2020-12-04 37588ffcb2 cmd/go, embed: exclude .* and _* from embedded directory trees
+ 2020-12-04 b67b7ddabc doc/go1.16: add reflect changes to release notes
+ 2020-12-04 cc386bd05a doc/go1.16: fix broken <code> tag
+ 2020-12-04 84cb51d7d7 [dev.regabi] cmd/compile: eliminate more SetOrig
+ 2020-12-04 2c2980aa0c doc/go1.16: pre-announce GODEBUG=x509ignoreCN=0 removal in Go 1.17
+ 2020-12-03 37a32a1833 cmd/compile: make sure address of offset(SP) is rematerializeable
+ 2020-12-03 b78b427be5 runtime, time: strictly enforce when, period constraints
+ 2020-12-03 b635e4b808 time, runtime: don't set timer when = 0
+ 2020-12-03 4eb7ceba06 doc/go1.16: update runtime and compiler sections
+ 2020-12-03 bacb307b80 test: match gofrontend error messages
+ 2020-12-03 7f5a3196c9 cmd/go/internal/modload: rename constants to reflect that lazy loading is not yet implemented
+ 2020-12-03 351bc2f38c [dev.regabi] cmd/compile: store types.Field on {Selector,CallPart}Expr
+ 2020-12-03 bdc9a837e9 doc/go1.16: add path, path/filepath changes to release notes
+ 2020-12-03 9b0e8a2c95 doc/go1.16: tidy darwin/arm64 port section
+ 2020-12-03 b1369d5862 math/big: remove the s390x assembly for shlVU and shrVU
+ 2020-12-03 a2058bac21 [dev.regabi] cmd/compile: add ConstExpr
+ 2020-12-03 beb5e05404 [dev.regabi] cmd/compile: refactoring prep for ConstExpr
+ 2020-12-03 7e81135be7 [dev.regabi] cmd/compile: rename addinit(n, init) to initExpr(init, n)
+ 2020-12-03 6e30fc10fc [dev.regabi] all: merge master (d0c0dc682c1f) into dev.regabi
+ 2020-12-03 dda2991c2e internal/cpu: disable FMA when OSXSAVE is not enabled on x86
+ 2020-12-03 58768ae15b test: match gccgo error messages
+ 2020-12-03 59b8916d48 [dev.regabi] cmd/compile: handle OCONVNOP better in ssa
+ 2020-12-03 932733d421 doc/go1.16: document embed, io/fs, runtime/metrics
+ 2020-12-03 c519b156fc doc/go1.16: more release notes
+ 2020-12-03 5246fa5e75 mime/multipart: handle ReadForm(math.MaxInt64) better
+ 2020-12-03 07cba70d57 cmd/compile, runtime: use __msan_memmove for moving data, split msanread to fields
+ 2020-12-03 d0c0dc682c doc/go1.16: document os package changes
+ 2020-12-03 00e5727790 [dev.regabi] cmd/compile: remove okAs
+ 2020-12-03 5a3b6796cd [dev.regabi] cmd/compile: remove extra typ field in Name struct
+ 2020-12-03 da54dfb6a1 doc/go1.16: document new behavior of asn1.Unmarshal on invalid argument
+ 2020-12-03 78e442ea79 doc/go1.16: add encoding/json note for tag change
+ 2020-12-02 f26f227f66 doc/go1.16: add crypto/tls Config.Clone note
+ 2020-12-02 64bc656aed [dev.regabi] cmd/compile: use explicit block statements for init
+ 2020-12-02 48838c35dc go/parser: ignore subdirectories in ParseDir
+ 2020-12-02 2d0258d495 crypto/ed25519/internal/edwards25519: fix typo in comments
+ 2020-12-02 ecc8d15bc5 [dev.regabi] cmd/compile: delete OEMPTY
+ 2020-12-02 ec5f349b22 [dev.regabi] cmd/compile: merge OBLOCK and OEMPTY
+ 2020-12-02 05ddb879c7 cmd/go: fix TestNewReleaseRebuildsStalePackagesInGOPATH
+ 2020-12-02 ac38af2f3d cmd/go: stop tests from using network during -short
+ 2020-12-02 3d913a9266 os: add ReadFile, WriteFile, CreateTemp (was TempFile), MkdirTemp (was TempDir) from io/ioutil
+ 2020-12-02 5984ea7197 doc: update signal.Notify example to use buffered channel
+ 2020-12-02 10240b9d6b cmd/go: fix unbuffered channel passed to signal.Notify
+ 2020-12-02 c32140fa94 all: update to use filepath.WalkDir instead of filepath.Walk
+ 2020-12-02 0433845ad1 cmd/asm, cmd/internal/obj/riscv: fix branch pseudo-instructions
+ 2020-12-02 c769d393de [dev.regabi] cmd/compile: add ir.NewDeclNameAt
+ 2020-12-02 c10b0ad628 [dev.regabi] cmd/compile: add Pkg parameter to type constructors
+ 2020-12-02 42e46f4ae0 [dev.regabi] cmd/compile: comment out //go:linkname warning
+ 2020-12-02 77a71e0057 [dev.regabi] cmd/compile: add Interface, Signature, and Struct constructors
+ 2020-12-02 15085f8974 [dev.regabi] cmd/compile: tweak hash bucket type descriptor
+ 2020-12-02 73e796cb00 test: match gofrontend error messages
+ 2020-12-01 cf7aa585ac cmd/link: invalidate kernel cache on darwin
+ 2020-12-01 8cd35e00bd cmd/internal/buildid: update Mach-O code signature when rewriting buildid
+ 2020-12-01 6f84993e90 cmd/link: code-sign on darwin/arm64
+ 2020-12-01 4826abb6c2 cmd/compile: do not assume TST and TEQ set V on arm
+ 2020-12-01 283d65413d encoding/json: revert "add "json: " prefix to SyntaxError messages"
+ 2020-12-01 1408d26ccc [dev.regabi] cmd/compile: cleanup some leftover cruft
+ 2020-12-01 7fca39aa05 cmd/internal/buildid: exclude Mach-O code signature in hash calculation
+ 2020-12-01 7430266af4 cmd/internal/codesign: new package
+ 2020-12-01 20e251864b cmd: update golang.org/x/mod to v0.4.0
+ 2020-12-01 933ce97bba cmd/go: don't print deprecation notice for 'go get exe'
+ 2020-12-01 50b16f9de5 net/http: allow upgrading non keepalive connections
+ 2020-12-01 212d385a2f net/http: ignore connection closes once done with the connection
+ 2020-12-01 4ef78b09c9 doc/go1.16: add runtime/debug changes to release notes
+ 2020-12-01 ae3bfba626 doc/go1.16: add text/template changes to release notes
+ 2020-12-01 5ffa275f3c [dev.regabi] cmd/compile: first pass at abstracting Type
+ 2020-12-01 dd4a52c2a5 doc/go1.16: add multiple release notes for the go command
+ 2020-12-01 6ca23a45fe [dev.regabi] cmd/compile: only save ONAMEs on Curfn.Dcl
+ 2020-12-01 a17c5e2fce [dev.regabi] cmd/compile: add NewBasic and cleanup universe
+ 2020-12-01 f37aa5e4e2 [dev.regabi] cmd/compile: add NewNamed
+ 2020-12-01 63a6f08b39 [dev.regabi] cmd/compile: move setUnderlying to package types
+ 2020-12-01 f2311462ab [dev.regabi] cmd/compile: cleanup type-checking of defined types
+ 2020-12-01 2d6ff998ed [dev.regabi] cmd/compile: process //go:linknames after declarations
+ 2020-12-01 ecff7628ea [dev.regabi] cmd/compile: unexport Node.RawCopy
+ 2020-12-01 4da41fb3f8 [dev.regabi] cmd/compile: use ir.Copy instead of direct use of RawCopy
+ 2020-12-01 dadfc80bc1 [dev.regabi] cmd/compile: improve findTypeLoop
+ 2020-12-01 f5978a0958 cmd/internal/obj/riscv: add tests for BGE/BGEU/BLT/BLTU
+ 2020-12-01 a36ba090fd cmd/link/internal/amd64: always generate R_X86_64_PLT32 for SDYNIMPORT calls
+ 2020-12-01 f3741bdf7c doc/go1.16: add crypto/x509 note about Verify on Windows
+ 2020-12-01 45f3b646d4 [dev.regabi] cmd/compile: add OSTMTEXPR Op
+ 2020-12-01 9a5a11adfa [dev.regabi] cmd/compile: add custom expression Node implementations
+ 2020-12-01 0ecf769633 cmd/compile: do not mark OpSP, OpSB pos for debugging
+ 2020-12-01 0f9f27287b [dev.regabi] cmd/compile: remove types.InitSyms
+ 2020-11-30 41ad4dec99 [dev.regabi] cmd/compile: fix -h
+ 2020-11-30 ffa68716a0 [dev.regabi] cmd/compile: add custom statement Node implementations
+ 2020-11-30 2bc814cd18 [dev.regabi] cmd/compile: clean up ONEW node
+ 2020-11-30 b7f67b75d2 [dev.regabi] cmd/compile: clean up in preparation for expression Nodes
+ 2020-11-30 5fc192af56 [dev.regabi] cmd/compile: clean up Order.copyExpr TODO
+ 2020-11-30 7c9b6b1ca2 [dev.regabi] cmd/compile: clean up in preparation for statement Nodes
+ 2020-11-30 7f688d18c0 runtime: mlock signal stack on macOS/ARM64
+ 2020-11-30 c6de5d8d1f [dev.regabi] cmd/compile: simplify export data representation of nil
+ 2020-11-30 d2b436d95d cmd/go: fix infinite loop in modload.keepSums
+ 2020-11-30 4f42a9b76b net: add note about disabling loopback in ListenMulticastUDP()
+ 2020-11-30 7b192f33cf cmd/go: remove trailing whitespace from test script
+ 2020-11-30 848dff6dda test: update gofrontend expected errors
+ 2020-11-30 a45e12fd4b test: recognize gofrontend error messages
+ 2020-11-30 d6abf298cf test: recognize new gofrontend error message
+ 2020-11-30 ae1a337809 [dev.regabi] cmd/compile: remove ODCLFIELD and ODDD ops
+ 2020-11-30 4e7685ef1a [dev.regabi] cmd/compile: add custom type syntax Node implementations
+ 2020-11-30 d40869fced [dev.regabi] cmd/compile: move gc.treecopy to ir.DeepCopy
+ 2020-11-30 f0001e8867 [dev.regabi] cmd/compile: add OTSLICE Op
+ 2020-11-30 1b84aabb01 [dev.regabi] cmd/compile: move typenod, typenodl to ir.TypeNode, ir.TypeNodeAt [generated]
+ 2020-11-30 e5c6463e20 [dev.regabi] cmd/compile: add ir.CallPartExpr
+ 2020-11-30 4eaef981b5 [dev.regabi] cmd/compile: add ir.Closure, ir.ClosureRead
+ 2020-11-30 e84b27bec5 [dev.regabi] cmd/compile: clean up Name and Func uses
+ 2020-11-30 c4bd0b7474 [dev.regabi] cmd/compile: make ir.Func the ODCLFUNC Node implementation
+ 2020-11-30 65ae15ac5d [dev.regabi] cmd/compile: move func code from node.go to func.go
+ 2020-11-30 862f638a89 [dev.regabi] cmd/compile: make ir.Name the ONAME Node implementation
+ 2020-11-30 f6106d195d [dev.regabi] cmd/compile: add ir.PkgName
+ 2020-11-30 420809ab08 [dev.regabi] cmd/compile: move name code from node.go to name.go
+ 2020-11-30 be3d8b40b5 [dev.regabi] cmd/compile: ir.BranchStmt, add ir.EmptyStmt, ir.LabelStmt
+ 2020-11-30 b09dbc6913 [dev.regabi] cmd/compile: remove SetOp(OEMPTY) calls
+ 2020-11-30 171787efcd [dev.regabi] cmd/compile: remove Orig, SetOrig from Node interface
+ 2020-11-30 79a3d5ce15 [dev.regabi] cmd/compile: setup for new Node implementations
+ 2020-11-30 0c65a2f317 [dev.regabi] cmd/compile: drop Node.HasOpt method
+ 2020-11-30 65f4ec2fae [dev.regabi] cmd/compile: cleanup label handling
+ 2020-11-30 c193279e2c os: return proper user directories on iOS
+ 2020-11-30 294c214cca runtime: gofmt
+ 2020-11-30 e5da18df52 os/exec: constrain thread usage in leaked descriptor test on illumos
+ 2020-11-28 4ce0a7cea6 runtime/pprof: ignore test failures on windows/arm
+ 2020-11-28 358d35455d bufio: make string(int) conversion safer
+ 2020-11-28 b94346e69b test: match gofrontend error messages
+ 2020-11-27 cb84d831c9 cmd/link: mark windows/arm as all PIE
+ 2020-11-27 0252cfd84d runtime: adjust address calculation in identifying abort on windows/arm
+ 2020-11-27 91f77ca2f8 runtime: return 0 from C function in test
+ 2020-11-26 926994fd7c log: make Default doc comment consistent with package doc
+ 2020-11-26 f0ff6d4a67 reflect: fix Value.Convert for int-to-string conversions (regression)
+ 2020-11-25 88e33f6ecb [dev.regabi] cmd/compile: fix latent import/export issue with break/continue
+ 2020-11-25 40f5bc4d55 [dev.regabi] merge master 4481ad6eb6 into dev.regabi
+ 2020-11-25 4481ad6eb6 doc/go1.16: consolidate stdlib changes in "Minor changes" section
+ 2020-11-25 ef603bead5 cmd/dist: restore GOARM=7 default for android/arm
+ 2020-11-25 41f3af9d04 [dev.regabi] cmd/compile: replace *Node type with an interface Node [generated]
+ 2020-11-25 4d0d9c2c5c [dev.regabi] cmd/compile: introduce ir.INode interface for *ir.Node
+ 2020-11-25 c26aead50c [dev.regabi] cmd/compile: convert types.Node (a pointer) to types.IRNode (an interface)
+ 2020-11-25 acb4d1cef1 [dev.regabi] cmd/compile: use Node getters and setters [generated]
+ 2020-11-25 41ab6689ed [dev.regabi] cmd/compile: rewrite a few ++/--/+=/-= to prep for getters/setters [generated]
+ 2020-11-25 048debb224 [dev.regabi] cmd/compile: remove gc ↔ ssa cycle hacks
+ 2020-11-25 84e2bd611f [dev.regabi] cmd/compile: introduce cmd/compile/internal/ir [generated]
+ 2020-11-25 331b8b4797 [dev.regabi] cmd/compile: move okforconst into its own declaration
+ 2020-11-25 26b66fd60b [dev.regabi] cmd/compile: introduce cmd/compile/internal/base [generated]
+ 2020-11-25 eb3086e5a8 [dev.regabi] cmd/compile: finish cleanup of Debug parsing
+ 2020-11-25 3c240f5d17 [dev.regabi] cmd/compile: clean up debug flag (-d) handling [generated]
+ 2020-11-25 9dc2350d8c doc/go1.16: add time/tzdata release note for CL 261877
+ 2020-11-25 756661c82a [dev.regabi] cmd/compile: finish cleanup of Flag initialization
+ 2020-11-25 b9365488f0 cmd/internal/objabi: assume GOARM=7 on Android
+ 2020-11-25 df68e01b68 runtime: check channel's elemsize before calling race detector
+ 2020-11-25 259fd8adbb [dev.regabi] cmd/compile: fix reporting of overflow
+ 2020-11-25 1d3baf20dc regexp/syntax: add note about Unicode character classes
+ 2020-11-25 18573aea3c [dev.regabi] cmd/compile: clean up flag handling [generated]
+ 2020-11-25 6e583d65ab [dev.regabi] cmd/compile: simplify fmt handling of Nodes
+ 2020-11-25 d166ef6876 [dev.regabi] cmd/compile: add Node field getters and setters
+ 2020-11-25 750b3729dc go/constant: MakeFloat64(0) must return a value of Float kind
+ 2020-11-25 9262909764 [dev.regabi] cmd/compile: rewrite problematic use of Node fields
+ 2020-11-25 9e0e43d84d [dev.regabi] cmd/compile: remove uses of dummy
+ 2020-11-25 4a6b4fd139 [dev.regabi] add FatalfAt and fix Fatalf docs
+ 2020-11-25 484449c641 [dev.regabi] cmd/compile: remove file mistakenly added by CL 272248
+ 2020-11-25 1308f11897 cmd/link: add relocation type R_AARCH64_LDST16_ABS_LO12_NC for arm64
+ 2020-11-25 f6dcc975f7 go/constant: make constant.Make produce "smallest" const representation
+ 2020-11-25 7d72951229 [dev.regabi] cmd/compile: replace Val with go/constant.Value
+ 2020-11-24 e8de596f04 runtime: use inlined function name for traceback elision
+ 2020-11-24 ba2adc21e8 runtime/testdata/testprogcgo: refactor CrashTraceback
+ 2020-11-24 6826287c6b [dev.regabi] cmd/compile: replace evconst with non-mutating version
+ 2020-11-24 c22bc745c3 [dev.regabi] cmd/compile: delete n.List after collapsing OADDSTR to OLITERAL
+ 2020-11-24 ee6132a698 [dev.regabi] cmd/compile: introduce OMETHEXPR instead of overloading ONAME
+ 2020-11-24 4f9d54e41d [dev.regabi] cmd/compile: add OMETHEXPR
+ 2020-11-24 fd11a32c92 [dev.regabi] cmd/compile: clean up Node.Func
+ 2020-11-24 8e2106327c [dev.regabi] cmd/compile: clean up tests to know less about Node
+ 2020-11-24 65dcd15c72 doc/go1.16: fill in Go 1.16 release note TODOs using relnote
+ 2020-11-24 742c05e3bc [dev.regabi] cmd/compile: prep refactoring for switching to go/constant
+ 2020-11-24 015423a15b [dev.regabi] strconv: add to bootstrap packages
+ 2020-11-24 c767d73227 [dev.regabi] cmd/compile: remove CTRUNE
+ 2020-11-24 6dae48fb0b [dev.regabi] cmd/compile: refactor type/value assertions
+ 2020-11-24 88a9e2f9ad [dev.regabi] cmd/compile: replace CTNIL with ONIL
+ 2020-11-24 4af2decf30 [dev.regabi] cmd/compile: add (unused) ONIL constant
+ 2020-11-24 668e3a598f [dev.regabi] cmd/compile: cleanup type switch typechecking
+ 2020-11-24 96f3fb7244 [dev.regabi] go/constant: avoid heap allocations in match
+ 2020-11-24 1abb12fc97 [dev.regabi] go/constant: optimize BitLen
+ 2020-11-24 228b732ad9 [dev.regabi] cmd/compile: prepare for package ir
+ 2020-11-24 e37597f7f0 [dev.regabi] cmd/compile: rename a few 'base' identifiers
+ 2020-11-24 357c576878 [dev.regabi] cmd/compile: clean up error API
+ 2020-11-24 5fd949e4bd [dev.regabi] cmd/compile: initialize importMap lazily
+ 2020-11-24 7b144ed4f7 [dev.regabi] cmd/compile: rewrite concurrentFlagOk to be clearer
+ 2020-11-24 6965b01ea2 runtime: allow for usleep2HighRes to run without TLS setup
+ 2020-11-24 7dc5d909fb cmd/compile: set OpLoad argument type interface{} correctly
+ 2020-11-24 c754f25241 [dev.regabi] cmd/compile/internal/types: remove Func.Nname
+ 2020-11-24 c50c7a8c06 [dev.regabi] cmd/compile/internal/gc: refactor to use stop using Func.Nname
+ 2020-11-24 d5928847de [dev.regabi] cmd/compile/internal/gc: prep for Func.Nname removal refactoring
+ 2020-11-24 b30c7a8044 [dev.regabi] cmd/compile/internal/gc: add MethodName for getting referenced method
+ 2020-11-24 e1047302bd [dev.regabi] cmd/compile/internal/types: add pos/sym/typ params to NewField
+ 2020-11-24 762eda346a go/types: fix incorrect string(int) conversion (regression)
+ 2020-11-23 48a1a51898 runtime/metrics: tweak wording of stack and unused memory metrics
+ 2020-11-23 d902791b50 sync: use 386 instead of x86-32 to refer to the 32 bit x86 architecture
+ 2020-11-21 9ea6364a5e cmd/compile: add test for 42753
+ 2020-11-21 f7342596da syscall: add DLLError.Unwrap function
+ 2020-11-21 f93ef07b11 cmd/go/internal/modload: remove the Reqs function
+ 2020-11-21 3f5a97514b cmd/go/internal/modload: remove a stale comment for EditBuildList
+ 2020-11-20 78e59bb1f7 cmd/go: support the -overlay flag for go mod commands
+ 2020-11-20 c47eac7db0 cmd/cgo, cmd/internal/pkgpath: support gofrontend mangler v3
+ 2020-11-20 3fd4917472 doc: fix misspelling of “initialization” in diagnostics.html
+ 2020-11-20 676f0a45ed cmd/go: support overlaying go.mod files
+ 2020-11-20 a19c925eda cmd/go: recommend 'go get' command to switch from retracted versions
+ 2020-11-20 c306fd6d0b cmd/compile: allow loading single field of typed-interface{} OpIData
+ 2020-11-20 5e58ae43be cmd/go: report changes and resolved versions in 'go get'
+ 2020-11-20 012efc67f2 cmd/go/internal/modload: ignore selected version in checkRetractions
+ 2020-11-20 9264067a41 cmd/go: remove ListModules call in runGet
+ 2020-11-20 cb3f84ad25 cmd/go/internal/modload: eliminate LoadedModules
+ 2020-11-20 8bbd8294d0 cmd/go/internal/work: remove a redundant call to modload.LoadedModules
+ 2020-11-20 66c0264506 net, internal/poll: reset value before adding in minor kernel version
+ 2020-11-20 0dcc7d6ea8 go/types: use correct error position
+ 2020-11-20 c72a448881 go/types: fix error message for consistency
+ 2020-11-20 7eed73f36f go/types, go/constant: handle infinities as unknown values
+ 2020-11-19 f3ce010b33 io/fs: make WalkDirFunc parameter name consistent with doc comment
+ 2020-11-19 59f5fdac5d runtime/metrics: clarify Read's documentation
+ 2020-11-19 add45938b5 runtime/metrics: clarify memory and GC metrics documentation
+ 2020-11-19 498d8d5371 cmd/go/internal/work: avoid modload.Selected in 'go install pkg@version'
+ 2020-11-19 e73697b710 cmd/go: fix failing gccgo cases in TestScript/build_overlay
+ 2020-11-19 cb674b5c13 cmd/compile,cmd/asm: fix function pointer call perf regression on ppc64
+ 2020-11-19 c31540364c cmd/compile:  flag "-d=dumpptrs" to print Node ptrs in Dump output
+ 2020-11-19 4d048194cd runtime: support new callbackasm1 calling convention on windows/arm
+ 2020-11-19 5ba1c3f290 cmd/go/internal/modload: remove SetBuildList
+ 2020-11-19 ff2824d4b3 cmd/go/internal/modcmd: eliminate a call to modload.LoadedModules
+ 2020-11-19 0bb6115dd6 internal/fmtsort: sort the unsafe pointers in map
+ 2020-11-19 96b943a483 go/types: report an error for invalid constant values
+ 2020-11-18 35693d037f cmd/compile: fix miscompilation during inlining
+ 2020-11-18 5b0ec1a6ac cmd/compile: fix panic in field tracking logic
+ 2020-11-18 b4f3d52f6a sync: document RWMutex race semantics
+ 2020-11-18 b63db7f724 runtime: give test child time to block
+ 2020-11-18 ae76f6e962 runtime: use clock_gettime instead of gettimeofday on darwin
+ 2020-11-18 ee1b51294a runtime: use pipe2 syscall for Pipe in tests
+ 2020-11-18 d3072b8383 cmd/go: in 'go get', only load retractions for resolved versions
+ 2020-11-18 b194b5151f cmd/link: recompute heapPos after copyHeap
+ 2020-11-18 64ef84881f cmd/go: fix retract interval syntax in 'go help mod edit'
+ 2020-11-18 399b5d14d4 cmd/compile: stop MOVW-ing -1 as SRA shift amount in mips
+ 2020-11-18 a14e7bf6d4 go/ast: document invalid comment end positions with CRLF line endings
+ 2020-11-18 bcfaeca58c time: in NewTicker, document that the 1st tick comes after d
+ 2020-11-17 041a4e4c34 go/types: add test case for incorrect map index expression
+ 2020-11-17 05082c90d5 cmd/compile: clean up buggy DWARF inlined info PC ranges
+ 2020-11-17 01df2febf5 cmd/go: allow querying other versions of the main module
+ 2020-11-17 0968d2d599 cmd/go/internal/modget: clarify error for 'go get' without arguments
+ 2020-11-17 3e56bad13b cmd/go: revert "in 'go get', only load retractions for resolved versions"
+ 2020-11-17 0ae3b7cb74 cmd/compile: fix rules regression with shifts on PPC64
+ 2020-11-16 869e2957b9 cmd/go: update 'go help mod init'
+ 2020-11-16 97700baf8b cmd/go: in 'go get', only load retractions for resolved versions
+ 2020-11-16 38367d098e cmd/link/internal/ld: dedup shared libraries on openbsd
+ 2020-11-16 d834ecec86 runtime/race: reject runtime fatal error in tests
+ 2020-11-16 0932dc2118 runtime: declare arg size/map for race version of sync/atomic functions
+ 2020-11-16 d70a33a40b cmd/go/internal/work: add missing newline to go version note
+ 2020-11-16 c7233dd063 cmd/go: permit wrongly rejected -Wl,-O... linker flags
+ 2020-11-16 f2eea4c1dc cmd/compile: mask SLL,SRL,SRAconst shift amount
+ 2020-11-14 92c732e901 cmd/compile: fix load of interface{}-typed OpIData in expand_calls
+ 2020-11-14 782cf560db cmd/go: permit CGO_LDFLAGS to appear in //go:ldflag
+ 2020-11-13 4f63e0a1f8 cmd/compile:  update comments only for Node types and some functions
+ 2020-11-13 86954d5246 cmd/compile: mark plugin-exported types as used in interface
+ 2020-11-13 f423d616b1 cmd/cgo: fix initialization of empty argument types
+ 2020-11-13 35455fff0e runtime: swap the order of raceacquire() and racerelease()
+ 2020-11-13 31f71506d7 syscall: use correct type for TIOCSPGRP/TIOCGPGRP
+ 2020-11-12 30ba798093 cmd/go: use overlaid path contents in build cache
+ 2020-11-12 f016172dbe cmd/go: pass in overlaid paths for .s files
+ 2020-11-12 60b1253293 cmd/go: pass in overlaid file paths to C compiler
+ 2020-11-12 062e0e5ce6 cmd/go, cmd/cgo: don't let bogus symbol set cgo_ldflag
+ 2020-11-12 1e1fa5903b math/big: fix shift for recursive division
+ 2020-11-12 b34b0aaf69 cmd/go: skip TestScript/build_plugin_non_main on platforms that do not support -buildmode=plugin
+ 2020-11-12 c167635a6e cmd/compile: gofmt
+ 2020-11-12 e75aef80ca cmd/go: migrate away from semver.Max
+ 2020-11-12 9ef65ff137 cmd/compile: do not emit an extra debug_line entry for the end of seq addr
+ 2020-11-12 4bc5f6f45f cmd/link: put DYLD_INFO at beginning of LINKEDIT segment on darwin
+ 2020-11-12 d7974c31d0 os: gofmt
+ 2020-11-11 141fa337ad bytes: add example for (*Buffer).Bytes
+ 2020-11-11 f2e58c6d42 syscall: improve TestSetuidEtc() /proc/ parsing against races
+ 2020-11-11 4c174a7ba6 testing: reduce memory allocation in Helper
+ 2020-11-11 b641f0dcf4 os: clarify that IsExist and friends do not use errors.Is
+ 2020-11-11 26a860706a doc/go1.16: add crypto/x509 CSR release note
+ 2020-11-11 28437546f4 cmd/go: don't copy cgo files to objdir when overlay is present
+ 2020-11-11 c906608406 io/fs: fix reference to WalkFunc
+ 2020-11-11 f2e186b877 all: update vendored dependencies for Go 1.16 release
+ 2020-11-10 8f2db14cd3 cmd/go: release note for -mod=readonly by default
+ 2020-11-10 b2ef159db2 cmd/go: introduce the GOVERSION env variable
+ 2020-11-10 1948c00b6e doc/go1.16: add release notes for darwin ports
+ 2020-11-10 da3957ad0d Revert "cmd/go: don't copy cgo files to objdir when overlay is present"
+ 2020-11-10 0e0a872a76 runtime: add lock rank partial order edge pollDesc -> spanSetSpine
+ 2020-11-10 c68745b130 runtime: add lock rank partial order edge sweep -> mspanSpecial
+ 2020-11-10 e3de852f3e cmd/go: don't copy cgo files to objdir when overlay is present
+ 2020-11-10 189931296f cmd/internal/obj/s390x: fix SYNC instruction encoding
+ 2020-11-10 81322b9191 runtime/race: remove race from TestNoRaceAfterFunc2
+ 2020-11-10 1c7650aa93 internal/poll: use copy_file_range only on Linux kernel >= 5.3
+ 2020-11-10 1642cd78b5 cmd/go: update test_race_install expected output for CL 266368

Change-Id: I7ce5350ac9d0647236f1061a540c6751fb9faae9

12 files changed:
1  2 
src/cmd/compile/internal/reflectdata/reflect.go
src/cmd/go/go_test.go
src/cmd/go/internal/load/pkg.go
src/cmd/link/internal/ld/lib.go
src/crypto/tls/common.go
src/crypto/tls/handshake_client.go
src/crypto/tls/handshake_client_tls13.go
src/crypto/tls/handshake_server.go
src/crypto/tls/handshake_server_test.go
src/crypto/tls/handshake_server_tls13.go
src/go/build/build.go
src/go/build/deps_test.go

index c12e99e71ee8174093e833d409e07a72b7126608,3ff14c87f4fc7b0603435b511771cc9cf1dcfbdc..df92a9f3498fdce1b20289f356545606697dabfe
@@@ -2,19 -2,28 +2,28 @@@
  // Use of this source code is governed by a BSD-style
  // license that can be found in the LICENSE file.
  
- package gc
+ package reflectdata
  
  import (
-       "cmd/compile/internal/types"
-       "cmd/internal/gcprog"
-       "cmd/internal/obj"
-       "cmd/internal/objabi"
-       "cmd/internal/src"
        "fmt"
        "os"
        "sort"
        "strings"
        "sync"
+       "cmd/compile/internal/base"
+       "cmd/compile/internal/bitvec"
+       "cmd/compile/internal/escape"
+       "cmd/compile/internal/inline"
+       "cmd/compile/internal/ir"
+       "cmd/compile/internal/objw"
+       "cmd/compile/internal/typebits"
+       "cmd/compile/internal/typecheck"
+       "cmd/compile/internal/types"
+       "cmd/internal/gcprog"
+       "cmd/internal/obj"
+       "cmd/internal/objabi"
+       "cmd/internal/src"
  )
  
  type itabEntry struct {
@@@ -23,7 -32,7 +32,7 @@@
  
        // symbols of each method in
        // the itab, sorted by byte offset;
-       // filled in by peekitabs
+       // filled in by CompileITabs
        entries []*obj.LSym
  }
  
@@@ -32,6 -41,10 +41,10 @@@ type ptabEntry struct 
        t *types.Type
  }
  
+ func CountTabs() (numPTabs, numITabs int) {
+       return len(ptabs), len(itabs)
+ }
  // runtime interface and reflection data structures
  var (
        signatmu    sync.Mutex // protects signatset and signatslice
        signatslice []*types.Type
  
        itabs []itabEntry
-       ptabs []ptabEntry
+       ptabs []*ir.Name
  )
  
- type Sig struct {
+ type typeSig struct {
        name  *types.Sym
-       isym  *types.Sym
-       tsym  *types.Sym
+       isym  *obj.LSym
+       tsym  *obj.LSym
        type_ *types.Type
        mtype *types.Type
  }
@@@ -61,35 -74,32 +74,32 @@@ const 
        MAXELEMSIZE = 128
  )
  
- func structfieldSize() int { return 3 * Widthptr }       // Sizeof(runtime.structfield{})
- func imethodSize() int     { return 4 + 4 }              // Sizeof(runtime.imethod{})
- func commonSize() int      { return 4*Widthptr + 8 + 8 } // Sizeof(runtime._type{})
+ func structfieldSize() int { return 3 * types.PtrSize }       // Sizeof(runtime.structfield{})
+ func imethodSize() int     { return 4 + 4 }                   // Sizeof(runtime.imethod{})
+ func commonSize() int      { return 4*types.PtrSize + 8 + 8 } // Sizeof(runtime._type{})
  
  func uncommonSize(t *types.Type) int { // Sizeof(runtime.uncommontype{})
-       if t.Sym == nil && len(methods(t)) == 0 {
+       if t.Sym() == nil && len(methods(t)) == 0 {
                return 0
        }
        return 4 + 2 + 2 + 4 + 4
  }
  
  func makefield(name string, t *types.Type) *types.Field {
-       f := types.NewField()
-       f.Type = t
-       f.Sym = (*types.Pkg)(nil).Lookup(name)
-       return f
+       sym := (*types.Pkg)(nil).Lookup(name)
+       return types.NewField(src.NoXPos, sym, t)
  }
  
- // bmap makes the map bucket type given the type of the map.
- func bmap(t *types.Type) *types.Type {
+ // MapBucketType makes the map bucket type given the type of the map.
+ func MapBucketType(t *types.Type) *types.Type {
        if t.MapType().Bucket != nil {
                return t.MapType().Bucket
        }
  
-       bucket := types.New(TSTRUCT)
        keytype := t.Key()
        elemtype := t.Elem()
-       dowidth(keytype)
-       dowidth(elemtype)
+       types.CalcSize(keytype)
+       types.CalcSize(elemtype)
        if keytype.Width > MAXKEYSIZE {
                keytype = types.NewPtr(keytype)
        }
        field := make([]*types.Field, 0, 5)
  
        // The first field is: uint8 topbits[BUCKETSIZE].
-       arr := types.NewArray(types.Types[TUINT8], BUCKETSIZE)
+       arr := types.NewArray(types.Types[types.TUINT8], BUCKETSIZE)
        field = append(field, makefield("topbits", arr))
  
        arr = types.NewArray(keytype, BUCKETSIZE)
        // Arrange for the bucket to have no pointers by changing
        // the type of the overflow field to uintptr in this case.
        // See comment on hmap.overflow in runtime/map.go.
-       otyp := types.NewPtr(bucket)
+       otyp := types.Types[types.TUNSAFEPTR]
        if !elemtype.HasPointers() && !keytype.HasPointers() {
-               otyp = types.Types[TUINTPTR]
+               otyp = types.Types[types.TUINTPTR]
        }
        overflow := makefield("overflow", otyp)
        field = append(field, overflow)
  
        // link up fields
+       bucket := types.NewStruct(types.NoPkg, field[:])
        bucket.SetNoalg(true)
-       bucket.SetFields(field[:])
-       dowidth(bucket)
+       types.CalcSize(bucket)
  
        // Check invariants that map code depends on.
-       if !IsComparable(t.Key()) {
-               Fatalf("unsupported map key type for %v", t)
+       if !types.IsComparable(t.Key()) {
+               base.Fatalf("unsupported map key type for %v", t)
        }
        if BUCKETSIZE < 8 {
-               Fatalf("bucket size too small for proper alignment")
+               base.Fatalf("bucket size too small for proper alignment")
        }
        if keytype.Align > BUCKETSIZE {
-               Fatalf("key align too big for %v", t)
+               base.Fatalf("key align too big for %v", t)
        }
        if elemtype.Align > BUCKETSIZE {
-               Fatalf("elem align too big for %v", t)
+               base.Fatalf("elem align too big for %v", t)
        }
        if keytype.Width > MAXKEYSIZE {
-               Fatalf("key size to large for %v", t)
+               base.Fatalf("key size to large for %v", t)
        }
        if elemtype.Width > MAXELEMSIZE {
-               Fatalf("elem size to large for %v", t)
+               base.Fatalf("elem size to large for %v", t)
        }
        if t.Key().Width > MAXKEYSIZE && !keytype.IsPtr() {
-               Fatalf("key indirect incorrect for %v", t)
+               base.Fatalf("key indirect incorrect for %v", t)
        }
        if t.Elem().Width > MAXELEMSIZE && !elemtype.IsPtr() {
-               Fatalf("elem indirect incorrect for %v", t)
+               base.Fatalf("elem indirect incorrect for %v", t)
        }
        if keytype.Width%int64(keytype.Align) != 0 {
-               Fatalf("key size not a multiple of key align for %v", t)
+               base.Fatalf("key size not a multiple of key align for %v", t)
        }
        if elemtype.Width%int64(elemtype.Align) != 0 {
-               Fatalf("elem size not a multiple of elem align for %v", t)
+               base.Fatalf("elem size not a multiple of elem align for %v", t)
        }
        if bucket.Align%keytype.Align != 0 {
-               Fatalf("bucket align not multiple of key align %v", t)
+               base.Fatalf("bucket align not multiple of key align %v", t)
        }
        if bucket.Align%elemtype.Align != 0 {
-               Fatalf("bucket align not multiple of elem align %v", t)
+               base.Fatalf("bucket align not multiple of elem align %v", t)
        }
        if keys.Offset%int64(keytype.Align) != 0 {
-               Fatalf("bad alignment of keys in bmap for %v", t)
+               base.Fatalf("bad alignment of keys in bmap for %v", t)
        }
        if elems.Offset%int64(elemtype.Align) != 0 {
-               Fatalf("bad alignment of elems in bmap for %v", t)
+               base.Fatalf("bad alignment of elems in bmap for %v", t)
        }
  
        // Double-check that overflow field is final memory in struct,
        // with no padding at end.
-       if overflow.Offset != bucket.Width-int64(Widthptr) {
-               Fatalf("bad offset of overflow in bmap for %v", t)
+       if overflow.Offset != bucket.Width-int64(types.PtrSize) {
+               base.Fatalf("bad offset of overflow in bmap for %v", t)
        }
  
        t.MapType().Bucket = bucket
        return bucket
  }
  
- // hmap builds a type representing a Hmap structure for the given map type.
+ // MapType builds a type representing a Hmap structure for the given map type.
  // Make sure this stays in sync with runtime/map.go.
- func hmap(t *types.Type) *types.Type {
+ func MapType(t *types.Type) *types.Type {
        if t.MapType().Hmap != nil {
                return t.MapType().Hmap
        }
  
-       bmap := bmap(t)
+       bmap := MapBucketType(t)
  
        // build a struct:
        // type hmap struct {
        // }
        // must match runtime/map.go:hmap.
        fields := []*types.Field{
-               makefield("count", types.Types[TINT]),
-               makefield("flags", types.Types[TUINT8]),
-               makefield("B", types.Types[TUINT8]),
-               makefield("noverflow", types.Types[TUINT16]),
-               makefield("hash0", types.Types[TUINT32]), // Used in walk.go for OMAKEMAP.
-               makefield("buckets", types.NewPtr(bmap)), // Used in walk.go for OMAKEMAP.
+               makefield("count", types.Types[types.TINT]),
+               makefield("flags", types.Types[types.TUINT8]),
+               makefield("B", types.Types[types.TUINT8]),
+               makefield("noverflow", types.Types[types.TUINT16]),
+               makefield("hash0", types.Types[types.TUINT32]), // Used in walk.go for OMAKEMAP.
+               makefield("buckets", types.NewPtr(bmap)),       // Used in walk.go for OMAKEMAP.
                makefield("oldbuckets", types.NewPtr(bmap)),
-               makefield("nevacuate", types.Types[TUINTPTR]),
-               makefield("extra", types.Types[TUNSAFEPTR]),
+               makefield("nevacuate", types.Types[types.TUINTPTR]),
+               makefield("extra", types.Types[types.TUNSAFEPTR]),
        }
  
-       hmap := types.New(TSTRUCT)
+       hmap := types.NewStruct(types.NoPkg, fields)
        hmap.SetNoalg(true)
-       hmap.SetFields(fields)
-       dowidth(hmap)
+       types.CalcSize(hmap)
  
        // The size of hmap should be 48 bytes on 64 bit
        // and 28 bytes on 32 bit platforms.
-       if size := int64(8 + 5*Widthptr); hmap.Width != size {
-               Fatalf("hmap size not correct: got %d, want %d", hmap.Width, size)
+       if size := int64(8 + 5*types.PtrSize); hmap.Width != size {
+               base.Fatalf("hmap size not correct: got %d, want %d", hmap.Width, size)
        }
  
        t.MapType().Hmap = hmap
        return hmap
  }
  
- // hiter builds a type representing an Hiter structure for the given map type.
+ // MapIterType builds a type representing an Hiter structure for the given map type.
  // Make sure this stays in sync with runtime/map.go.
- func hiter(t *types.Type) *types.Type {
+ func MapIterType(t *types.Type) *types.Type {
        if t.MapType().Hiter != nil {
                return t.MapType().Hiter
        }
  
-       hmap := hmap(t)
-       bmap := bmap(t)
+       hmap := MapType(t)
+       bmap := MapBucketType(t)
  
        // build a struct:
        // type hiter struct {
        fields := []*types.Field{
                makefield("key", types.NewPtr(t.Key())),   // Used in range.go for TMAP.
                makefield("elem", types.NewPtr(t.Elem())), // Used in range.go for TMAP.
-               makefield("t", types.Types[TUNSAFEPTR]),
+               makefield("t", types.Types[types.TUNSAFEPTR]),
                makefield("h", types.NewPtr(hmap)),
                makefield("buckets", types.NewPtr(bmap)),
                makefield("bptr", types.NewPtr(bmap)),
-               makefield("overflow", types.Types[TUNSAFEPTR]),
-               makefield("oldoverflow", types.Types[TUNSAFEPTR]),
-               makefield("startBucket", types.Types[TUINTPTR]),
-               makefield("offset", types.Types[TUINT8]),
-               makefield("wrapped", types.Types[TBOOL]),
-               makefield("B", types.Types[TUINT8]),
-               makefield("i", types.Types[TUINT8]),
-               makefield("bucket", types.Types[TUINTPTR]),
-               makefield("checkBucket", types.Types[TUINTPTR]),
+               makefield("overflow", types.Types[types.TUNSAFEPTR]),
+               makefield("oldoverflow", types.Types[types.TUNSAFEPTR]),
+               makefield("startBucket", types.Types[types.TUINTPTR]),
+               makefield("offset", types.Types[types.TUINT8]),
+               makefield("wrapped", types.Types[types.TBOOL]),
+               makefield("B", types.Types[types.TUINT8]),
+               makefield("i", types.Types[types.TUINT8]),
+               makefield("bucket", types.Types[types.TUINTPTR]),
+               makefield("checkBucket", types.Types[types.TUINTPTR]),
        }
  
        // build iterator struct holding the above fields
-       hiter := types.New(TSTRUCT)
+       hiter := types.NewStruct(types.NoPkg, fields)
        hiter.SetNoalg(true)
-       hiter.SetFields(fields)
-       dowidth(hiter)
-       if hiter.Width != int64(12*Widthptr) {
-               Fatalf("hash_iter size not correct %d %d", hiter.Width, 12*Widthptr)
+       types.CalcSize(hiter)
+       if hiter.Width != int64(12*types.PtrSize) {
+               base.Fatalf("hash_iter size not correct %d %d", hiter.Width, 12*types.PtrSize)
        }
        t.MapType().Hiter = hiter
        hiter.StructType().Map = t
        return hiter
  }
  
- // deferstruct makes a runtime._defer structure, with additional space for
- // stksize bytes of args.
- func deferstruct(stksize int64) *types.Type {
-       makefield := func(name string, typ *types.Type) *types.Field {
-               f := types.NewField()
-               f.Type = typ
-               // Unlike the global makefield function, this one needs to set Pkg
-               // because these types might be compared (in SSA CSE sorting).
-               // TODO: unify this makefield and the global one above.
-               f.Sym = &types.Sym{Name: name, Pkg: localpkg}
-               return f
-       }
-       argtype := types.NewArray(types.Types[TUINT8], stksize)
-       argtype.Width = stksize
-       argtype.Align = 1
-       // These fields must match the ones in runtime/runtime2.go:_defer and
-       // cmd/compile/internal/gc/ssa.go:(*state).call.
-       fields := []*types.Field{
-               makefield("siz", types.Types[TUINT32]),
-               makefield("started", types.Types[TBOOL]),
-               makefield("heap", types.Types[TBOOL]),
-               makefield("openDefer", types.Types[TBOOL]),
-               makefield("sp", types.Types[TUINTPTR]),
-               makefield("pc", types.Types[TUINTPTR]),
-               // Note: the types here don't really matter. Defer structures
-               // are always scanned explicitly during stack copying and GC,
-               // so we make them uintptr type even though they are real pointers.
-               makefield("fn", types.Types[TUINTPTR]),
-               makefield("_panic", types.Types[TUINTPTR]),
-               makefield("link", types.Types[TUINTPTR]),
-               makefield("framepc", types.Types[TUINTPTR]),
-               makefield("varp", types.Types[TUINTPTR]),
-               makefield("fd", types.Types[TUINTPTR]),
-               makefield("args", argtype),
-       }
-       // build struct holding the above fields
-       s := types.New(TSTRUCT)
-       s.SetNoalg(true)
-       s.SetFields(fields)
-       s.Width = widstruct(s, s, 0, 1)
-       s.Align = uint8(Widthptr)
-       return s
- }
- // f is method type, with receiver.
- // return function type, receiver as first argument (or not).
- func methodfunc(f *types.Type, receiver *types.Type) *types.Type {
-       inLen := f.Params().Fields().Len()
-       if receiver != nil {
-               inLen++
-       }
-       in := make([]*Node, 0, inLen)
-       if receiver != nil {
-               d := anonfield(receiver)
-               in = append(in, d)
-       }
-       for _, t := range f.Params().Fields().Slice() {
-               d := anonfield(t.Type)
-               d.SetIsDDD(t.IsDDD())
-               in = append(in, d)
-       }
-       outLen := f.Results().Fields().Len()
-       out := make([]*Node, 0, outLen)
-       for _, t := range f.Results().Fields().Slice() {
-               d := anonfield(t.Type)
-               out = append(out, d)
-       }
-       t := functype(nil, in, out)
-       if f.Nname() != nil {
-               // Link to name of original method function.
-               t.SetNname(f.Nname())
-       }
-       return t
- }
  // methods returns the methods of the non-interface type t, sorted by name.
  // Generates stub functions as needed.
- func methods(t *types.Type) []*Sig {
+ func methods(t *types.Type) []*typeSig {
        // method type
-       mt := methtype(t)
+       mt := types.ReceiverBaseType(t)
  
        if mt == nil {
                return nil
        }
-       expandmeth(mt)
+       typecheck.CalcMethods(mt)
  
        // type stored in interface word
        it := t
  
-       if !isdirectiface(it) {
+       if !types.IsDirectIface(it) {
                it = types.NewPtr(t)
        }
  
        // make list of methods for t,
        // generating code if necessary.
-       var ms []*Sig
+       var ms []*typeSig
        for _, f := range mt.AllMethods().Slice() {
+               if f.Sym == nil {
+                       base.Fatalf("method with no sym on %v", mt)
+               }
                if !f.IsMethod() {
-                       Fatalf("non-method on %v method %v %v\n", mt, f.Sym, f)
+                       base.Fatalf("non-method on %v method %v %v", mt, f.Sym, f)
                }
                if f.Type.Recv() == nil {
-                       Fatalf("receiver with no type on %v method %v %v\n", mt, f.Sym, f)
+                       base.Fatalf("receiver with no type on %v method %v %v", mt, f.Sym, f)
                }
                if f.Nointerface() {
                        continue
                }
  
-               method := f.Sym
-               if method == nil {
-                       break
-               }
                // get receiver type for this particular method.
                // if pointer receiver but non-pointer t and
                // this is not an embedded pointer inside a struct,
                // method does not apply.
-               if !isMethodApplicable(t, f) {
+               if !types.IsMethodApplicable(t, f) {
                        continue
                }
  
-               sig := &Sig{
-                       name:  method,
-                       isym:  methodSym(it, method),
-                       tsym:  methodSym(t, method),
-                       type_: methodfunc(f.Type, t),
-                       mtype: methodfunc(f.Type, nil),
+               sig := &typeSig{
+                       name:  f.Sym,
+                       isym:  methodWrapper(it, f),
+                       tsym:  methodWrapper(t, f),
+                       type_: typecheck.NewMethodType(f.Type, t),
+                       mtype: typecheck.NewMethodType(f.Type, nil),
                }
                ms = append(ms, sig)
-               this := f.Type.Recv().Type
-               if !sig.isym.Siggen() {
-                       sig.isym.SetSiggen(true)
-                       if !types.Identical(this, it) {
-                               genwrapper(it, f, sig.isym)
-                       }
-               }
-               if !sig.tsym.Siggen() {
-                       sig.tsym.SetSiggen(true)
-                       if !types.Identical(this, t) {
-                               genwrapper(t, f, sig.tsym)
-                       }
-               }
        }
  
        return ms
  }
  
  // imethods returns the methods of the interface type t, sorted by name.
- func imethods(t *types.Type) []*Sig {
-       var methods []*Sig
+ func imethods(t *types.Type) []*typeSig {
+       var methods []*typeSig
        for _, f := range t.Fields().Slice() {
-               if f.Type.Etype != TFUNC || f.Sym == nil {
+               if f.Type.Kind() != types.TFUNC || f.Sym == nil {
                        continue
                }
                if f.Sym.IsBlank() {
-                       Fatalf("unexpected blank symbol in interface method set")
+                       base.Fatalf("unexpected blank symbol in interface method set")
                }
                if n := len(methods); n > 0 {
                        last := methods[n-1]
                        if !last.name.Less(f.Sym) {
-                               Fatalf("sigcmp vs sortinter %v %v", last.name, f.Sym)
+                               base.Fatalf("sigcmp vs sortinter %v %v", last.name, f.Sym)
                        }
                }
  
-               sig := &Sig{
+               sig := &typeSig{
                        name:  f.Sym,
                        mtype: f.Type,
-                       type_: methodfunc(f.Type, nil),
+                       type_: typecheck.NewMethodType(f.Type, nil),
                }
                methods = append(methods, sig)
  
                // IfaceType.Method is not in the reflect data.
                // Generate the method body, so that compiled
                // code can refer to it.
-               isym := methodSym(t, f.Sym)
-               if !isym.Siggen() {
-                       isym.SetSiggen(true)
-                       genwrapper(t, f, isym)
-               }
+               methodWrapper(t, f)
        }
  
        return methods
@@@ -496,79 -401,79 +401,79 @@@ func dimportpath(p *types.Pkg) 
        }
  
        // If we are compiling the runtime package, there are two runtime packages around
-       // -- localpkg and Runtimepkg. We don't want to produce import path symbols for
+       // -- localpkg and Pkgs.Runtime. We don't want to produce import path symbols for
        // both of them, so just produce one for localpkg.
-       if myimportpath == "runtime" && p == Runtimepkg {
+       if base.Ctxt.Pkgpath == "runtime" && p == ir.Pkgs.Runtime {
                return
        }
  
        str := p.Path
-       if p == localpkg {
+       if p == types.LocalPkg {
                // Note: myimportpath != "", or else dgopkgpath won't call dimportpath.
-               str = myimportpath
+               str = base.Ctxt.Pkgpath
        }
  
-       s := Ctxt.Lookup("type..importpath." + p.Prefix + ".")
+       s := base.Ctxt.Lookup("type..importpath." + p.Prefix + ".")
        ot := dnameData(s, 0, str, "", nil, false)
-       ggloblsym(s, int32(ot), obj.DUPOK|obj.RODATA)
+       objw.Global(s, int32(ot), obj.DUPOK|obj.RODATA)
        s.Set(obj.AttrContentAddressable, true)
        p.Pathsym = s
  }
  
  func dgopkgpath(s *obj.LSym, ot int, pkg *types.Pkg) int {
        if pkg == nil {
-               return duintptr(s, ot, 0)
+               return objw.Uintptr(s, ot, 0)
        }
  
-       if pkg == localpkg && myimportpath == "" {
+       if pkg == types.LocalPkg && base.Ctxt.Pkgpath == "" {
                // If we don't know the full import path of the package being compiled
                // (i.e. -p was not passed on the compiler command line), emit a reference to
                // type..importpath.""., which the linker will rewrite using the correct import path.
                // Every package that imports this one directly defines the symbol.
                // See also https://groups.google.com/forum/#!topic/golang-dev/myb9s53HxGQ.
-               ns := Ctxt.Lookup(`type..importpath."".`)
-               return dsymptr(s, ot, ns, 0)
+               ns := base.Ctxt.Lookup(`type..importpath."".`)
+               return objw.SymPtr(s, ot, ns, 0)
        }
  
        dimportpath(pkg)
-       return dsymptr(s, ot, pkg.Pathsym, 0)
+       return objw.SymPtr(s, ot, pkg.Pathsym, 0)
  }
  
  // dgopkgpathOff writes an offset relocation in s at offset ot to the pkg path symbol.
  func dgopkgpathOff(s *obj.LSym, ot int, pkg *types.Pkg) int {
        if pkg == nil {
-               return duint32(s, ot, 0)
+               return objw.Uint32(s, ot, 0)
        }
-       if pkg == localpkg && myimportpath == "" {
+       if pkg == types.LocalPkg && base.Ctxt.Pkgpath == "" {
                // If we don't know the full import path of the package being compiled
                // (i.e. -p was not passed on the compiler command line), emit a reference to
                // type..importpath.""., which the linker will rewrite using the correct import path.
                // Every package that imports this one directly defines the symbol.
                // See also https://groups.google.com/forum/#!topic/golang-dev/myb9s53HxGQ.
-               ns := Ctxt.Lookup(`type..importpath."".`)
-               return dsymptrOff(s, ot, ns)
+               ns := base.Ctxt.Lookup(`type..importpath."".`)
+               return objw.SymPtrOff(s, ot, ns)
        }
  
        dimportpath(pkg)
-       return dsymptrOff(s, ot, pkg.Pathsym)
+       return objw.SymPtrOff(s, ot, pkg.Pathsym)
  }
  
  // dnameField dumps a reflect.name for a struct field.
  func dnameField(lsym *obj.LSym, ot int, spkg *types.Pkg, ft *types.Field) int {
        if !types.IsExported(ft.Sym.Name) && ft.Sym.Pkg != spkg {
-               Fatalf("package mismatch for %v", ft.Sym)
+               base.Fatalf("package mismatch for %v", ft.Sym)
        }
        nsym := dname(ft.Sym.Name, ft.Note, nil, types.IsExported(ft.Sym.Name))
-       return dsymptr(lsym, ot, nsym, 0)
+       return objw.SymPtr(lsym, ot, nsym, 0)
  }
  
  // dnameData writes the contents of a reflect.name into s at offset ot.
  func dnameData(s *obj.LSym, ot int, name, tag string, pkg *types.Pkg, exported bool) int {
        if len(name) > 1<<16-1 {
-               Fatalf("name too long: %s", name)
+               base.Fatalf("name too long: %s", name)
        }
        if len(tag) > 1<<16-1 {
-               Fatalf("tag too long: %s", tag)
+               base.Fatalf("tag too long: %s", tag)
        }
  
        // Encode name and tag. See reflect/type.go for details.
                copy(tb[2:], tag)
        }
  
-       ot = int(s.WriteBytes(Ctxt, int64(ot), b))
+       ot = int(s.WriteBytes(base.Ctxt, int64(ot), b))
  
        if pkg != nil {
                ot = dgopkgpathOff(s, ot, pkg)
@@@ -633,12 -538,12 +538,12 @@@ func dname(name, tag string, pkg *types
                sname = fmt.Sprintf(`%s"".%d`, sname, dnameCount)
                dnameCount++
        }
-       s := Ctxt.Lookup(sname)
+       s := base.Ctxt.Lookup(sname)
        if len(s.P) > 0 {
                return s
        }
        ot := dnameData(s, 0, name, tag, pkg, exported)
-       ggloblsym(s, int32(ot), obj.DUPOK|obj.RODATA)
+       objw.Global(s, int32(ot), obj.DUPOK|obj.RODATA)
        s.Set(obj.AttrContentAddressable, true)
        return s
  }
  // backing array of the []method field is written (by dextratypeData).
  func dextratype(lsym *obj.LSym, ot int, t *types.Type, dataAdd int) int {
        m := methods(t)
-       if t.Sym == nil && len(m) == 0 {
+       if t.Sym() == nil && len(m) == 0 {
                return ot
        }
-       noff := int(Rnd(int64(ot), int64(Widthptr)))
+       noff := int(types.Rnd(int64(ot), int64(types.PtrSize)))
        if noff != ot {
-               Fatalf("unexpected alignment in dextratype for %v", t)
+               base.Fatalf("unexpected alignment in dextratype for %v", t)
        }
  
        for _, a := range m {
-               dtypesym(a.type_)
+               writeType(a.type_)
        }
  
        ot = dgopkgpathOff(lsym, ot, typePkg(t))
        dataAdd += uncommonSize(t)
        mcount := len(m)
        if mcount != int(uint16(mcount)) {
-               Fatalf("too many methods on %v: %d", t, mcount)
+               base.Fatalf("too many methods on %v: %d", t, mcount)
        }
        xcount := sort.Search(mcount, func(i int) bool { return !types.IsExported(m[i].name.Name) })
        if dataAdd != int(uint32(dataAdd)) {
-               Fatalf("methods are too far away on %v: %d", t, dataAdd)
+               base.Fatalf("methods are too far away on %v: %d", t, dataAdd)
        }
  
-       ot = duint16(lsym, ot, uint16(mcount))
-       ot = duint16(lsym, ot, uint16(xcount))
-       ot = duint32(lsym, ot, uint32(dataAdd))
-       ot = duint32(lsym, ot, 0)
+       ot = objw.Uint16(lsym, ot, uint16(mcount))
+       ot = objw.Uint16(lsym, ot, uint16(xcount))
+       ot = objw.Uint32(lsym, ot, uint32(dataAdd))
+       ot = objw.Uint32(lsym, ot, 0)
        return ot
  }
  
  func typePkg(t *types.Type) *types.Pkg {
-       tsym := t.Sym
+       tsym := t.Sym()
        if tsym == nil {
-               switch t.Etype {
-               case TARRAY, TSLICE, TPTR, TCHAN:
+               switch t.Kind() {
+               case types.TARRAY, types.TSLICE, types.TPTR, types.TCHAN:
                        if t.Elem() != nil {
-                               tsym = t.Elem().Sym
+                               tsym = t.Elem().Sym()
                        }
                }
        }
-       if tsym != nil && t != types.Types[t.Etype] && t != types.Errortype {
+       if tsym != nil && t != types.Types[t.Kind()] && t != types.ErrorType {
                return tsym.Pkg
        }
        return nil
@@@ -707,16 -612,16 +612,16 @@@ func dextratypeData(lsym *obj.LSym, ot 
                }
                nsym := dname(a.name.Name, "", pkg, exported)
  
-               ot = dsymptrOff(lsym, ot, nsym)
-               ot = dmethodptrOff(lsym, ot, dtypesym(a.mtype))
-               ot = dmethodptrOff(lsym, ot, a.isym.Linksym())
-               ot = dmethodptrOff(lsym, ot, a.tsym.Linksym())
+               ot = objw.SymPtrOff(lsym, ot, nsym)
+               ot = dmethodptrOff(lsym, ot, writeType(a.mtype))
+               ot = dmethodptrOff(lsym, ot, a.isym)
+               ot = dmethodptrOff(lsym, ot, a.tsym)
        }
        return ot
  }
  
  func dmethodptrOff(s *obj.LSym, ot int, x *obj.LSym) int {
-       duint32(s, ot, 0)
+       objw.Uint32(s, ot, 0)
        r := obj.Addrel(s)
        r.Off = int32(ot)
        r.Siz = 4
  }
  
  var kinds = []int{
-       TINT:        objabi.KindInt,
-       TUINT:       objabi.KindUint,
-       TINT8:       objabi.KindInt8,
-       TUINT8:      objabi.KindUint8,
-       TINT16:      objabi.KindInt16,
-       TUINT16:     objabi.KindUint16,
-       TINT32:      objabi.KindInt32,
-       TUINT32:     objabi.KindUint32,
-       TINT64:      objabi.KindInt64,
-       TUINT64:     objabi.KindUint64,
-       TUINTPTR:    objabi.KindUintptr,
-       TFLOAT32:    objabi.KindFloat32,
-       TFLOAT64:    objabi.KindFloat64,
-       TBOOL:       objabi.KindBool,
-       TSTRING:     objabi.KindString,
-       TPTR:        objabi.KindPtr,
-       TSTRUCT:     objabi.KindStruct,
-       TINTER:      objabi.KindInterface,
-       TCHAN:       objabi.KindChan,
-       TMAP:        objabi.KindMap,
-       TARRAY:      objabi.KindArray,
-       TSLICE:      objabi.KindSlice,
-       TFUNC:       objabi.KindFunc,
-       TCOMPLEX64:  objabi.KindComplex64,
-       TCOMPLEX128: objabi.KindComplex128,
-       TUNSAFEPTR:  objabi.KindUnsafePointer,
- }
- // typeptrdata returns the length in bytes of the prefix of t
- // containing pointer data. Anything after this offset is scalar data.
- func typeptrdata(t *types.Type) int64 {
-       if !t.HasPointers() {
-               return 0
-       }
-       switch t.Etype {
-       case TPTR,
-               TUNSAFEPTR,
-               TFUNC,
-               TCHAN,
-               TMAP:
-               return int64(Widthptr)
-       case TSTRING:
-               // struct { byte *str; intgo len; }
-               return int64(Widthptr)
-       case TINTER:
-               // struct { Itab *tab;  void *data; } or
-               // struct { Type *type; void *data; }
-               // Note: see comment in plive.go:onebitwalktype1.
-               return 2 * int64(Widthptr)
-       case TSLICE:
-               // struct { byte *array; uintgo len; uintgo cap; }
-               return int64(Widthptr)
-       case TARRAY:
-               // haspointers already eliminated t.NumElem() == 0.
-               return (t.NumElem()-1)*t.Elem().Width + typeptrdata(t.Elem())
-       case TSTRUCT:
-               // Find the last field that has pointers.
-               var lastPtrField *types.Field
-               for _, t1 := range t.Fields().Slice() {
-                       if t1.Type.HasPointers() {
-                               lastPtrField = t1
-                       }
-               }
-               return lastPtrField.Offset + typeptrdata(lastPtrField.Type)
-       default:
-               Fatalf("typeptrdata: unexpected type, %v", t)
-               return 0
-       }
+       types.TINT:        objabi.KindInt,
+       types.TUINT:       objabi.KindUint,
+       types.TINT8:       objabi.KindInt8,
+       types.TUINT8:      objabi.KindUint8,
+       types.TINT16:      objabi.KindInt16,
+       types.TUINT16:     objabi.KindUint16,
+       types.TINT32:      objabi.KindInt32,
+       types.TUINT32:     objabi.KindUint32,
+       types.TINT64:      objabi.KindInt64,
+       types.TUINT64:     objabi.KindUint64,
+       types.TUINTPTR:    objabi.KindUintptr,
+       types.TFLOAT32:    objabi.KindFloat32,
+       types.TFLOAT64:    objabi.KindFloat64,
+       types.TBOOL:       objabi.KindBool,
+       types.TSTRING:     objabi.KindString,
+       types.TPTR:        objabi.KindPtr,
+       types.TSTRUCT:     objabi.KindStruct,
+       types.TINTER:      objabi.KindInterface,
+       types.TCHAN:       objabi.KindChan,
+       types.TMAP:        objabi.KindMap,
+       types.TARRAY:      objabi.KindArray,
+       types.TSLICE:      objabi.KindSlice,
+       types.TFUNC:       objabi.KindFunc,
+       types.TCOMPLEX64:  objabi.KindComplex64,
+       types.TCOMPLEX128: objabi.KindComplex128,
+       types.TUNSAFEPTR:  objabi.KindUnsafePointer,
  }
  
  // tflag is documented in reflect/type.go.
@@@ -824,17 -680,17 +680,17 @@@ var 
  
  // dcommontype dumps the contents of a reflect.rtype (runtime._type).
  func dcommontype(lsym *obj.LSym, t *types.Type) int {
-       dowidth(t)
+       types.CalcSize(t)
        eqfunc := geneq(t)
  
        sptrWeak := true
        var sptr *obj.LSym
        if !t.IsPtr() || t.IsPtrElem() {
                tptr := types.NewPtr(t)
-               if t.Sym != nil || methods(tptr) != nil {
+               if t.Sym() != nil || methods(tptr) != nil {
                        sptrWeak = false
                }
-               sptr = dtypesym(tptr)
+               sptr = writeType(tptr)
        }
  
        gcsym, useGCProg, ptrdata := dgcsym(t)
        //              ptrToThis     typeOff
        //      }
        ot := 0
-       ot = duintptr(lsym, ot, uint64(t.Width))
-       ot = duintptr(lsym, ot, uint64(ptrdata))
-       ot = duint32(lsym, ot, typehash(t))
+       ot = objw.Uintptr(lsym, ot, uint64(t.Width))
+       ot = objw.Uintptr(lsym, ot, uint64(ptrdata))
+       ot = objw.Uint32(lsym, ot, types.TypeHash(t))
  
        var tflag uint8
        if uncommonSize(t) != 0 {
                tflag |= tflagUncommon
        }
-       if t.Sym != nil && t.Sym.Name != "" {
+       if t.Sym() != nil && t.Sym().Name != "" {
                tflag |= tflagNamed
        }
-       if IsRegularMemory(t) {
+       if isRegularMemory(t) {
                tflag |= tflagRegularMemory
        }
  
        if !strings.HasPrefix(p, "*") {
                p = "*" + p
                tflag |= tflagExtraStar
-               if t.Sym != nil {
-                       exported = types.IsExported(t.Sym.Name)
+               if t.Sym() != nil {
+                       exported = types.IsExported(t.Sym().Name)
                }
        } else {
-               if t.Elem() != nil && t.Elem().Sym != nil {
-                       exported = types.IsExported(t.Elem().Sym.Name)
+               if t.Elem() != nil && t.Elem().Sym() != nil {
+                       exported = types.IsExported(t.Elem().Sym().Name)
                }
        }
  
-       ot = duint8(lsym, ot, tflag)
+       ot = objw.Uint8(lsym, ot, tflag)
  
        // runtime (and common sense) expects alignment to be a power of two.
        i := int(t.Align)
                i = 1
        }
        if i&(i-1) != 0 {
-               Fatalf("invalid alignment %d for %v", t.Align, t)
+               base.Fatalf("invalid alignment %d for %v", t.Align, t)
        }
-       ot = duint8(lsym, ot, t.Align) // align
-       ot = duint8(lsym, ot, t.Align) // fieldAlign
+       ot = objw.Uint8(lsym, ot, t.Align) // align
+       ot = objw.Uint8(lsym, ot, t.Align) // fieldAlign
  
-       i = kinds[t.Etype]
-       if isdirectiface(t) {
+       i = kinds[t.Kind()]
+       if types.IsDirectIface(t) {
                i |= objabi.KindDirectIface
        }
        if useGCProg {
                i |= objabi.KindGCProg
        }
-       ot = duint8(lsym, ot, uint8(i)) // kind
+       ot = objw.Uint8(lsym, ot, uint8(i)) // kind
        if eqfunc != nil {
-               ot = dsymptr(lsym, ot, eqfunc, 0) // equality function
+               ot = objw.SymPtr(lsym, ot, eqfunc, 0) // equality function
        } else {
-               ot = duintptr(lsym, ot, 0) // type we can't do == with
+               ot = objw.Uintptr(lsym, ot, 0) // type we can't do == with
        }
-       ot = dsymptr(lsym, ot, gcsym, 0) // gcdata
+       ot = objw.SymPtr(lsym, ot, gcsym, 0) // gcdata
  
        nsym := dname(p, "", nil, exported)
-       ot = dsymptrOff(lsym, ot, nsym) // str
+       ot = objw.SymPtrOff(lsym, ot, nsym) // str
        // ptrToThis
        if sptr == nil {
-               ot = duint32(lsym, ot, 0)
+               ot = objw.Uint32(lsym, ot, 0)
        } else if sptrWeak {
-               ot = dsymptrWeakOff(lsym, ot, sptr)
+               ot = objw.SymPtrWeakOff(lsym, ot, sptr)
        } else {
-               ot = dsymptrOff(lsym, ot, sptr)
+               ot = objw.SymPtrOff(lsym, ot, sptr)
        }
  
        return ot
  }
  
- // typeHasNoAlg reports whether t does not have any associated hash/eq
- // algorithms because t, or some component of t, is marked Noalg.
- func typeHasNoAlg(t *types.Type) bool {
-       a, bad := algtype1(t)
-       return a == ANOEQ && bad.Noalg()
- }
- func typesymname(t *types.Type) string {
-       name := t.ShortString()
-       // Use a separate symbol name for Noalg types for #17752.
-       if typeHasNoAlg(t) {
-               name = "noalg." + name
-       }
-       return name
- }
- // Fake package for runtime type info (headers)
- // Don't access directly, use typeLookup below.
- var (
-       typepkgmu sync.Mutex // protects typepkg lookups
-       typepkg   = types.NewPkg("type", "type")
- )
- func typeLookup(name string) *types.Sym {
-       typepkgmu.Lock()
-       s := typepkg.Lookup(name)
-       typepkgmu.Unlock()
-       return s
- }
- func typesym(t *types.Type) *types.Sym {
-       return typeLookup(typesymname(t))
- }
- // tracksym returns the symbol for tracking use of field/method f, assumed
+ // TrackSym returns the symbol for tracking use of field/method f, assumed
  // to be a member of struct/interface type t.
- func tracksym(t *types.Type, f *types.Field) *types.Sym {
-       return trackpkg.Lookup(t.ShortString() + "." + f.Sym.Name)
+ func TrackSym(t *types.Type, f *types.Field) *obj.LSym {
+       return base.PkgLinksym("go.track", t.ShortString()+"."+f.Sym.Name, obj.ABI0)
  }
  
- func typesymprefix(prefix string, t *types.Type) *types.Sym {
+ func TypeSymPrefix(prefix string, t *types.Type) *types.Sym {
        p := prefix + "." + t.ShortString()
-       s := typeLookup(p)
+       s := types.TypeSymLookup(p)
  
        // This function is for looking up type-related generated functions
        // (e.g. eq and hash). Make sure they are indeed generated.
        signatmu.Lock()
-       addsignat(t)
+       NeedRuntimeType(t)
        signatmu.Unlock()
  
        //print("algsym: %s -> %+S\n", p, s);
        return s
  }
  
- func typenamesym(t *types.Type) *types.Sym {
+ func TypeSym(t *types.Type) *types.Sym {
        if t == nil || (t.IsPtr() && t.Elem() == nil) || t.IsUntyped() {
-               Fatalf("typenamesym %v", t)
+               base.Fatalf("TypeSym %v", t)
+       }
+       if t.Kind() == types.TFUNC && t.Recv() != nil {
+               base.Fatalf("misuse of method type: %v", t)
        }
-       s := typesym(t)
+       s := types.TypeSym(t)
        signatmu.Lock()
-       addsignat(t)
+       NeedRuntimeType(t)
        signatmu.Unlock()
        return s
  }
  
- func typename(t *types.Type) *Node {
-       s := typenamesym(t)
-       if s.Def == nil {
-               n := newnamel(src.NoXPos, s)
-               n.Type = types.Types[TUINT8]
-               n.SetClass(PEXTERN)
-               n.SetTypecheck(1)
-               s.Def = asTypesNode(n)
-       }
-       n := nod(OADDR, asNode(s.Def), nil)
-       n.Type = types.NewPtr(asNode(s.Def).Type)
-       n.SetTypecheck(1)
-       return n
+ func TypeLinksymPrefix(prefix string, t *types.Type) *obj.LSym {
+       return TypeSymPrefix(prefix, t).Linksym()
  }
  
- func itabname(t, itype *types.Type) *Node {
-       if t == nil || (t.IsPtr() && t.Elem() == nil) || t.IsUntyped() || !itype.IsInterface() || itype.IsEmptyInterface() {
-               Fatalf("itabname(%v, %v)", t, itype)
-       }
-       s := itabpkg.Lookup(t.ShortString() + "," + itype.ShortString())
-       if s.Def == nil {
-               n := newname(s)
-               n.Type = types.Types[TUINT8]
-               n.SetClass(PEXTERN)
-               n.SetTypecheck(1)
-               s.Def = asTypesNode(n)
-               itabs = append(itabs, itabEntry{t: t, itype: itype, lsym: s.Linksym()})
-       }
-       n := nod(OADDR, asNode(s.Def), nil)
-       n.Type = types.NewPtr(asNode(s.Def).Type)
-       n.SetTypecheck(1)
-       return n
+ func TypeLinksymLookup(name string) *obj.LSym {
+       return types.TypeSymLookup(name).Linksym()
  }
  
- // isreflexive reports whether t has a reflexive equality operator.
- // That is, if x==x for all x of type t.
- func isreflexive(t *types.Type) bool {
-       switch t.Etype {
-       case TBOOL,
-               TINT,
-               TUINT,
-               TINT8,
-               TUINT8,
-               TINT16,
-               TUINT16,
-               TINT32,
-               TUINT32,
-               TINT64,
-               TUINT64,
-               TUINTPTR,
-               TPTR,
-               TUNSAFEPTR,
-               TSTRING,
-               TCHAN:
-               return true
-       case TFLOAT32,
-               TFLOAT64,
-               TCOMPLEX64,
-               TCOMPLEX128,
-               TINTER:
-               return false
-       case TARRAY:
-               return isreflexive(t.Elem())
+ func TypeLinksym(t *types.Type) *obj.LSym {
+       return TypeSym(t).Linksym()
+ }
  
-       case TSTRUCT:
-               for _, t1 := range t.Fields().Slice() {
-                       if !isreflexive(t1.Type) {
-                               return false
-                       }
-               }
-               return true
+ func TypePtr(t *types.Type) *ir.AddrExpr {
+       n := ir.NewLinksymExpr(base.Pos, TypeLinksym(t), types.Types[types.TUINT8])
+       return typecheck.Expr(typecheck.NodAddr(n)).(*ir.AddrExpr)
+ }
  
-       default:
-               Fatalf("bad type for map key: %v", t)
-               return false
+ func ITabAddr(t, itype *types.Type) *ir.AddrExpr {
+       if t == nil || (t.IsPtr() && t.Elem() == nil) || t.IsUntyped() || !itype.IsInterface() || itype.IsEmptyInterface() {
+               base.Fatalf("ITabAddr(%v, %v)", t, itype)
+       }
+       s, existed := ir.Pkgs.Itab.LookupOK(t.ShortString() + "," + itype.ShortString())
+       if !existed {
+               itabs = append(itabs, itabEntry{t: t, itype: itype, lsym: s.Linksym()})
        }
+       lsym := s.Linksym()
+       n := ir.NewLinksymExpr(base.Pos, lsym, types.Types[types.TUINT8])
+       return typecheck.Expr(typecheck.NodAddr(n)).(*ir.AddrExpr)
  }
  
  // needkeyupdate reports whether map updates with t as a key
  // need the key to be updated.
  func needkeyupdate(t *types.Type) bool {
-       switch t.Etype {
-       case TBOOL, TINT, TUINT, TINT8, TUINT8, TINT16, TUINT16, TINT32, TUINT32,
-               TINT64, TUINT64, TUINTPTR, TPTR, TUNSAFEPTR, TCHAN:
+       switch t.Kind() {
+       case types.TBOOL, types.TINT, types.TUINT, types.TINT8, types.TUINT8, types.TINT16, types.TUINT16, types.TINT32, types.TUINT32,
+               types.TINT64, types.TUINT64, types.TUINTPTR, types.TPTR, types.TUNSAFEPTR, types.TCHAN:
                return false
  
-       case TFLOAT32, TFLOAT64, TCOMPLEX64, TCOMPLEX128, // floats and complex can be +0/-0
-               TINTER,
-               TSTRING: // strings might have smaller backing stores
+       case types.TFLOAT32, types.TFLOAT64, types.TCOMPLEX64, types.TCOMPLEX128, // floats and complex can be +0/-0
+               types.TINTER,
+               types.TSTRING: // strings might have smaller backing stores
                return true
  
-       case TARRAY:
+       case types.TARRAY:
                return needkeyupdate(t.Elem())
  
-       case TSTRUCT:
+       case types.TSTRUCT:
                for _, t1 := range t.Fields().Slice() {
                        if needkeyupdate(t1.Type) {
                                return true
                return false
  
        default:
-               Fatalf("bad type for map key: %v", t)
+               base.Fatalf("bad type for map key: %v", t)
                return true
        }
  }
  
  // hashMightPanic reports whether the hash of a map key of type t might panic.
  func hashMightPanic(t *types.Type) bool {
-       switch t.Etype {
-       case TINTER:
+       switch t.Kind() {
+       case types.TINTER:
                return true
  
-       case TARRAY:
+       case types.TARRAY:
                return hashMightPanic(t.Elem())
  
-       case TSTRUCT:
+       case types.TSTRUCT:
                for _, t1 := range t.Fields().Slice() {
                        if hashMightPanic(t1.Type) {
                                return true
  // They've been separate internally to make error messages
  // better, but we have to merge them in the reflect tables.
  func formalType(t *types.Type) *types.Type {
-       if t == types.Bytetype || t == types.Runetype {
-               return types.Types[t.Etype]
+       if t == types.ByteType || t == types.RuneType {
+               return types.Types[t.Kind()]
        }
        return t
  }
  
- func dtypesym(t *types.Type) *obj.LSym {
+ func writeType(t *types.Type) *obj.LSym {
        t = formalType(t)
        if t.IsUntyped() {
-               Fatalf("dtypesym %v", t)
+               base.Fatalf("writeType %v", t)
        }
  
-       s := typesym(t)
+       s := types.TypeSym(t)
        lsym := s.Linksym()
        if s.Siggen() {
                return lsym
        // emit the type structures for int, float, etc.
        tbase := t
  
-       if t.IsPtr() && t.Sym == nil && t.Elem().Sym != nil {
+       if t.IsPtr() && t.Sym() == nil && t.Elem().Sym() != nil {
                tbase = t.Elem()
        }
        dupok := 0
-       if tbase.Sym == nil {
+       if tbase.Sym() == nil {
                dupok = obj.DUPOK
        }
  
-       if myimportpath != "runtime" || (tbase != types.Types[tbase.Etype] && tbase != types.Bytetype && tbase != types.Runetype && tbase != types.Errortype) { // int, float, etc
+       if base.Ctxt.Pkgpath != "runtime" || (tbase != types.Types[tbase.Kind()] && tbase != types.ByteType && tbase != types.RuneType && tbase != types.ErrorType) { // int, float, etc
                // named types from other files are defined only by those files
-               if tbase.Sym != nil && tbase.Sym.Pkg != localpkg {
-                       if i, ok := typeSymIdx[tbase]; ok {
-                               lsym.Pkg = tbase.Sym.Pkg.Prefix
-                               if t != tbase {
-                                       lsym.SymIdx = int32(i[1])
-                               } else {
-                                       lsym.SymIdx = int32(i[0])
-                               }
+               if tbase.Sym() != nil && tbase.Sym().Pkg != types.LocalPkg {
+                       if i := typecheck.BaseTypeIndex(t); i >= 0 {
+                               lsym.Pkg = tbase.Sym().Pkg.Prefix
+                               lsym.SymIdx = int32(i)
                                lsym.Set(obj.AttrIndexed, true)
                        }
                        return lsym
                }
                // TODO(mdempsky): Investigate whether this can happen.
-               if tbase.Etype == TFORW {
+               if tbase.Kind() == types.TFORW {
                        return lsym
                }
        }
  
        ot := 0
-       switch t.Etype {
+       switch t.Kind() {
        default:
                ot = dcommontype(lsym, t)
                ot = dextratype(lsym, ot, t, 0)
  
-       case TARRAY:
+       case types.TARRAY:
                // ../../../../runtime/type.go:/arrayType
-               s1 := dtypesym(t.Elem())
+               s1 := writeType(t.Elem())
                t2 := types.NewSlice(t.Elem())
-               s2 := dtypesym(t2)
+               s2 := writeType(t2)
                ot = dcommontype(lsym, t)
-               ot = dsymptr(lsym, ot, s1, 0)
-               ot = dsymptr(lsym, ot, s2, 0)
-               ot = duintptr(lsym, ot, uint64(t.NumElem()))
+               ot = objw.SymPtr(lsym, ot, s1, 0)
+               ot = objw.SymPtr(lsym, ot, s2, 0)
+               ot = objw.Uintptr(lsym, ot, uint64(t.NumElem()))
                ot = dextratype(lsym, ot, t, 0)
  
-       case TSLICE:
+       case types.TSLICE:
                // ../../../../runtime/type.go:/sliceType
-               s1 := dtypesym(t.Elem())
+               s1 := writeType(t.Elem())
                ot = dcommontype(lsym, t)
-               ot = dsymptr(lsym, ot, s1, 0)
+               ot = objw.SymPtr(lsym, ot, s1, 0)
                ot = dextratype(lsym, ot, t, 0)
  
-       case TCHAN:
+       case types.TCHAN:
                // ../../../../runtime/type.go:/chanType
-               s1 := dtypesym(t.Elem())
+               s1 := writeType(t.Elem())
                ot = dcommontype(lsym, t)
-               ot = dsymptr(lsym, ot, s1, 0)
-               ot = duintptr(lsym, ot, uint64(t.ChanDir()))
+               ot = objw.SymPtr(lsym, ot, s1, 0)
+               ot = objw.Uintptr(lsym, ot, uint64(t.ChanDir()))
                ot = dextratype(lsym, ot, t, 0)
  
-       case TFUNC:
+       case types.TFUNC:
                for _, t1 := range t.Recvs().Fields().Slice() {
-                       dtypesym(t1.Type)
+                       writeType(t1.Type)
                }
                isddd := false
                for _, t1 := range t.Params().Fields().Slice() {
                        isddd = t1.IsDDD()
-                       dtypesym(t1.Type)
+                       writeType(t1.Type)
                }
                for _, t1 := range t.Results().Fields().Slice() {
-                       dtypesym(t1.Type)
+                       writeType(t1.Type)
                }
  
                ot = dcommontype(lsym, t)
                if isddd {
                        outCount |= 1 << 15
                }
-               ot = duint16(lsym, ot, uint16(inCount))
-               ot = duint16(lsym, ot, uint16(outCount))
-               if Widthptr == 8 {
+               ot = objw.Uint16(lsym, ot, uint16(inCount))
+               ot = objw.Uint16(lsym, ot, uint16(outCount))
+               if types.PtrSize == 8 {
                        ot += 4 // align for *rtype
                }
  
-               dataAdd := (inCount + t.NumResults()) * Widthptr
+               dataAdd := (inCount + t.NumResults()) * types.PtrSize
                ot = dextratype(lsym, ot, t, dataAdd)
  
                // Array of rtype pointers follows funcType.
                for _, t1 := range t.Recvs().Fields().Slice() {
-                       ot = dsymptr(lsym, ot, dtypesym(t1.Type), 0)
+                       ot = objw.SymPtr(lsym, ot, writeType(t1.Type), 0)
                }
                for _, t1 := range t.Params().Fields().Slice() {
-                       ot = dsymptr(lsym, ot, dtypesym(t1.Type), 0)
+                       ot = objw.SymPtr(lsym, ot, writeType(t1.Type), 0)
                }
                for _, t1 := range t.Results().Fields().Slice() {
-                       ot = dsymptr(lsym, ot, dtypesym(t1.Type), 0)
+                       ot = objw.SymPtr(lsym, ot, writeType(t1.Type), 0)
                }
  
-       case TINTER:
+       case types.TINTER:
                m := imethods(t)
                n := len(m)
                for _, a := range m {
-                       dtypesym(a.type_)
+                       writeType(a.type_)
                }
  
                // ../../../../runtime/type.go:/interfaceType
                ot = dcommontype(lsym, t)
  
                var tpkg *types.Pkg
-               if t.Sym != nil && t != types.Types[t.Etype] && t != types.Errortype {
-                       tpkg = t.Sym.Pkg
+               if t.Sym() != nil && t != types.Types[t.Kind()] && t != types.ErrorType {
+                       tpkg = t.Sym().Pkg
                }
                ot = dgopkgpath(lsym, ot, tpkg)
  
-               ot = dsymptr(lsym, ot, lsym, ot+3*Widthptr+uncommonSize(t))
-               ot = duintptr(lsym, ot, uint64(n))
-               ot = duintptr(lsym, ot, uint64(n))
+               ot = objw.SymPtr(lsym, ot, lsym, ot+3*types.PtrSize+uncommonSize(t))
+               ot = objw.Uintptr(lsym, ot, uint64(n))
+               ot = objw.Uintptr(lsym, ot, uint64(n))
                dataAdd := imethodSize() * n
                ot = dextratype(lsym, ot, t, dataAdd)
  
                        }
                        nsym := dname(a.name.Name, "", pkg, exported)
  
-                       ot = dsymptrOff(lsym, ot, nsym)
-                       ot = dsymptrOff(lsym, ot, dtypesym(a.type_))
+                       ot = objw.SymPtrOff(lsym, ot, nsym)
+                       ot = objw.SymPtrOff(lsym, ot, writeType(a.type_))
                }
  
        // ../../../../runtime/type.go:/mapType
-       case TMAP:
-               s1 := dtypesym(t.Key())
-               s2 := dtypesym(t.Elem())
-               s3 := dtypesym(bmap(t))
+       case types.TMAP:
+               s1 := writeType(t.Key())
+               s2 := writeType(t.Elem())
+               s3 := writeType(MapBucketType(t))
                hasher := genhash(t.Key())
  
                ot = dcommontype(lsym, t)
-               ot = dsymptr(lsym, ot, s1, 0)
-               ot = dsymptr(lsym, ot, s2, 0)
-               ot = dsymptr(lsym, ot, s3, 0)
-               ot = dsymptr(lsym, ot, hasher, 0)
+               ot = objw.SymPtr(lsym, ot, s1, 0)
+               ot = objw.SymPtr(lsym, ot, s2, 0)
+               ot = objw.SymPtr(lsym, ot, s3, 0)
+               ot = objw.SymPtr(lsym, ot, hasher, 0)
                var flags uint32
                // Note: flags must match maptype accessors in ../../../../runtime/type.go
                // and maptype builder in ../../../../reflect/type.go:MapOf.
                if t.Key().Width > MAXKEYSIZE {
-                       ot = duint8(lsym, ot, uint8(Widthptr))
+                       ot = objw.Uint8(lsym, ot, uint8(types.PtrSize))
                        flags |= 1 // indirect key
                } else {
-                       ot = duint8(lsym, ot, uint8(t.Key().Width))
+                       ot = objw.Uint8(lsym, ot, uint8(t.Key().Width))
                }
  
                if t.Elem().Width > MAXELEMSIZE {
-                       ot = duint8(lsym, ot, uint8(Widthptr))
+                       ot = objw.Uint8(lsym, ot, uint8(types.PtrSize))
                        flags |= 2 // indirect value
                } else {
-                       ot = duint8(lsym, ot, uint8(t.Elem().Width))
+                       ot = objw.Uint8(lsym, ot, uint8(t.Elem().Width))
                }
-               ot = duint16(lsym, ot, uint16(bmap(t).Width))
-               if isreflexive(t.Key()) {
+               ot = objw.Uint16(lsym, ot, uint16(MapBucketType(t).Width))
+               if types.IsReflexive(t.Key()) {
                        flags |= 4 // reflexive key
                }
                if needkeyupdate(t.Key()) {
                if hashMightPanic(t.Key()) {
                        flags |= 16 // hash might panic
                }
-               ot = duint32(lsym, ot, flags)
+               ot = objw.Uint32(lsym, ot, flags)
                ot = dextratype(lsym, ot, t, 0)
  
-       case TPTR:
-               if t.Elem().Etype == TANY {
+       case types.TPTR:
+               if t.Elem().Kind() == types.TANY {
                        // ../../../../runtime/type.go:/UnsafePointerType
                        ot = dcommontype(lsym, t)
                        ot = dextratype(lsym, ot, t, 0)
                }
  
                // ../../../../runtime/type.go:/ptrType
-               s1 := dtypesym(t.Elem())
+               s1 := writeType(t.Elem())
  
                ot = dcommontype(lsym, t)
-               ot = dsymptr(lsym, ot, s1, 0)
+               ot = objw.SymPtr(lsym, ot, s1, 0)
                ot = dextratype(lsym, ot, t, 0)
  
        // ../../../../runtime/type.go:/structType
        // for security, only the exported fields.
-       case TSTRUCT:
+       case types.TSTRUCT:
                fields := t.Fields().Slice()
-                       if t.Sym.Pkg == localpkg {
-                               path = myimportpath
 +
 +              // omitFieldForAwfulBoringCryptoKludge reports whether
 +              // the field t should be omitted from the reflect data.
 +              // In the crypto/... packages we omit an unexported field
 +              // named "boring", to keep from breaking client code that
 +              // expects rsa.PublicKey etc to have only public fields.
 +              // As the name suggests, this is an awful kludge, but it is
 +              // limited to the dev.boringcrypto branch and avoids
 +              // much more invasive effects elsewhere.
 +              omitFieldForAwfulBoringCryptoKludge := func(t *types.Field) bool {
 +                      if t.Sym == nil || t.Sym.Name != "boring" || t.Sym.Pkg == nil {
 +                              return false
 +                      }
 +                      path := t.Sym.Pkg.Path
++                      if t.Sym.Pkg == types.LocalPkg {
++                              path = base.Ctxt.Pkgpath
 +                      }
 +                      return strings.HasPrefix(path, "crypto/")
 +              }
 +              newFields := fields[:0:0]
 +              for _, t1 := range fields {
 +                      if !omitFieldForAwfulBoringCryptoKludge(t1) {
 +                              newFields = append(newFields, t1)
 +                      }
 +              }
 +              fields = newFields
 +
                for _, t1 := range fields {
-                       dtypesym(t1.Type)
+                       writeType(t1.Type)
                }
  
                // All non-exported struct field names within a struct
  
                ot = dcommontype(lsym, t)
                ot = dgopkgpath(lsym, ot, spkg)
-               ot = dsymptr(lsym, ot, lsym, ot+3*Widthptr+uncommonSize(t))
-               ot = duintptr(lsym, ot, uint64(len(fields)))
-               ot = duintptr(lsym, ot, uint64(len(fields)))
+               ot = objw.SymPtr(lsym, ot, lsym, ot+3*types.PtrSize+uncommonSize(t))
+               ot = objw.Uintptr(lsym, ot, uint64(len(fields)))
+               ot = objw.Uintptr(lsym, ot, uint64(len(fields)))
  
                dataAdd := len(fields) * structfieldSize()
                ot = dextratype(lsym, ot, t, dataAdd)
                for _, f := range fields {
                        // ../../../../runtime/type.go:/structField
                        ot = dnameField(lsym, ot, spkg, f)
-                       ot = dsymptr(lsym, ot, dtypesym(f.Type), 0)
+                       ot = objw.SymPtr(lsym, ot, writeType(f.Type), 0)
                        offsetAnon := uint64(f.Offset) << 1
                        if offsetAnon>>1 != uint64(f.Offset) {
-                               Fatalf("%v: bad field offset for %s", t, f.Sym.Name)
+                               base.Fatalf("%v: bad field offset for %s", t, f.Sym.Name)
                        }
                        if f.Embedded != 0 {
                                offsetAnon |= 1
                        }
-                       ot = duintptr(lsym, ot, offsetAnon)
+                       ot = objw.Uintptr(lsym, ot, offsetAnon)
                }
        }
  
        ot = dextratypeData(lsym, ot, t)
-       ggloblsym(lsym, int32(ot), int16(dupok|obj.RODATA))
+       objw.Global(lsym, int32(ot), int16(dupok|obj.RODATA))
  
        // The linker will leave a table of all the typelinks for
        // types in the binary, so the runtime can find them.
        //
        // When buildmode=shared, all types are in typelinks so the
        // runtime can deduplicate type pointers.
-       keep := Ctxt.Flag_dynlink
-       if !keep && t.Sym == nil {
+       keep := base.Ctxt.Flag_dynlink
+       if !keep && t.Sym() == nil {
                // For an unnamed type, we only need the link if the type can
                // be created at run time by reflect.PtrTo and similar
                // functions. If the type exists in the program, those
                // functions must return the existing type structure rather
                // than creating a new one.
-               switch t.Etype {
-               case TPTR, TARRAY, TCHAN, TFUNC, TMAP, TSLICE, TSTRUCT:
+               switch t.Kind() {
+               case types.TPTR, types.TARRAY, types.TCHAN, types.TFUNC, types.TMAP, types.TSLICE, types.TSTRUCT:
                        keep = true
                }
        }
        // Do not put Noalg types in typelinks.  See issue #22605.
-       if typeHasNoAlg(t) {
+       if types.TypeHasNoAlg(t) {
                keep = false
        }
        lsym.Set(obj.AttrMakeTypelink, keep)
        return lsym
  }
  
- // ifaceMethodOffset returns the offset of the i-th method in the interface
+ // InterfaceMethodOffset returns the offset of the i-th method in the interface
  // type descriptor, ityp.
- func ifaceMethodOffset(ityp *types.Type, i int64) int64 {
+ func InterfaceMethodOffset(ityp *types.Type, i int64) int64 {
        // interface type descriptor layout is struct {
        //   _type        // commonSize
        //   pkgpath      // 1 word
        //   [...]imethod
        // }
        // The size of imethod is 8.
-       return int64(commonSize()+4*Widthptr+uncommonSize(ityp)) + i*8
+       return int64(commonSize()+4*types.PtrSize+uncommonSize(ityp)) + i*8
  }
  
  // for each itabEntry, gather the methods on
  // the concrete type that implement the interface
- func peekitabs() {
+ func CompileITabs() {
        for i := range itabs {
                tab := &itabs[i]
                methods := genfun(tab.t, tab.itype)
@@@ -1499,7 -1242,7 +1269,7 @@@ func genfun(t, it *types.Type) []*obj.L
        // so we can find the intersect in a single pass
        for _, m := range methods {
                if m.name == sigs[0].name {
-                       out = append(out, m.isym.Linksym())
+                       out = append(out, m.isym)
                        sigs = sigs[1:]
                        if len(sigs) == 0 {
                                break
        }
  
        if len(sigs) != 0 {
-               Fatalf("incomplete itab")
+               base.Fatalf("incomplete itab")
        }
  
        return out
  }
  
- // itabsym uses the information gathered in
- // peekitabs to de-virtualize interface methods.
+ // ITabSym uses the information gathered in
+ // CompileITabs to de-virtualize interface methods.
  // Since this is called by the SSA backend, it shouldn't
  // generate additional Nodes, Syms, etc.
- func itabsym(it *obj.LSym, offset int64) *obj.LSym {
+ func ITabSym(it *obj.LSym, offset int64) *obj.LSym {
        var syms []*obj.LSym
        if it == nil {
                return nil
        }
  
        // keep this arithmetic in sync with *itab layout
-       methodnum := int((offset - 2*int64(Widthptr) - 8) / int64(Widthptr))
+       methodnum := int((offset - 2*int64(types.PtrSize) - 8) / int64(types.PtrSize))
        if methodnum >= len(syms) {
                return nil
        }
        return syms[methodnum]
  }
  
- // addsignat ensures that a runtime type descriptor is emitted for t.
- func addsignat(t *types.Type) {
+ // NeedRuntimeType ensures that a runtime type descriptor is emitted for t.
+ func NeedRuntimeType(t *types.Type) {
        if _, ok := signatset[t]; !ok {
                signatset[t] = struct{}{}
                signatslice = append(signatslice, t)
        }
  }
  
- func addsignats(dcls []*Node) {
-       // copy types from dcl list to signatset
-       for _, n := range dcls {
-               if n.Op == OTYPE {
-                       addsignat(n.Type)
-               }
-       }
- }
- func dumpsignats() {
-       // Process signatset. Use a loop, as dtypesym adds
+ func WriteRuntimeTypes() {
+       // Process signatset. Use a loop, as writeType adds
        // entries to signatset while it is being processed.
        signats := make([]typeAndStr, len(signatslice))
        for len(signatslice) > 0 {
                signats = signats[:0]
                // Transfer entries to a slice and sort, for reproducible builds.
                for _, t := range signatslice {
-                       signats = append(signats, typeAndStr{t: t, short: typesymname(t), regular: t.String()})
+                       signats = append(signats, typeAndStr{t: t, short: types.TypeSymName(t), regular: t.String()})
                        delete(signatset, t)
                }
                signatslice = signatslice[:0]
                sort.Sort(typesByString(signats))
                for _, ts := range signats {
                        t := ts.t
-                       dtypesym(t)
-                       if t.Sym != nil {
-                               dtypesym(types.NewPtr(t))
+                       writeType(t)
+                       if t.Sym() != nil {
+                               writeType(types.NewPtr(t))
                        }
                }
        }
  }
  
- func dumptabs() {
+ func WriteTabs() {
        // process itabs
        for _, i := range itabs {
                // dump empty itab symbol into i.sym
                //   _      [4]byte
                //   fun    [1]uintptr // variable sized
                // }
-               o := dsymptr(i.lsym, 0, dtypesym(i.itype), 0)
-               o = dsymptr(i.lsym, o, dtypesym(i.t), 0)
-               o = duint32(i.lsym, o, typehash(i.t)) // copy of type hash
-               o += 4                                // skip unused field
+               o := objw.SymPtr(i.lsym, 0, writeType(i.itype), 0)
+               o = objw.SymPtr(i.lsym, o, writeType(i.t), 0)
+               o = objw.Uint32(i.lsym, o, types.TypeHash(i.t)) // copy of type hash
+               o += 4                                          // skip unused field
                for _, fn := range genfun(i.t, i.itype) {
-                       o = dsymptr(i.lsym, o, fn, 0) // method pointer for each method
+                       o = objw.SymPtr(i.lsym, o, fn, 0) // method pointer for each method
                }
                // Nothing writes static itabs, so they are read only.
-               ggloblsym(i.lsym, int32(o), int16(obj.DUPOK|obj.RODATA))
+               objw.Global(i.lsym, int32(o), int16(obj.DUPOK|obj.RODATA))
                i.lsym.Set(obj.AttrContentAddressable, true)
        }
  
        // process ptabs
-       if localpkg.Name == "main" && len(ptabs) > 0 {
+       if types.LocalPkg.Name == "main" && len(ptabs) > 0 {
                ot := 0
-               s := Ctxt.Lookup("go.plugin.tabs")
+               s := base.Ctxt.Lookup("go.plugin.tabs")
                for _, p := range ptabs {
                        // Dump ptab symbol into go.pluginsym package.
                        //
                        //      name nameOff
                        //      typ  typeOff // pointer to symbol
                        // }
-                       nsym := dname(p.s.Name, "", nil, true)
-                       ot = dsymptrOff(s, ot, nsym)
-                       ot = dsymptrOff(s, ot, dtypesym(p.t))
+                       nsym := dname(p.Sym().Name, "", nil, true)
+                       t := p.Type()
+                       if p.Class != ir.PFUNC {
+                               t = types.NewPtr(t)
+                       }
+                       tsym := writeType(t)
+                       ot = objw.SymPtrOff(s, ot, nsym)
+                       ot = objw.SymPtrOff(s, ot, tsym)
+                       // Plugin exports symbols as interfaces. Mark their types
+                       // as UsedInIface.
+                       tsym.Set(obj.AttrUsedInIface, true)
                }
-               ggloblsym(s, int32(ot), int16(obj.RODATA))
+               objw.Global(s, int32(ot), int16(obj.RODATA))
  
                ot = 0
-               s = Ctxt.Lookup("go.plugin.exports")
+               s = base.Ctxt.Lookup("go.plugin.exports")
                for _, p := range ptabs {
-                       ot = dsymptr(s, ot, p.s.Linksym(), 0)
+                       ot = objw.SymPtr(s, ot, p.Linksym(), 0)
                }
-               ggloblsym(s, int32(ot), int16(obj.RODATA))
+               objw.Global(s, int32(ot), int16(obj.RODATA))
        }
  }
  
- func dumpimportstrings() {
+ func WriteImportStrings() {
        // generate import strings for imported packages
        for _, p := range types.ImportedPkgList() {
                dimportpath(p)
        }
  }
  
- func dumpbasictypes() {
+ func WriteBasicTypes() {
        // do basic types if compiling package runtime.
        // they have to be in at least one package,
        // and runtime is always loaded implicitly,
        // so this is as good as any.
        // another possible choice would be package main,
        // but using runtime means fewer copies in object files.
-       if myimportpath == "runtime" {
-               for i := types.EType(1); i <= TBOOL; i++ {
-                       dtypesym(types.NewPtr(types.Types[i]))
+       if base.Ctxt.Pkgpath == "runtime" {
+               for i := types.Kind(1); i <= types.TBOOL; i++ {
+                       writeType(types.NewPtr(types.Types[i]))
                }
-               dtypesym(types.NewPtr(types.Types[TSTRING]))
-               dtypesym(types.NewPtr(types.Types[TUNSAFEPTR]))
+               writeType(types.NewPtr(types.Types[types.TSTRING]))
+               writeType(types.NewPtr(types.Types[types.TUNSAFEPTR]))
  
                // emit type structs for error and func(error) string.
                // The latter is the type of an auto-generated wrapper.
-               dtypesym(types.NewPtr(types.Errortype))
+               writeType(types.NewPtr(types.ErrorType))
  
-               dtypesym(functype(nil, []*Node{anonfield(types.Errortype)}, []*Node{anonfield(types.Types[TSTRING])}))
+               writeType(types.NewSignature(types.NoPkg, nil, []*types.Field{
+                       types.NewField(base.Pos, nil, types.ErrorType),
+               }, []*types.Field{
+                       types.NewField(base.Pos, nil, types.Types[types.TSTRING]),
+               }))
  
                // add paths for runtime and main, which 6l imports implicitly.
-               dimportpath(Runtimepkg)
+               dimportpath(ir.Pkgs.Runtime)
  
-               if flag_race {
-                       dimportpath(racepkg)
+               if base.Flag.Race {
+                       dimportpath(types.NewPkg("runtime/race", ""))
                }
-               if flag_msan {
-                       dimportpath(msanpkg)
+               if base.Flag.MSan {
+                       dimportpath(types.NewPkg("runtime/msan", ""))
                }
                dimportpath(types.NewPkg("main", ""))
        }
  }
@@@ -1696,7 -1443,7 +1470,7 @@@ func (a typesByString) Less(i, j int) b
        // will be equal for the above checks, but different in DWARF output.
        // Sort by source position to ensure deterministic order.
        // See issues 27013 and 30202.
-       if a[i].t.Etype == types.TINTER && a[i].t.Methods().Len() > 0 {
+       if a[i].t.Kind() == types.TINTER && a[i].t.Methods().Len() > 0 {
                return a[i].t.Methods().Index(0).Pos.Before(a[j].t.Methods().Index(0).Pos)
        }
        return false
@@@ -1741,8 -1488,8 +1515,8 @@@ const maxPtrmaskBytes = 204
  // along with a boolean reporting whether the UseGCProg bit should be set in
  // the type kind, and the ptrdata field to record in the reflect type information.
  func dgcsym(t *types.Type) (lsym *obj.LSym, useGCProg bool, ptrdata int64) {
-       ptrdata = typeptrdata(t)
-       if ptrdata/int64(Widthptr) <= maxPtrmaskBytes*8 {
+       ptrdata = types.PtrDataSize(t)
+       if ptrdata/int64(types.PtrSize) <= maxPtrmaskBytes*8 {
                lsym = dgcptrmask(t)
                return
        }
  
  // dgcptrmask emits and returns the symbol containing a pointer mask for type t.
  func dgcptrmask(t *types.Type) *obj.LSym {
-       ptrmask := make([]byte, (typeptrdata(t)/int64(Widthptr)+7)/8)
+       ptrmask := make([]byte, (types.PtrDataSize(t)/int64(types.PtrSize)+7)/8)
        fillptrmask(t, ptrmask)
        p := fmt.Sprintf("gcbits.%x", ptrmask)
  
-       sym := Runtimepkg.Lookup(p)
+       sym := ir.Pkgs.Runtime.Lookup(p)
        lsym := sym.Linksym()
        if !sym.Uniq() {
                sym.SetUniq(true)
                for i, x := range ptrmask {
-                       duint8(lsym, i, x)
+                       objw.Uint8(lsym, i, x)
                }
-               ggloblsym(lsym, int32(len(ptrmask)), obj.DUPOK|obj.RODATA|obj.LOCAL)
+               objw.Global(lsym, int32(len(ptrmask)), obj.DUPOK|obj.RODATA|obj.LOCAL)
                lsym.Set(obj.AttrContentAddressable, true)
        }
        return lsym
@@@ -1782,10 -1529,10 +1556,10 @@@ func fillptrmask(t *types.Type, ptrmas
                return
        }
  
-       vec := bvalloc(8 * int32(len(ptrmask)))
-       onebitwalktype1(t, 0, vec)
+       vec := bitvec.New(8 * int32(len(ptrmask)))
+       typebits.Set(t, 0, vec)
  
-       nptr := typeptrdata(t) / int64(Widthptr)
+       nptr := types.PtrDataSize(t) / int64(types.PtrSize)
        for i := int64(0); i < nptr; i++ {
                if vec.Get(int32(i)) {
                        ptrmask[i/8] |= 1 << (uint(i) % 8)
  // In practice, the size is typeptrdata(t) except for non-trivial arrays.
  // For non-trivial arrays, the program describes the full t.Width size.
  func dgcprog(t *types.Type) (*obj.LSym, int64) {
-       dowidth(t)
-       if t.Width == BADWIDTH {
-               Fatalf("dgcprog: %v badwidth", t)
+       types.CalcSize(t)
+       if t.Width == types.BADWIDTH {
+               base.Fatalf("dgcprog: %v badwidth", t)
        }
-       lsym := typesymprefix(".gcprog", t).Linksym()
-       var p GCProg
+       lsym := TypeLinksymPrefix(".gcprog", t)
+       var p gcProg
        p.init(lsym)
        p.emit(t, 0)
-       offset := p.w.BitIndex() * int64(Widthptr)
+       offset := p.w.BitIndex() * int64(types.PtrSize)
        p.end()
-       if ptrdata := typeptrdata(t); offset < ptrdata || offset > t.Width {
-               Fatalf("dgcprog: %v: offset=%d but ptrdata=%d size=%d", t, offset, ptrdata, t.Width)
+       if ptrdata := types.PtrDataSize(t); offset < ptrdata || offset > t.Width {
+               base.Fatalf("dgcprog: %v: offset=%d but ptrdata=%d size=%d", t, offset, ptrdata, t.Width)
        }
        return lsym, offset
  }
  
- type GCProg struct {
+ type gcProg struct {
        lsym   *obj.LSym
        symoff int
        w      gcprog.Writer
  }
  
- var Debug_gcprog int // set by -d gcprog
- func (p *GCProg) init(lsym *obj.LSym) {
+ func (p *gcProg) init(lsym *obj.LSym) {
        p.lsym = lsym
        p.symoff = 4 // first 4 bytes hold program length
        p.w.Init(p.writeByte)
-       if Debug_gcprog > 0 {
+       if base.Debug.GCProg > 0 {
                fmt.Fprintf(os.Stderr, "compile: start GCProg for %v\n", lsym)
                p.w.Debug(os.Stderr)
        }
  }
  
- func (p *GCProg) writeByte(x byte) {
-       p.symoff = duint8(p.lsym, p.symoff, x)
+ func (p *gcProg) writeByte(x byte) {
+       p.symoff = objw.Uint8(p.lsym, p.symoff, x)
  }
  
- func (p *GCProg) end() {
+ func (p *gcProg) end() {
        p.w.End()
-       duint32(p.lsym, 0, uint32(p.symoff-4))
-       ggloblsym(p.lsym, int32(p.symoff), obj.DUPOK|obj.RODATA|obj.LOCAL)
-       if Debug_gcprog > 0 {
+       objw.Uint32(p.lsym, 0, uint32(p.symoff-4))
+       objw.Global(p.lsym, int32(p.symoff), obj.DUPOK|obj.RODATA|obj.LOCAL)
+       if base.Debug.GCProg > 0 {
                fmt.Fprintf(os.Stderr, "compile: end GCProg for %v\n", p.lsym)
        }
  }
  
- func (p *GCProg) emit(t *types.Type, offset int64) {
-       dowidth(t)
+ func (p *gcProg) emit(t *types.Type, offset int64) {
+       types.CalcSize(t)
        if !t.HasPointers() {
                return
        }
-       if t.Width == int64(Widthptr) {
-               p.w.Ptr(offset / int64(Widthptr))
+       if t.Width == int64(types.PtrSize) {
+               p.w.Ptr(offset / int64(types.PtrSize))
                return
        }
-       switch t.Etype {
+       switch t.Kind() {
        default:
-               Fatalf("GCProg.emit: unexpected type %v", t)
+               base.Fatalf("gcProg.emit: unexpected type %v", t)
  
-       case TSTRING:
-               p.w.Ptr(offset / int64(Widthptr))
+       case types.TSTRING:
+               p.w.Ptr(offset / int64(types.PtrSize))
  
-       case TINTER:
-               // Note: the first word isn't a pointer. See comment in plive.go:onebitwalktype1.
-               p.w.Ptr(offset/int64(Widthptr) + 1)
+       case types.TINTER:
+               // Note: the first word isn't a pointer. See comment in typebits.Set
+               p.w.Ptr(offset/int64(types.PtrSize) + 1)
  
-       case TSLICE:
-               p.w.Ptr(offset / int64(Widthptr))
+       case types.TSLICE:
+               p.w.Ptr(offset / int64(types.PtrSize))
  
-       case TARRAY:
+       case types.TARRAY:
                if t.NumElem() == 0 {
                        // should have been handled by haspointers check above
-                       Fatalf("GCProg.emit: empty array")
+                       base.Fatalf("gcProg.emit: empty array")
                }
  
                // Flatten array-of-array-of-array to just a big array by multiplying counts.
                        elem = elem.Elem()
                }
  
-               if !p.w.ShouldRepeat(elem.Width/int64(Widthptr), count) {
+               if !p.w.ShouldRepeat(elem.Width/int64(types.PtrSize), count) {
                        // Cheaper to just emit the bits.
                        for i := int64(0); i < count; i++ {
                                p.emit(elem, offset+i*elem.Width)
                        return
                }
                p.emit(elem, offset)
-               p.w.ZeroUntil((offset + elem.Width) / int64(Widthptr))
-               p.w.Repeat(elem.Width/int64(Widthptr), count-1)
+               p.w.ZeroUntil((offset + elem.Width) / int64(types.PtrSize))
+               p.w.Repeat(elem.Width/int64(types.PtrSize), count-1)
  
-       case TSTRUCT:
+       case types.TSTRUCT:
                for _, t1 := range t.Fields().Slice() {
                        p.emit(t1.Type, offset+t1.Offset)
                }
        }
  }
  
- // zeroaddr returns the address of a symbol with at least
+ // ZeroAddr returns the address of a symbol with at least
  // size bytes of zeros.
- func zeroaddr(size int64) *Node {
+ func ZeroAddr(size int64) ir.Node {
        if size >= 1<<31 {
-               Fatalf("map elem too big %d", size)
-       }
-       if zerosize < size {
-               zerosize = size
-       }
-       s := mappkg.Lookup("zero")
-       if s.Def == nil {
-               x := newname(s)
-               x.Type = types.Types[TUINT8]
-               x.SetClass(PEXTERN)
-               x.SetTypecheck(1)
-               s.Def = asTypesNode(x)
-       }
-       z := nod(OADDR, asNode(s.Def), nil)
-       z.Type = types.NewPtr(types.Types[TUINT8])
-       z.SetTypecheck(1)
-       return z
+               base.Fatalf("map elem too big %d", size)
+       }
+       if ZeroSize < size {
+               ZeroSize = size
+       }
+       lsym := base.PkgLinksym("go.map", "zero", obj.ABI0)
+       x := ir.NewLinksymExpr(base.Pos, lsym, types.Types[types.TUINT8])
+       return typecheck.Expr(typecheck.NodAddr(x))
+ }
+ func CollectPTabs() {
+       if !base.Ctxt.Flag_dynlink || types.LocalPkg.Name != "main" {
+               return
+       }
+       for _, exportn := range typecheck.Target.Exports {
+               s := exportn.Sym()
+               nn := ir.AsNode(s.Def)
+               if nn == nil {
+                       continue
+               }
+               if nn.Op() != ir.ONAME {
+                       continue
+               }
+               n := nn.(*ir.Name)
+               if !types.IsExported(s.Name) {
+                       continue
+               }
+               if s.Pkg.Name != "main" {
+                       continue
+               }
+               ptabs = append(ptabs, n)
+       }
+ }
+ // Generate a wrapper function to convert from
+ // a receiver of type T to a receiver of type U.
+ // That is,
+ //
+ //    func (t T) M() {
+ //            ...
+ //    }
+ //
+ // already exists; this function generates
+ //
+ //    func (u U) M() {
+ //            u.M()
+ //    }
+ //
+ // where the types T and U are such that u.M() is valid
+ // and calls the T.M method.
+ // The resulting function is for use in method tables.
+ //
+ //    rcvr - U
+ //    method - M func (t T)(), a TFIELD type struct
+ func methodWrapper(rcvr *types.Type, method *types.Field) *obj.LSym {
+       newnam := ir.MethodSym(rcvr, method.Sym)
+       lsym := newnam.Linksym()
+       if newnam.Siggen() {
+               return lsym
+       }
+       newnam.SetSiggen(true)
+       if types.Identical(rcvr, method.Type.Recv().Type) {
+               return lsym
+       }
+       // Only generate (*T).M wrappers for T.M in T's own package.
+       if rcvr.IsPtr() && rcvr.Elem() == method.Type.Recv().Type &&
+               rcvr.Elem().Sym() != nil && rcvr.Elem().Sym().Pkg != types.LocalPkg {
+               return lsym
+       }
+       // Only generate I.M wrappers for I in I's own package
+       // but keep doing it for error.Error (was issue #29304).
+       if rcvr.IsInterface() && rcvr.Sym() != nil && rcvr.Sym().Pkg != types.LocalPkg && rcvr != types.ErrorType {
+               return lsym
+       }
+       base.Pos = base.AutogeneratedPos
+       typecheck.DeclContext = ir.PEXTERN
+       tfn := ir.NewFuncType(base.Pos,
+               ir.NewField(base.Pos, typecheck.Lookup(".this"), nil, rcvr),
+               typecheck.NewFuncParams(method.Type.Params(), true),
+               typecheck.NewFuncParams(method.Type.Results(), false))
+       fn := typecheck.DeclFunc(newnam, tfn)
+       fn.SetDupok(true)
+       nthis := ir.AsNode(tfn.Type().Recv().Nname)
+       methodrcvr := method.Type.Recv().Type
+       // generate nil pointer check for better error
+       if rcvr.IsPtr() && rcvr.Elem() == methodrcvr {
+               // generating wrapper from *T to T.
+               n := ir.NewIfStmt(base.Pos, nil, nil, nil)
+               n.Cond = ir.NewBinaryExpr(base.Pos, ir.OEQ, nthis, typecheck.NodNil())
+               call := ir.NewCallExpr(base.Pos, ir.OCALL, typecheck.LookupRuntime("panicwrap"), nil)
+               n.Body = []ir.Node{call}
+               fn.Body.Append(n)
+       }
+       dot := typecheck.AddImplicitDots(ir.NewSelectorExpr(base.Pos, ir.OXDOT, nthis, method.Sym))
+       // generate call
+       // It's not possible to use a tail call when dynamic linking on ppc64le. The
+       // bad scenario is when a local call is made to the wrapper: the wrapper will
+       // call the implementation, which might be in a different module and so set
+       // the TOC to the appropriate value for that module. But if it returns
+       // directly to the wrapper's caller, nothing will reset it to the correct
+       // value for that function.
+       if !base.Flag.Cfg.Instrumenting && rcvr.IsPtr() && methodrcvr.IsPtr() && method.Embedded != 0 && !types.IsInterfaceMethod(method.Type) && !(base.Ctxt.Arch.Name == "ppc64le" && base.Ctxt.Flag_dynlink) {
+               // generate tail call: adjust pointer receiver and jump to embedded method.
+               left := dot.X // skip final .M
+               if !left.Type().IsPtr() {
+                       left = typecheck.NodAddr(left)
+               }
+               as := ir.NewAssignStmt(base.Pos, nthis, typecheck.ConvNop(left, rcvr))
+               fn.Body.Append(as)
+               fn.Body.Append(ir.NewTailCallStmt(base.Pos, method.Nname.(*ir.Name)))
+       } else {
+               fn.SetWrapper(true) // ignore frame for panic+recover matching
+               call := ir.NewCallExpr(base.Pos, ir.OCALL, dot, nil)
+               call.Args = ir.ParamNames(tfn.Type())
+               call.IsDDD = tfn.Type().IsVariadic()
+               if method.Type.NumResults() > 0 {
+                       ret := ir.NewReturnStmt(base.Pos, nil)
+                       ret.Results = []ir.Node{call}
+                       fn.Body.Append(ret)
+               } else {
+                       fn.Body.Append(call)
+               }
+       }
+       typecheck.FinishFuncBody()
+       if base.Debug.DclStack != 0 {
+               types.CheckDclstack()
+       }
+       typecheck.Func(fn)
+       ir.CurFunc = fn
+       typecheck.Stmts(fn.Body)
+       // Inline calls within (*T).M wrappers. This is safe because we only
+       // generate those wrappers within the same compilation unit as (T).M.
+       // TODO(mdempsky): Investigate why we can't enable this more generally.
+       if rcvr.IsPtr() && rcvr.Elem() == method.Type.Recv().Type && rcvr.Elem().Sym() != nil {
+               inline.InlineCalls(fn)
+       }
+       escape.Batch([]*ir.Func{fn}, false)
+       ir.CurFunc = nil
+       typecheck.Target.Decls = append(typecheck.Target.Decls, fn)
+       return lsym
+ }
+ var ZeroSize int64
+ // MarkTypeUsedInInterface marks that type t is converted to an interface.
+ // This information is used in the linker in dead method elimination.
+ func MarkTypeUsedInInterface(t *types.Type, from *obj.LSym) {
+       tsym := TypeLinksym(t)
+       // Emit a marker relocation. The linker will know the type is converted
+       // to an interface if "from" is reachable.
+       r := obj.Addrel(from)
+       r.Sym = tsym
+       r.Type = objabi.R_USEIFACE
+ }
+ // MarkUsedIfaceMethod marks that an interface method is used in the current
+ // function. n is OCALLINTER node.
+ func MarkUsedIfaceMethod(n *ir.CallExpr) {
+       dot := n.X.(*ir.SelectorExpr)
+       ityp := dot.X.Type()
+       tsym := TypeLinksym(ityp)
+       r := obj.Addrel(ir.CurFunc.LSym)
+       r.Sym = tsym
+       // dot.Xoffset is the method index * Widthptr (the offset of code pointer
+       // in itab).
+       midx := dot.Offset() / int64(types.PtrSize)
+       r.Add = InterfaceMethodOffset(ityp, midx)
+       r.Type = objabi.R_USEIFACEMETHOD
  }
diff --combined src/cmd/go/go_test.go
index 38d1fe6d1dcc275f4405977139105e2a0c8d5973,d14b2328bfaa05ac950799eb39bec547e81e883a..e3fd1cd53fb9c0ff441a5d7d141a93b797f182e8
@@@ -17,7 -17,6 +17,6 @@@ import 
        "internal/testenv"
        "io"
        "io/fs"
-       "io/ioutil"
        "log"
        "os"
        "os/exec"
@@@ -32,6 -31,7 +31,7 @@@
        "cmd/go/internal/cache"
        "cmd/go/internal/cfg"
        "cmd/go/internal/robustio"
+       "cmd/go/internal/work"
        "cmd/internal/sys"
  )
  
@@@ -100,7 -100,7 +100,7 @@@ func TestMain(m *testing.M) 
  
        // Run with a temporary TMPDIR to check that the tests don't
        // leave anything behind.
-       topTmpdir, err := ioutil.TempDir("", "cmd-go-test-")
+       topTmpdir, err := os.MkdirTemp("", "cmd-go-test-")
        if err != nil {
                log.Fatal(err)
        }
        }
        os.Setenv(tempEnvName(), topTmpdir)
  
-       dir, err := ioutil.TempDir(topTmpdir, "tmpdir")
+       dir, err := os.MkdirTemp(topTmpdir, "tmpdir")
        if err != nil {
                log.Fatal(err)
        }
        }
        // Don't let these environment variables confuse the test.
        os.Setenv("GOENV", "off")
+       os.Unsetenv("GOFLAGS")
        os.Unsetenv("GOBIN")
        os.Unsetenv("GOPATH")
        os.Unsetenv("GIT_ALLOW_PROTOCOL")
@@@ -616,7 -617,7 +617,7 @@@ func (tg *testgoData) makeTempdir() 
        tg.t.Helper()
        if tg.tempdir == "" {
                var err error
-               tg.tempdir, err = ioutil.TempDir("", "gotest")
+               tg.tempdir, err = os.MkdirTemp("", "gotest")
                tg.must(err)
        }
  }
@@@ -633,7 -634,7 +634,7 @@@ func (tg *testgoData) tempFile(path, co
                        bytes = formatted
                }
        }
-       tg.must(ioutil.WriteFile(filepath.Join(tg.tempdir, path), bytes, 0644))
+       tg.must(os.WriteFile(filepath.Join(tg.tempdir, path), bytes, 0644))
  }
  
  // tempDir adds a temporary directory for a run of testgo.
@@@ -774,7 -775,7 +775,7 @@@ func (tg *testgoData) cleanup() 
  func removeAll(dir string) error {
        // module cache has 0444 directories;
        // make them writable in order to remove content.
-       filepath.Walk(dir, func(path string, info fs.FileInfo, err error) error {
+       filepath.WalkDir(dir, func(path string, info fs.DirEntry, err error) error {
                // chmod not only directories, but also things that we couldn't even stat
                // due to permission errors: they may also be unreadable directories.
                if err != nil || info.IsDir() {
@@@ -810,6 -811,7 +811,7 @@@ func TestNewReleaseRebuildsStalePackage
        // so that we can change files.
        for _, copydir := range []string{
                "src/runtime",
+               "src/internal/abi",
                "src/internal/bytealg",
                "src/internal/cpu",
                "src/math/bits",
        } {
                srcdir := filepath.Join(testGOROOT, copydir)
                tg.tempDir(filepath.Join("goroot", copydir))
-               err := filepath.Walk(srcdir,
-                       func(path string, info fs.FileInfo, err error) error {
+               err := filepath.WalkDir(srcdir,
+                       func(path string, info fs.DirEntry, err error) error {
                                if err != nil {
                                        return err
                                }
                                        return err
                                }
                                dest := filepath.Join("goroot", copydir, srcrel)
-                               data, err := ioutil.ReadFile(path)
+                               data, err := os.ReadFile(path)
                                if err != nil {
                                        return err
                                }
                                tg.tempFile(dest, string(data))
-                               if err := os.Chmod(tg.path(dest), info.Mode()|0200); err != nil {
-                                       return err
+                               if strings.Contains(copydir, filepath.Join("pkg", "tool")) {
+                                       os.Chmod(tg.path(dest), 0777)
                                }
                                return nil
                        })
        tg.setenv("GOROOT", tg.path("goroot"))
  
        addVar := func(name string, idx int) (restore func()) {
-               data, err := ioutil.ReadFile(name)
+               data, err := os.ReadFile(name)
                if err != nil {
                        t.Fatal(err)
                }
                old := data
                data = append(data, fmt.Sprintf("var DummyUnusedVar%d bool\n", idx)...)
-               if err := ioutil.WriteFile(name, append(data, '\n'), 0666); err != nil {
+               if err := os.WriteFile(name, append(data, '\n'), 0666); err != nil {
                        t.Fatal(err)
                }
                tg.sleep()
                return func() {
-                       if err := ioutil.WriteFile(name, old, 0666); err != nil {
+                       if err := os.WriteFile(name, old, 0666); err != nil {
                                t.Fatal(err)
                        }
                }
@@@ -1366,6 -1368,30 +1368,30 @@@ func TestLdflagsArgumentsWithSpacesIssu
        tg.grepStderr("^hello world", `ldflags -X "main.extern=hello world"' failed`)
  }
  
+ func TestLdFlagsLongArgumentsIssue42295(t *testing.T) {
+       // Test the extremely long command line arguments that contain '\n' characters
+       // get encoded and passed correctly.
+       skipIfGccgo(t, "gccgo does not support -ldflags -X")
+       tooSlow(t)
+       tg := testgo(t)
+       defer tg.cleanup()
+       tg.parallel()
+       tg.tempFile("main.go", `package main
+               var extern string
+               func main() {
+                       print(extern)
+               }`)
+       testStr := "test test test test test \n\\ "
+       var buf bytes.Buffer
+       for buf.Len() < work.ArgLengthForResponseFile+1 {
+               buf.WriteString(testStr)
+       }
+       tg.run("run", "-ldflags", fmt.Sprintf(`-X "main.extern=%s"`, buf.String()), tg.path("main.go"))
+       if tg.stderr.String() != buf.String() {
+               t.Errorf("strings differ")
+       }
+ }
  func TestGoTestDashCDashOControlsBinaryLocation(t *testing.T) {
        skipIfGccgo(t, "gccgo has no standard packages")
        tooSlow(t)
@@@ -1816,12 -1842,8 +1842,12 @@@ func TestBinaryOnlyPackages(t *testing.
        tg.grepStdout("p2: false", "p2 listed as BinaryOnly")
  }
  
 -// Issue 16050.
 -func TestAlwaysLinkSysoFiles(t *testing.T) {
 +// Issue 16050 and 21884.
 +func TestLinkSysoFiles(t *testing.T) {
 +      if runtime.GOOS != "linux" || runtime.GOARCH != "amd64" {
 +              t.Skip("not linux/amd64")
 +      }
 +
        tg := testgo(t)
        defer tg.cleanup()
        tg.parallel()
        tg.setenv("CGO_ENABLED", "0")
        tg.run("list", "-f", "{{.SysoFiles}}", "syso")
        tg.grepStdout("a.syso", "missing syso file with CGO_ENABLED=0")
 +
 +      tg.setenv("CGO_ENABLED", "1")
 +      tg.run("list", "-msan", "-f", "{{.SysoFiles}}", "syso")
 +      tg.grepStdoutNot("a.syso", "unexpected syso file with -msan")
  }
  
  // Issue 16120.
@@@ -1894,6 -1912,18 +1920,18 @@@ func TestGoEnv(t *testing.T) 
        tg.grepStdout("gcc", "CC not found")
        tg.run("env", "GOGCCFLAGS")
        tg.grepStdout("-ffaster", "CC arguments not found")
+       tg.run("env", "GOVERSION")
+       envVersion := strings.TrimSpace(tg.stdout.String())
+       tg.run("version")
+       cmdVersion := strings.TrimSpace(tg.stdout.String())
+       // If 'go version' is "go version <version> <goos>/<goarch>", then
+       // 'go env GOVERSION' is just "<version>".
+       if cmdVersion == envVersion || !strings.Contains(cmdVersion, envVersion) {
+               t.Fatalf("'go env GOVERSION' %q should be a shorter substring of 'go version' %q", envVersion, cmdVersion)
+       }
  }
  
  const (
@@@ -2627,12 -2657,12 +2665,12 @@@ func TestBadCommandLines(t *testing.T) 
        tg.tempFile("src/@x/x.go", "package x\n")
        tg.setenv("GOPATH", tg.path("."))
        tg.runFail("build", "@x")
-       tg.grepStderr("invalid input directory name \"@x\"|cannot use path@version syntax", "did not reject @x directory")
+       tg.grepStderr("invalid input directory name \"@x\"|can only use path@version syntax with 'go get' and 'go install' in module-aware mode", "did not reject @x directory")
  
        tg.tempFile("src/@x/y/y.go", "package y\n")
        tg.setenv("GOPATH", tg.path("."))
        tg.runFail("build", "@x/y")
-       tg.grepStderr("invalid import path \"@x/y\"|cannot use path@version syntax", "did not reject @x/y import path")
+       tg.grepStderr("invalid import path \"@x/y\"|can only use path@version syntax with 'go get' and 'go install' in module-aware mode", "did not reject @x/y import path")
  
        tg.tempFile("src/-x/x.go", "package x\n")
        tg.setenv("GOPATH", tg.path("."))
@@@ -2670,7 -2700,7 +2708,7 @@@ echo $* >>`+tg.path("pkg-config.out")
        tg.setenv("GOPATH", tg.path("."))
        tg.setenv("PKG_CONFIG", tg.path("pkg-config.sh"))
        tg.run("build", "x")
-       out, err := ioutil.ReadFile(tg.path("pkg-config.out"))
+       out, err := os.ReadFile(tg.path("pkg-config.out"))
        tg.must(err)
        out = bytes.TrimSpace(out)
        want := "--cflags --static --static -- a a\n--libs --static --static -- a a"
index 61b2167621bf24106dddbcfe4a58c613ec857cd1,8b12faf4cd2e51d8665a838c68275dce87cba018..3f7922ab9cb304727bbd825b20dc5fcc35e37d24
@@@ -15,7 -15,6 +15,6 @@@ import 
        "go/scanner"
        "go/token"
        "io/fs"
-       "io/ioutil"
        "os"
        "path"
        pathpkg "path"
@@@ -37,6 -36,8 +36,8 @@@
        "cmd/go/internal/str"
        "cmd/go/internal/trace"
        "cmd/internal/sys"
+       "golang.org/x/mod/module"
  )
  
  var IgnoreImports bool // control whether we ignore imports in packages
@@@ -97,7 -98,7 +98,7 @@@ type PackagePublic struct 
  
        // Embedded files
        EmbedPatterns []string `json:",omitempty"` // //go:embed patterns
-       EmbedFiles    []string `json:",omitempty"` // files and directories matched by EmbedPatterns
+       EmbedFiles    []string `json:",omitempty"` // files matched by EmbedPatterns
  
        // Cgo directives
        CgoCFLAGS    []string `json:",omitempty"` // cgo: flags for C compiler
        TestGoFiles        []string `json:",omitempty"` // _test.go files in package
        TestImports        []string `json:",omitempty"` // imports from TestGoFiles
        TestEmbedPatterns  []string `json:",omitempty"` // //go:embed patterns
-       TestEmbedFiles     []string `json:",omitempty"` // //files matched by EmbedPatterns
+       TestEmbedFiles     []string `json:",omitempty"` // files matched by TestEmbedPatterns
        XTestGoFiles       []string `json:",omitempty"` // _test.go files outside package
        XTestImports       []string `json:",omitempty"` // imports from XTestGoFiles
        XTestEmbedPatterns []string `json:",omitempty"` // //go:embed patterns
-       XTestEmbedFiles    []string `json:",omitempty"` // //files matched by EmbedPatterns
+       XTestEmbedFiles    []string `json:",omitempty"` // files matched by XTestEmbedPatterns
  }
  
  // AllFiles returns the names of all the files considered for the package.
@@@ -305,7 -306,7 +306,7 @@@ func (p *Package) setLoadPackageDataErr
        }
  
        if path != stk.Top() {
-               p = setErrorPos(p, importPos)
+               p.Error.setPos(importPos)
        }
  }
  
@@@ -377,12 -378,6 +378,12 @@@ func (p *Package) copyBuild(pp *build.P
        p.SwigFiles = pp.SwigFiles
        p.SwigCXXFiles = pp.SwigCXXFiles
        p.SysoFiles = pp.SysoFiles
 +      if cfg.BuildMSan {
 +              // There's no way for .syso files to be built both with and without
 +              // support for memory sanitizer. Assume they are built without,
 +              // and drop them.
 +              p.SysoFiles = nil
 +      }
        p.CgoCFLAGS = pp.CgoCFLAGS
        p.CgoCPPFLAGS = pp.CgoCPPFLAGS
        p.CgoCXXFLAGS = pp.CgoCXXFLAGS
@@@ -419,6 -414,9 +420,9 @@@ type PackageError struct 
  }
  
  func (p *PackageError) Error() string {
+       // TODO(#43696): decide when to print the stack or the position based on
+       // the error type and whether the package is in the main module.
+       // Document the rationale.
        if p.Pos != "" && (len(p.ImportStack) == 0 || !p.alwaysPrintStack) {
                // Omit import stack. The full path to the file where the error
                // is the most important thing.
@@@ -454,6 -452,15 +458,15 @@@ func (p *PackageError) MarshalJSON() ([
        return json.Marshal(perr)
  }
  
+ func (p *PackageError) setPos(posList []token.Position) {
+       if len(posList) == 0 {
+               return
+       }
+       pos := posList[0]
+       pos.Filename = base.ShortPath(pos.Filename)
+       p.Pos = pos.String()
+ }
  // ImportPathError is a type of error that prevents a package from being loaded
  // for a given import path. When such a package is loaded, a *Package is
  // returned with Err wrapping an ImportPathError: the error is attached to
@@@ -702,17 -709,19 +715,19 @@@ func loadImport(ctx context.Context, pr
                                Err:         ImportErrorf(path, "non-canonical import path %q: should be %q", path, pathpkg.Clean(path)),
                        }
                        p.Incomplete = true
-                       setErrorPos(p, importPos)
+                       p.Error.setPos(importPos)
                }
        }
  
        // Checked on every import because the rules depend on the code doing the importing.
        if perr := disallowInternal(srcDir, parent, parentPath, p, stk); perr != p {
-               return setErrorPos(perr, importPos)
+               perr.Error.setPos(importPos)
+               return perr
        }
        if mode&ResolveImport != 0 {
                if perr := disallowVendor(srcDir, path, parentPath, p, stk); perr != p {
-                       return setErrorPos(perr, importPos)
+                       perr.Error.setPos(importPos)
+                       return perr
                }
        }
  
                        ImportStack: stk.Copy(),
                        Err:         ImportErrorf(path, "import %q is a program, not an importable package", path),
                }
-               return setErrorPos(&perr, importPos)
+               perr.Error.setPos(importPos)
+               return &perr
        }
  
        if p.Internal.Local && parent != nil && !parent.Internal.Local {
                        ImportStack: stk.Copy(),
                        Err:         err,
                }
-               return setErrorPos(&perr, importPos)
+               perr.Error.setPos(importPos)
+               return &perr
        }
  
        return p
  }
  
- func setErrorPos(p *Package, importPos []token.Position) *Package {
-       if len(importPos) > 0 {
-               pos := importPos[0]
-               pos.Filename = base.ShortPath(pos.Filename)
-               p.Error.Pos = pos.String()
-       }
-       return p
- }
  // loadPackageData loads information needed to construct a *Package. The result
  // is cached, and later calls to loadPackageData for the same package will return
  // the same data.
@@@ -776,11 -778,7 +784,7 @@@ func loadPackageData(path, parentPath, 
        }
  
        if strings.Contains(path, "@") {
-               if cfg.ModulesEnabled {
-                       return nil, false, errors.New("can only use path@version syntax with 'go get'")
-               } else {
-                       return nil, false, errors.New("cannot use path@version syntax in GOPATH mode")
-               }
+               return nil, false, errors.New("can only use path@version syntax with 'go get' and 'go install' in module-aware mode")
        }
  
        // Determine canonical package path and directory.
@@@ -1153,7 -1151,7 +1157,7 @@@ var 
  // goModPath returns the module path in the go.mod in dir, if any.
  func goModPath(dir string) (path string) {
        return goModPathCache.Do(dir, func() interface{} {
-               data, err := ioutil.ReadFile(filepath.Join(dir, "go.mod"))
+               data, err := os.ReadFile(filepath.Join(dir, "go.mod"))
                if err != nil {
                        return ""
                }
@@@ -1302,9 -1300,9 +1306,9 @@@ HaveGoMod
  // Otherwise it is not possible to vendor just a/b/c and still import the
  // non-vendored a/b. See golang.org/issue/13832.
  func hasGoFiles(dir string) bool {
-       fis, _ := ioutil.ReadDir(dir)
-       for _, fi := range fis {
-               if !fi.IsDir() && strings.HasSuffix(fi.Name(), ".go") {
+       files, _ := os.ReadDir(dir)
+       for _, f := range files {
+               if !f.IsDir() && strings.HasSuffix(f.Name(), ".go") {
                        return true
                }
        }
@@@ -1660,7 -1658,7 +1664,7 @@@ func (p *Package) load(ctx context.Cont
                        // must be either in an explicit command-line argument,
                        // or on the importer side (indicated by a non-empty importPos).
                        if path != stk.Top() && len(importPos) > 0 {
-                               p = setErrorPos(p, importPos)
+                               p.Error.setPos(importPos)
                        }
                }
        }
                p.setLoadPackageDataError(err, path, stk, importPos)
        }
  
-       p.EmbedFiles, p.Internal.Embed, err = p.resolveEmbed(p.EmbedPatterns)
-       if err != nil {
-               setError(err)
-       }
        useBindir := p.Name == "main"
        if !p.Standard {
                switch cfg.BuildBuildmode {
                        // not work for any package that lacks a Target — such as a non-main
                        // package in module mode. We should probably fix that.
                        shlibnamefile := p.Target[:len(p.Target)-2] + ".shlibname"
-                       shlib, err := ioutil.ReadFile(shlibnamefile)
+                       shlib, err := os.ReadFile(shlibnamefile)
                        if err != nil && !os.IsNotExist(err) {
                                base.Fatalf("reading shlibname: %v", err)
                        }
                return
        }
  
+       // Errors after this point are caused by this package, not the importing
+       // package. Pushing the path here prevents us from reporting the error
+       // with the position of the import declaration.
        stk.Push(path)
        defer stk.Pop()
  
+       p.EmbedFiles, p.Internal.Embed, err = resolveEmbed(p.Dir, p.EmbedPatterns)
+       if err != nil {
+               p.Incomplete = true
+               setError(err)
+               embedErr := err.(*EmbedError)
+               p.Error.setPos(p.Internal.Build.EmbedPatternPos[embedErr.Pattern])
+       }
        // Check for case-insensitive collision of input files.
        // To avoid problems on case-insensitive files, we reject any package
        // where two different input files have equal names under a case-insensitive
        }
  }
  
+ // An EmbedError indicates a problem with a go:embed directive.
+ type EmbedError struct {
+       Pattern string
+       Err     error
+ }
+ func (e *EmbedError) Error() string {
+       return fmt.Sprintf("pattern %s: %v", e.Pattern, e.Err)
+ }
+ func (e *EmbedError) Unwrap() error {
+       return e.Err
+ }
  // ResolveEmbed resolves //go:embed patterns and returns only the file list.
- // For use by go list to compute p.TestEmbedFiles and p.XTestEmbedFiles.
- func (p *Package) ResolveEmbed(patterns []string) []string {
-       files, _, _ := p.resolveEmbed(patterns)
-       return files
+ // For use by go mod vendor to find embedded files it should copy into the
+ // vendor directory.
+ // TODO(#42504): Once go mod vendor uses load.PackagesAndErrors, just
+ // call (*Package).ResolveEmbed
+ func ResolveEmbed(dir string, patterns []string) ([]string, error) {
+       files, _, err := resolveEmbed(dir, patterns)
+       return files, err
  }
  
  // resolveEmbed resolves //go:embed patterns to precise file lists.
  // It sets files to the list of unique files matched (for go list),
  // and it sets pmap to the more precise mapping from
  // patterns to files.
- // TODO(rsc): All these messages need position information for better error reports.
- func (p *Package) resolveEmbed(patterns []string) (files []string, pmap map[string][]string, err error) {
+ func resolveEmbed(pkgdir string, patterns []string) (files []string, pmap map[string][]string, err error) {
+       var pattern string
+       defer func() {
+               if err != nil {
+                       err = &EmbedError{
+                               Pattern: pattern,
+                               Err:     err,
+                       }
+               }
+       }()
+       // TODO(rsc): All these messages need position information for better error reports.
        pmap = make(map[string][]string)
        have := make(map[string]int)
        dirOK := make(map[string]bool)
        pid := 0 // pattern ID, to allow reuse of have map
-       for _, pattern := range patterns {
+       for _, pattern = range patterns {
                pid++
  
                // Check pattern is valid for //go:embed.
                if _, err := path.Match(pattern, ""); err != nil || !validEmbedPattern(pattern) {
-                       return nil, nil, fmt.Errorf("pattern %s: invalid pattern syntax", pattern)
+                       return nil, nil, fmt.Errorf("invalid pattern syntax")
                }
  
                // Glob to find matches.
-               match, err := fsys.Glob(p.Dir + string(filepath.Separator) + filepath.FromSlash(pattern))
+               match, err := fsys.Glob(pkgdir + string(filepath.Separator) + filepath.FromSlash(pattern))
                if err != nil {
-                       return nil, nil, fmt.Errorf("pattern %s: %v", pattern, err)
+                       return nil, nil, err
                }
  
                // Filter list of matches down to the ones that will still exist when
                // then there may be other things lying around, like symbolic links or .git directories.)
                var list []string
                for _, file := range match {
-                       rel := filepath.ToSlash(file[len(p.Dir)+1:]) // file, relative to p.Dir
+                       rel := filepath.ToSlash(file[len(pkgdir)+1:]) // file, relative to p.Dir
  
                        what := "file"
                        info, err := fsys.Lstat(file)
  
                        // Check that directories along path do not begin a new module
                        // (do not contain a go.mod).
-                       for dir := file; len(dir) > len(p.Dir)+1 && !dirOK[dir]; dir = filepath.Dir(dir) {
+                       for dir := file; len(dir) > len(pkgdir)+1 && !dirOK[dir]; dir = filepath.Dir(dir) {
                                if _, err := fsys.Stat(filepath.Join(dir, "go.mod")); err == nil {
-                                       return nil, nil, fmt.Errorf("pattern %s: cannot embed %s %s: in different module", pattern, what, rel)
+                                       return nil, nil, fmt.Errorf("cannot embed %s %s: in different module", what, rel)
                                }
                                if dir != file {
                                        if info, err := fsys.Lstat(dir); err == nil && !info.IsDir() {
-                                               return nil, nil, fmt.Errorf("pattern %s: cannot embed %s %s: in non-directory %s", pattern, what, rel, dir[len(p.Dir)+1:])
+                                               return nil, nil, fmt.Errorf("cannot embed %s %s: in non-directory %s", what, rel, dir[len(pkgdir)+1:])
                                        }
                                }
                                dirOK[dir] = true
                                if elem := filepath.Base(dir); isBadEmbedName(elem) {
                                        if dir == file {
-                                               return nil, nil, fmt.Errorf("pattern %s: cannot embed %s %s: invalid name %s", pattern, what, rel, elem)
+                                               return nil, nil, fmt.Errorf("cannot embed %s %s: invalid name %s", what, rel, elem)
                                        } else {
-                                               return nil, nil, fmt.Errorf("pattern %s: cannot embed %s %s: in invalid directory %s", pattern, what, rel, elem)
+                                               return nil, nil, fmt.Errorf("cannot embed %s %s: in invalid directory %s", what, rel, elem)
                                        }
                                }
                        }
  
                        switch {
                        default:
-                               return nil, nil, fmt.Errorf("pattern %s: cannot embed irregular file %s", pattern, rel)
+                               return nil, nil, fmt.Errorf("cannot embed irregular file %s", rel)
  
                        case info.Mode().IsRegular():
                                if have[rel] != pid {
                                        if err != nil {
                                                return err
                                        }
-                                       rel := filepath.ToSlash(path[len(p.Dir)+1:])
+                                       rel := filepath.ToSlash(path[len(pkgdir)+1:])
+                                       name := info.Name()
+                                       if path != file && (isBadEmbedName(name) || name[0] == '.' || name[0] == '_') {
+                                               // Ignore bad names, assuming they won't go into modules.
+                                               // Also avoid hidden files that user may not know about.
+                                               // See golang.org/issue/42328.
+                                               if info.IsDir() {
+                                                       return fs.SkipDir
+                                               }
+                                               return nil
+                                       }
                                        if info.IsDir() {
                                                if _, err := fsys.Stat(filepath.Join(path, "go.mod")); err == nil {
                                                        return filepath.SkipDir
                                        if !info.Mode().IsRegular() {
                                                return nil
                                        }
-                                       if isBadEmbedName(info.Name()) {
-                                               // Ignore bad names, assuming they won't go into modules.
-                                               return nil
-                                       }
                                        count++
                                        if have[rel] != pid {
                                                have[rel] = pid
                                        return nil, nil, err
                                }
                                if count == 0 {
-                                       return nil, nil, fmt.Errorf("pattern %s: cannot embed directory %s: contains no embeddable files", pattern, rel)
+                                       return nil, nil, fmt.Errorf("cannot embed directory %s: contains no embeddable files", rel)
                                }
                        }
                }
  
                if len(list) == 0 {
-                       return nil, nil, fmt.Errorf("pattern %s: no matching files found", pattern)
+                       return nil, nil, fmt.Errorf("no matching files found")
                }
                sort.Strings(list)
                pmap[pattern] = list
@@@ -2055,7 -2092,13 +2098,13 @@@ func validEmbedPattern(pattern string) 
  // can't or won't be included in modules and therefore shouldn't be treated
  // as existing for embedding.
  func isBadEmbedName(name string) bool {
+       if err := module.CheckFilePath(name); err != nil {
+               return true
+       }
        switch name {
+       // Empty string should be impossible but make it bad.
+       case "":
+               return true
        // Version control directories won't be present in module.
        case ".bzr", ".hg", ".git", ".svn":
                return true
@@@ -2312,30 -2355,14 +2361,14 @@@ func LoadImportWithFlags(path, srcDir s
  // argument where needed.
  var ModResolveTests bool
  
- // Packages returns the packages named by the
- // command line arguments 'args'. If a named package
- // cannot be loaded at all (for example, if the directory does not exist),
- // then packages prints an error and does not include that
- // package in the results. However, if errors occur trying
- // to load dependencies of a named package, the named
- // package is still returned, with p.Incomplete = true
- // and details in p.DepsErrors.
- func Packages(ctx context.Context, args []string) []*Package {
-       var pkgs []*Package
-       for _, pkg := range PackagesAndErrors(ctx, args) {
-               if pkg.Error != nil {
-                       base.Errorf("%v", pkg.Error)
-                       continue
-               }
-               pkgs = append(pkgs, pkg)
-       }
-       return pkgs
- }
- // PackagesAndErrors is like 'packages' but returns a
- // *Package for every argument, even the ones that
- // cannot be loaded at all.
- // The packages that fail to load will have p.Error != nil.
+ // PackagesAndErrors returns the packages named by the command line arguments
+ // 'patterns'. If a named package cannot be loaded, PackagesAndErrors returns
+ // a *Package with the Error field describing the failure. If errors are found
+ // loading imported packages, the DepsErrors field is set. The Incomplete field
+ // may be set as well.
+ //
+ // To obtain a flat list of packages, use PackageList.
+ // To report errors loading packages, use ReportPackageErrors.
  func PackagesAndErrors(ctx context.Context, patterns []string) []*Package {
        ctx, span := trace.StartSpan(ctx, "load.PackagesAndErrors")
        defer span.Done()
        return pkgs
  }
  
- func setToolFlags(pkgs ...*Package) {
-       for _, p := range PackageList(pkgs) {
-               p.Internal.Asmflags = BuildAsmflags.For(p)
-               p.Internal.Gcflags = BuildGcflags.For(p)
-               p.Internal.Ldflags = BuildLdflags.For(p)
-               p.Internal.Gccgoflags = BuildGccgoflags.For(p)
-       }
- }
- // PackagesForBuild is like Packages but exits
- // if any of the packages or their dependencies have errors
- // (cannot be built).
- func PackagesForBuild(ctx context.Context, args []string) []*Package {
-       pkgs := PackagesAndErrors(ctx, args)
+ // CheckPackageErrors prints errors encountered loading pkgs and their
+ // dependencies, then exits with a non-zero status if any errors were found.
+ func CheckPackageErrors(pkgs []*Package) {
        printed := map[*PackageError]bool{}
        for _, pkg := range pkgs {
                if pkg.Error != nil {
                seen[pkg.ImportPath] = true
        }
        base.ExitIfErrors()
+ }
  
-       return pkgs
+ func setToolFlags(pkgs ...*Package) {
+       for _, p := range PackageList(pkgs) {
+               p.Internal.Asmflags = BuildAsmflags.For(p)
+               p.Internal.Gcflags = BuildGcflags.For(p)
+               p.Internal.Ldflags = BuildLdflags.For(p)
+               p.Internal.Gccgoflags = BuildGccgoflags.For(p)
+       }
  }
  
  // GoFilesPackage creates a package for building a collection of Go files
index 4ad03e373c4eb16855d2eea29a217a4aa9c43506,314896824a03fcb8d3dcb58146759d10adbeb615..3f039aa67f9a183134cc7a7592f755622015e4dc
@@@ -49,11 -49,11 +49,11 @@@ import 
        "encoding/base64"
        "encoding/binary"
        "fmt"
+       exec "internal/execabs"
        "io"
        "io/ioutil"
        "log"
        "os"
-       "os/exec"
        "path/filepath"
        "runtime"
        "sort"
@@@ -298,6 -298,11 +298,11 @@@ func (ctxt *Link) CanUsePlugins() bool 
        return ctxt.canUsePlugins
  }
  
+ // NeedCodeSign reports whether we need to code-sign the output binary.
+ func (ctxt *Link) NeedCodeSign() bool {
+       return ctxt.IsDarwin() && ctxt.IsARM64()
+ }
  var (
        dynlib          []string
        ldflag          []string
@@@ -484,10 -489,16 +489,16 @@@ func (ctxt *Link) loadlib() 
        case 0:
                // nothing to do
        case 1, 2:
-               flags = loader.FlagStrictDups
+               flags |= loader.FlagStrictDups
        default:
                log.Fatalf("invalid -strictdups flag value %d", *FlagStrictDups)
        }
+       if !*flagAbiWrap || ctxt.linkShared {
+               // Use ABI aliases if ABI wrappers are not used.
+               // TODO: for now we still use ABI aliases in shared linkage, even if
+               // the wrapper is enabled.
+               flags |= loader.FlagUseABIAlias
+       }
        elfsetstring1 := func(str string, off int) { elfsetstring(ctxt, 0, str, off) }
        ctxt.loader = loader.NewLoader(flags, elfsetstring1, &ctxt.ErrorReporter.ErrorReporter)
        ctxt.ErrorReporter.SymName = func(s loader.Sym) string {
@@@ -1011,7 -1022,6 +1022,7 @@@ var hostobj []Hostob
  // These packages can use internal linking mode.
  // Others trigger external mode.
  var internalpkg = []string{
 +      "crypto/internal/boring",
        "crypto/x509",
        "net",
        "os/user",
@@@ -1269,6 -1279,7 +1280,7 @@@ func (ctxt *Link) hostlink() 
                }
        case objabi.Hopenbsd:
                argv = append(argv, "-Wl,-nopie")
+               argv = append(argv, "-pthread")
        case objabi.Hwindows:
                if windowsgui {
                        argv = append(argv, "-mwindows")
        }
  
        const compressDWARF = "-Wl,--compress-debug-sections=zlib-gnu"
-       if ctxt.compressDWARF && linkerFlagSupported(argv[0], altLinker, compressDWARF) {
+       if ctxt.compressDWARF && linkerFlagSupported(ctxt.Arch, argv[0], altLinker, compressDWARF) {
                argv = append(argv, compressDWARF)
        }
  
        if ctxt.BuildMode == BuildModeExe && !ctxt.linkShared && !(ctxt.IsDarwin() && ctxt.IsARM64()) {
                // GCC uses -no-pie, clang uses -nopie.
                for _, nopie := range []string{"-no-pie", "-nopie"} {
-                       if linkerFlagSupported(argv[0], altLinker, nopie) {
+                       if linkerFlagSupported(ctxt.Arch, argv[0], altLinker, nopie) {
                                argv = append(argv, nopie)
                                break
                        }
                checkStatic(p)
        }
        if ctxt.HeadType == objabi.Hwindows {
+               // Determine which linker we're using. Add in the extldflags in
+               // case used has specified "-fuse-ld=...".
+               cmd := exec.Command(*flagExtld, *flagExtldflags, "-Wl,--version")
+               usingLLD := false
+               if out, err := cmd.CombinedOutput(); err == nil {
+                       if bytes.Contains(out, []byte("LLD ")) {
+                               usingLLD = true
+                       }
+               }
                // use gcc linker script to work around gcc bug
                // (see https://golang.org/issue/20183 for details).
-               p := writeGDBLinkerScript()
-               argv = append(argv, "-Wl,-T,"+p)
+               if !usingLLD {
+                       p := writeGDBLinkerScript()
+                       argv = append(argv, "-Wl,-T,"+p)
+               }
                // libmingw32 and libmingwex have some inter-dependencies,
                // so must use linker groups.
                argv = append(argv, "-Wl,--start-group", "-lmingwex", "-lmingw32", "-Wl,--end-group")
                        Exitf("%s: %v", os.Args[0], err)
                }
        }
+       if ctxt.NeedCodeSign() {
+               err := machoCodeSign(ctxt, *flagOutfile)
+               if err != nil {
+                       Exitf("%s: code signing failed: %v", os.Args[0], err)
+               }
+       }
  }
  
  var createTrivialCOnce sync.Once
  
- func linkerFlagSupported(linker, altLinker, flag string) bool {
+ func linkerFlagSupported(arch *sys.Arch, linker, altLinker, flag string) bool {
        createTrivialCOnce.Do(func() {
                src := filepath.Join(*flagTmpdir, "trivial.c")
                if err := ioutil.WriteFile(src, []byte("int main() { return 0; }"), 0666); err != nil {
                "-target",
        }
  
-       var flags []string
+       flags := hostlinkArchArgs(arch)
        keep := false
        skip := false
        extldflags := strings.Fields(*flagExtldflags)
@@@ -1727,12 -1756,19 +1757,19 @@@ func hostlinkArchArgs(arch *sys.Arch) [
        switch arch.Family {
        case sys.I386:
                return []string{"-m32"}
-       case sys.AMD64, sys.S390X:
+       case sys.AMD64:
+               if objabi.GOOS == "darwin" {
+                       return []string{"-arch", "x86_64", "-m64"}
+               }
+               return []string{"-m64"}
+       case sys.S390X:
                return []string{"-m64"}
        case sys.ARM:
                return []string{"-marm"}
        case sys.ARM64:
-               // nothing needed
+               if objabi.GOOS == "darwin" {
+                       return []string{"-arch", "arm64"}
+               }
        case sys.MIPS64:
                return []string{"-mabi=64"}
        case sys.MIPS:
@@@ -1791,14 -1827,14 +1828,14 @@@ func ldobj(ctxt *Link, f *bio.Reader, l
                return ldhostobj(ldmacho, ctxt.HeadType, f, pkg, length, pn, file)
        }
  
-       if c1 == 0x4c && c2 == 0x01 || c1 == 0x64 && c2 == 0x86 {
+       if /* x86 */ c1 == 0x4c && c2 == 0x01 || /* x86_64 */ c1 == 0x64 && c2 == 0x86 || /* armv7 */ c1 == 0xc4 && c2 == 0x01 {
                ldpe := func(ctxt *Link, f *bio.Reader, pkg string, length int64, pn string) {
                        textp, rsrc, err := loadpe.Load(ctxt.loader, ctxt.Arch, ctxt.IncVersion(), f, pkg, length, pn)
                        if err != nil {
                                Errorf(nil, "%v", err)
                                return
                        }
-                       if rsrc != 0 {
+                       if len(rsrc) != 0 {
                                setpersrc(ctxt, rsrc)
                        }
                        ctxt.Textp = append(ctxt.Textp, textp...)
@@@ -2061,6 -2097,26 +2098,26 @@@ func ldshlibsyms(ctxt *Link, shlib stri
                Errorf(nil, "cannot read symbols from shared library: %s", libpath)
                return
        }
+       // collect text symbol ABI versions.
+       symabi := make(map[string]int) // map (unmangled) symbol name to version
+       if *flagAbiWrap {
+               for _, elfsym := range syms {
+                       if elf.ST_TYPE(elfsym.Info) != elf.STT_FUNC {
+                               continue
+                       }
+                       // Demangle the name. Keep in sync with symtab.go:putelfsym.
+                       if strings.HasSuffix(elfsym.Name, ".abiinternal") {
+                               // ABIInternal symbol has mangled name, so the primary symbol is ABI0.
+                               symabi[strings.TrimSuffix(elfsym.Name, ".abiinternal")] = 0
+                       }
+                       if strings.HasSuffix(elfsym.Name, ".abi0") {
+                               // ABI0 symbol has mangled name, so the primary symbol is ABIInternal.
+                               symabi[strings.TrimSuffix(elfsym.Name, ".abi0")] = sym.SymVerABIInternal
+                       }
+               }
+       }
        for _, elfsym := range syms {
                if elf.ST_TYPE(elfsym.Info) == elf.STT_NOTYPE || elf.ST_TYPE(elfsym.Info) == elf.STT_SECTION {
                        continue
                // Symbols whose names start with "type." are compiler
                // generated, so make functions with that prefix internal.
                ver := 0
+               symname := elfsym.Name // (unmangled) symbol name
                if elf.ST_TYPE(elfsym.Info) == elf.STT_FUNC && strings.HasPrefix(elfsym.Name, "type.") {
                        ver = sym.SymVerABIInternal
+               } else if *flagAbiWrap && elf.ST_TYPE(elfsym.Info) == elf.STT_FUNC {
+                       if strings.HasSuffix(elfsym.Name, ".abiinternal") {
+                               ver = sym.SymVerABIInternal
+                               symname = strings.TrimSuffix(elfsym.Name, ".abiinternal")
+                       } else if strings.HasSuffix(elfsym.Name, ".abi0") {
+                               ver = 0
+                               symname = strings.TrimSuffix(elfsym.Name, ".abi0")
+                       } else if abi, ok := symabi[elfsym.Name]; ok {
+                               ver = abi
+                       }
                }
  
                l := ctxt.loader
-               s := l.LookupOrCreateSym(elfsym.Name, ver)
+               s := l.LookupOrCreateSym(symname, ver)
  
                // Because loadlib above loads all .a files before loading
                // any shared libraries, any non-dynimport symbols we find
                        }
                }
  
+               if symname != elfsym.Name {
+                       l.SetSymExtname(s, elfsym.Name)
+               }
                // For function symbols, we don't know what ABI is
                // available, so alias it under both ABIs.
                //
                // mangle Go function names in the .so to include the
                // ABI.
                if elf.ST_TYPE(elfsym.Info) == elf.STT_FUNC && ver == 0 {
-                       alias := ctxt.loader.LookupOrCreateSym(elfsym.Name, sym.SymVerABIInternal)
+                       if *flagAbiWrap {
+                               if _, ok := symabi[symname]; ok {
+                                       continue // only use alias for functions w/o ABI wrappers
+                               }
+                       }
+                       alias := ctxt.loader.LookupOrCreateSym(symname, sym.SymVerABIInternal)
                        if l.SymType(alias) != 0 {
                                continue
                        }
diff --combined src/crypto/tls/common.go
index 1e724fcb3c0df3432cca245c78c4fe20412da7af,eec6e1ebbd9060559637c9d2476046b2665a4bed..2564dfee9e4cd9cc1f9a2c1be839ee5cd4b39388
@@@ -7,7 -7,6 +7,6 @@@ package tl
  import (
        "bytes"
        "container/list"
-       "context"
        "crypto"
        "crypto/ecdsa"
        "crypto/ed25519"
@@@ -174,11 -173,11 +173,11 @@@ const 
  // hash function associated with the Ed25519 signature scheme.
  var directSigning crypto.Hash = 0
  
 -// supportedSignatureAlgorithms contains the signature and hash algorithms that
 +// defaultSupportedSignatureAlgorithms contains the signature and hash algorithms that
  // the code advertises as supported in a TLS 1.2+ ClientHello and in a TLS 1.2+
  // CertificateRequest. The two fields are merged to match with TLS 1.3.
  // Note that in TLS 1.2, the ECDSA algorithms are not constrained to P-256, etc.
 -var supportedSignatureAlgorithms = []SignatureScheme{
 +var defaultSupportedSignatureAlgorithms = []SignatureScheme{
        PSSWithSHA256,
        ECDSAWithP256AndSHA256,
        Ed25519,
@@@ -444,16 -443,6 +443,6 @@@ type ClientHelloInfo struct 
        // config is embedded by the GetCertificate or GetConfigForClient caller,
        // for use with SupportsCertificate.
        config *Config
-       // ctx is the context of the handshake that is in progress.
-       ctx context.Context
- }
- // Context returns the context of the handshake that is in progress.
- // This context is a child of the context passed to HandshakeContext,
- // if any, and is canceled when the handshake concludes.
- func (c *ClientHelloInfo) Context() context.Context {
-       return c.ctx
  }
  
  // CertificateRequestInfo contains information from a server's
@@@ -472,16 -461,6 +461,6 @@@ type CertificateRequestInfo struct 
  
        // Version is the TLS version that was negotiated for this connection.
        Version uint16
-       // ctx is the context of the handshake that is in progress.
-       ctx context.Context
- }
- // Context returns the context of the handshake that is in progress.
- // This context is a child of the context passed to HandshakeContext,
- // if any, and is canceled when the handshake concludes.
- func (c *CertificateRequestInfo) Context() context.Context {
-       return c.ctx
  }
  
  // RenegotiationSupport enumerates the different levels of support for TLS
@@@ -946,9 -925,6 +925,9 @@@ func (c *Config) time() time.Time 
  }
  
  func (c *Config) cipherSuites() []uint16 {
 +      if needFIPS() {
 +              return fipsCipherSuites(c)
 +      }
        s := c.CipherSuites
        if s == nil {
                s = defaultCipherSuites()
@@@ -966,9 -942,6 +945,9 @@@ var supportedVersions = []uint16
  func (c *Config) supportedVersions() []uint16 {
        versions := make([]uint16, 0, len(supportedVersions))
        for _, v := range supportedVersions {
 +              if needFIPS() && (v < fipsMinVersion(c) || v > fipsMaxVersion(c)) {
 +                      continue
 +              }
                if c != nil && c.MinVersion != 0 && v < c.MinVersion {
                        continue
                }
@@@ -1005,9 -978,6 +984,9 @@@ func supportedVersionsFromMax(maxVersio
  var defaultCurvePreferences = []CurveID{X25519, CurveP256, CurveP384, CurveP521}
  
  func (c *Config) curvePreferences() []CurveID {
 +      if needFIPS() {
 +              return fipsCurvePreferences(c)
 +      }
        if c == nil || len(c.CurvePreferences) == 0 {
                return defaultCurvePreferences
        }
@@@ -1479,8 -1449,7 +1458,8 @@@ var 
  func initDefaultCipherSuites() {
        var topCipherSuites []uint16
  
 -      if hasAESGCMHardwareSupport {
 +      if hasAESGCMHardwareSupport || boringEnabled {
 +              // If BoringCrypto is enabled, always prioritize AES-GCM.
                // If AES-GCM hardware is provided then prioritise AES-GCM
                // cipher suites.
                topCipherSuites = []uint16{
index ac19961d3c119dd60710012b218d2455874f9589,e684b21d527223e850e8a74d802e9ac0521e9753..94747a7c4109a8c22e923747c79e7a72ee12b21d
@@@ -6,7 -6,6 +6,6 @@@ package tl
  
  import (
        "bytes"
-       "context"
        "crypto"
        "crypto/ecdsa"
        "crypto/ed25519"
@@@ -25,7 -24,6 +24,6 @@@
  
  type clientHandshakeState struct {
        c            *Conn
-       ctx          context.Context
        serverHello  *serverHelloMsg
        hello        *clientHelloMsg
        suite        *cipherSuite
@@@ -115,10 -113,7 +113,10 @@@ func (c *Conn) makeClientHello() (*clie
        }
  
        if hello.vers >= VersionTLS12 {
 -              hello.supportedSignatureAlgorithms = supportedSignatureAlgorithms
 +              hello.supportedSignatureAlgorithms = supportedSignatureAlgorithms()
 +      }
 +      if testingOnlyForceClientHelloSignatureAlgorithms != nil {
 +              hello.supportedSignatureAlgorithms = testingOnlyForceClientHelloSignatureAlgorithms
        }
  
        var params ecdheParameters
        return hello, params, nil
  }
  
- func (c *Conn) clientHandshake(ctx context.Context) (err error) {
+ func (c *Conn) clientHandshake() (err error) {
        if c.config == nil {
                c.config = defaultConfig()
        }
        if c.vers == VersionTLS13 {
                hs := &clientHandshakeStateTLS13{
                        c:           c,
-                       ctx:         ctx,
                        serverHello: serverHello,
                        hello:       hello,
                        ecdheParams: ecdheParams,
  
        hs := &clientHandshakeState{
                c:           c,
-               ctx:         ctx,
                serverHello: serverHello,
                hello:       hello,
                session:     session,
@@@ -547,7 -540,7 +543,7 @@@ func (hs *clientHandshakeState) doFullH
                certRequested = true
                hs.finishedHash.Write(certReq.marshal())
  
-               cri := certificateRequestInfoFromMsg(hs.ctx, c.vers, certReq)
+               cri := certificateRequestInfoFromMsg(c.vers, certReq)
                if chainToSend, err = c.getClientCertificate(cri); err != nil {
                        c.sendAlert(alertInternalError)
                        return err
@@@ -842,8 -835,6 +838,8 @@@ func (c *Conn) verifyServerCertificate(
  
        if !c.config.InsecureSkipVerify {
                opts := x509.VerifyOptions{
 +                      IsBoring: isBoringCertificate,
 +
                        Roots:         c.config.RootCAs,
                        CurrentTime:   c.config.time(),
                        DNSName:       c.config.ServerName,
  
  // certificateRequestInfoFromMsg generates a CertificateRequestInfo from a TLS
  // <= 1.2 CertificateRequest, making an effort to fill in missing information.
- func certificateRequestInfoFromMsg(ctx context.Context, vers uint16, certReq *certificateRequestMsg) *CertificateRequestInfo {
+ func certificateRequestInfoFromMsg(vers uint16, certReq *certificateRequestMsg) *CertificateRequestInfo {
        cri := &CertificateRequestInfo{
                AcceptableCAs: certReq.certificateAuthorities,
                Version:       vers,
-               ctx:           ctx,
        }
  
        var rsaAvail, ecAvail bool
index 1405d6811f3e3eb387b83934cbd8d757e7ee7c2d,daa5d97fd35548c4871a2f7f7ffa3b6e5da013a7..c2db16dcf2a84480bec0b75e12ec9225b56f5ae9
@@@ -6,7 -6,6 +6,6 @@@ package tl
  
  import (
        "bytes"
-       "context"
        "crypto"
        "crypto/hmac"
        "crypto/rsa"
@@@ -18,7 -17,6 +17,6 @@@
  
  type clientHandshakeStateTLS13 struct {
        c           *Conn
-       ctx         context.Context
        serverHello *serverHelloMsg
        hello       *clientHelloMsg
        ecdheParams ecdheParameters
  func (hs *clientHandshakeStateTLS13) handshake() error {
        c := hs.c
  
 +      if needFIPS() {
 +              return errors.New("tls: internal error: TLS 1.3 reached in FIPS mode")
 +      }
 +
        // The server must not select TLS 1.3 in a renegotiation. See RFC 8446,
        // sections 4.1.2 and 4.1.3.
        if c.handshakes > 0 {
@@@ -480,7 -474,7 +478,7 @@@ func (hs *clientHandshakeStateTLS13) re
        }
  
        // See RFC 8446, Section 4.4.3.
 -      if !isSupportedSignatureAlgorithm(certVerify.signatureAlgorithm, supportedSignatureAlgorithms) {
 +      if !isSupportedSignatureAlgorithm(certVerify.signatureAlgorithm, supportedSignatureAlgorithms()) {
                c.sendAlert(alertIllegalParameter)
                return errors.New("tls: certificate used with invalid signature algorithm")
        }
@@@ -561,7 -555,6 +559,6 @@@ func (hs *clientHandshakeStateTLS13) se
                AcceptableCAs:    hs.certReq.certificateAuthorities,
                SignatureSchemes: hs.certReq.supportedSignatureAlgorithms,
                Version:          c.vers,
-               ctx:              hs.ctx,
        })
        if err != nil {
                return err
index 52bb4d6844bff39b74b63d675cfa0fecfe1aba89,9c3e0f636ea7b548776ad75bf7ff112c65e7c571..9b05a27251c079ae1b97ec173c92fa06beb0da88
@@@ -5,7 -5,6 +5,6 @@@
  package tls
  
  import (
-       "context"
        "crypto"
        "crypto/ecdsa"
        "crypto/ed25519"
@@@ -24,7 -23,6 +23,6 @@@
  // It's discarded once the handshake has completed.
  type serverHandshakeState struct {
        c            *Conn
-       ctx          context.Context
        clientHello  *clientHelloMsg
        hello        *serverHelloMsg
        suite        *cipherSuite
@@@ -39,8 -37,8 +37,8 @@@
  }
  
  // serverHandshake performs a TLS handshake as a server.
- func (c *Conn) serverHandshake(ctx context.Context) error {
-       clientHello, err := c.readClientHello(ctx)
+ func (c *Conn) serverHandshake() error {
+       clientHello, err := c.readClientHello()
        if err != nil {
                return err
        }
@@@ -48,7 -46,6 +46,6 @@@
        if c.vers == VersionTLS13 {
                hs := serverHandshakeStateTLS13{
                        c:           c,
-                       ctx:         ctx,
                        clientHello: clientHello,
                }
                return hs.handshake()
@@@ -56,7 -53,6 +53,6 @@@
  
        hs := serverHandshakeState{
                c:           c,
-               ctx:         ctx,
                clientHello: clientHello,
        }
        return hs.handshake()
@@@ -128,7 -124,7 +124,7 @@@ func (hs *serverHandshakeState) handsha
  }
  
  // readClientHello reads a ClientHello message and selects the protocol version.
- func (c *Conn) readClientHello(ctx context.Context) (*clientHelloMsg, error) {
+ func (c *Conn) readClientHello() (*clientHelloMsg, error) {
        msg, err := c.readHandshake()
        if err != nil {
                return nil, err
        var configForClient *Config
        originalConfig := c.config
        if c.config.GetConfigForClient != nil {
-               chi := clientHelloInfo(ctx, c, clientHello)
+               chi := clientHelloInfo(c, clientHello)
                if configForClient, err = c.config.GetConfigForClient(chi); err != nil {
                        c.sendAlert(alertInternalError)
                        return nil, err
@@@ -224,7 -220,7 +220,7 @@@ func (hs *serverHandshakeState) process
                }
        }
  
-       hs.cert, err = c.config.getCertificate(clientHelloInfo(hs.ctx, c, hs.clientHello))
+       hs.cert, err = c.config.getCertificate(clientHelloInfo(c, hs.clientHello))
        if err != nil {
                if err == errNoCertificates {
                        c.sendAlert(alertUnrecognizedName)
@@@ -317,8 -313,7 +313,8 @@@ func (hs *serverHandshakeState) pickCip
  
                // If we don't have hardware support for AES-GCM, prefer other AEAD
                // ciphers even if the client prioritized AES-GCM.
 -              if !hasAESGCMHardwareSupport {
 +              // If BoringCrypto is enabled, always prioritize AES-GCM.
 +              if !hasAESGCMHardwareSupport && !boringEnabled {
                        preferenceList = deprioritizeAES(preferenceList)
                }
        }
@@@ -520,7 -515,7 +516,7 @@@ func (hs *serverHandshakeState) doFullH
                }
                if c.vers >= VersionTLS12 {
                        certReq.hasSignatureAlgorithm = true
 -                      certReq.supportedSignatureAlgorithms = supportedSignatureAlgorithms
 +                      certReq.supportedSignatureAlgorithms = supportedSignatureAlgorithms()
                }
  
                // An empty list of certificateAuthorities signals to
@@@ -791,8 -786,6 +787,8 @@@ func (c *Conn) processCertsFromClient(c
  
        if c.config.ClientAuth >= VerifyClientCertIfGiven && len(certs) > 0 {
                opts := x509.VerifyOptions{
 +                      IsBoring: isBoringCertificate,
 +
                        Roots:         c.config.ClientCAs,
                        CurrentTime:   c.config.time(),
                        Intermediates: x509.NewCertPool(),
        return nil
  }
  
- func clientHelloInfo(ctx context.Context, c *Conn, clientHello *clientHelloMsg) *ClientHelloInfo {
+ func clientHelloInfo(c *Conn, clientHello *clientHelloMsg) *ClientHelloInfo {
        supportedVersions := clientHello.supportedVersions
        if len(clientHello.supportedVersions) == 0 {
                supportedVersions = supportedVersionsFromMax(clientHello.vers)
                SupportedVersions: supportedVersions,
                Conn:              c.conn,
                config:            c.config,
-               ctx:               ctx,
        }
  }
index 36d48bc942ca03f63281d3212b660ef4f1bf180b,d6bf9e439b01c3e50b509085675ddf2a5953e60a..050a321e7f3119ba5aa93b5552c624a38a1bfde0
@@@ -6,7 -6,6 +6,6 @@@ package tl
  
  import (
        "bytes"
-       "context"
        "crypto"
        "crypto/elliptic"
        "crypto/x509"
@@@ -18,7 -17,6 +17,6 @@@
        "os"
        "os/exec"
        "path/filepath"
-       "runtime"
        "strings"
        "testing"
        "time"
@@@ -40,12 -38,10 +38,10 @@@ func testClientHelloFailure(t *testing.
                cli.writeRecord(recordTypeHandshake, m.marshal())
                c.Close()
        }()
-       ctx := context.Background()
        conn := Server(s, serverConfig)
-       ch, err := conn.readClientHello(ctx)
+       ch, err := conn.readClientHello()
        hs := serverHandshakeState{
                c:           conn,
-               ctx:         ctx,
                clientHello: ch,
        }
        if err == nil {
@@@ -1425,11 -1421,9 +1421,9 @@@ func TestSNIGivenOnFailure(t *testing.T
                c.Close()
        }()
        conn := Server(s, serverConfig)
-       ctx := context.Background()
-       ch, err := conn.readClientHello(ctx)
+       ch, err := conn.readClientHello()
        hs := serverHandshakeState{
                c:           conn,
-               ctx:         ctx,
                clientHello: ch,
        }
        if err == nil {
@@@ -1683,46 -1677,6 +1677,6 @@@ func TestMultipleCertificates(t *testin
        }
  }
  
- func TestServerHandshakeContextCancellation(t *testing.T) {
-       c, s := localPipe(t)
-       clientConfig := testConfig.Clone()
-       clientErr := make(chan error, 1)
-       ctx, cancel := context.WithCancel(context.Background())
-       defer cancel()
-       go func() {
-               defer close(clientErr)
-               defer c.Close()
-               clientHello := &clientHelloMsg{
-                       vers:               VersionTLS10,
-                       random:             make([]byte, 32),
-                       cipherSuites:       []uint16{TLS_RSA_WITH_RC4_128_SHA},
-                       compressionMethods: []uint8{compressionNone},
-               }
-               cli := Client(c, clientConfig)
-               _, err := cli.writeRecord(recordTypeHandshake, clientHello.marshal())
-               cancel()
-               clientErr <- err
-       }()
-       conn := Server(s, testConfig)
-       err := conn.HandshakeContext(ctx)
-       if err == nil {
-               t.Fatal("Server handshake did not error when the context was canceled")
-       }
-       if err != context.Canceled {
-               t.Errorf("Unexpected server handshake error: %v", err)
-       }
-       if err := <-clientErr; err != nil {
-               t.Errorf("Unexpected client error: %v", err)
-       }
-       if runtime.GOARCH == "wasm" {
-               t.Skip("conn.Close does not error as expected when called multiple times on WASM")
-       }
-       err = conn.Close()
-       if err == nil {
-               t.Error("Server connection was not closed when the context was canceled")
-       }
- }
  func TestAESCipherReordering(t *testing.T) {
        currentAESSupport := hasAESGCMHardwareSupport
        defer func() { hasAESGCMHardwareSupport = currentAESSupport; initDefaultCipherSuites() }()
                preferServerCipherSuites bool
                serverCiphers            []uint16
                expectedCipher           uint16
 +              boringExpectedCipher     uint16 // If non-zero, used when BoringCrypto is enabled.
        }{
                {
                        name: "server has hardware AES, client doesn't (pick ChaCha)",
                                TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,
                                TLS_RSA_WITH_AES_128_CBC_SHA,
                        },
 -                      serverHasAESGCM: false,
 -                      expectedCipher:  TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,
 +                      serverHasAESGCM:      false,
 +                      expectedCipher:       TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,
 +                      boringExpectedCipher: TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, // When BoringCrypto is enabled, AES-GCM is prioritized even without server hardware.
                },
                {
                        name: "client prefers AES-GCM, server has hardware AES (pick AES-GCM)",
                                TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,
                                TLS_RSA_WITH_AES_128_CBC_SHA,
                        },
 -                      serverHasAESGCM: false,
 -                      expectedCipher:  TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,
 +                      serverHasAESGCM:      false,
 +                      expectedCipher:       TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,
 +                      boringExpectedCipher: TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, // When BoringCrypto is enabled, AES-GCM is prioritized even without server hardware.
                },
                {
                        name: "client supports multiple AES-GCM, server doesn't have hardware AES and doesn't support ChaCha (pick corrent AES-GCM)",
                                t.Errorf("pickCipherSuite failed: %s", err)
                        }
  
 -                      if tc.expectedCipher != hs.suite.id {
 -                              t.Errorf("unexpected cipher chosen: want %d, got %d", tc.expectedCipher, hs.suite.id)
 +                      want := tc.expectedCipher
 +                      if boringEnabled && tc.boringExpectedCipher != 0 {
 +                              want = tc.boringExpectedCipher
 +                      }
 +                      if want != hs.suite.id {
 +                              t.Errorf("unexpected cipher chosen: want %d, got %d", want, hs.suite.id)
                        }
                })
        }
@@@ -1890,7 -1837,6 +1844,7 @@@ func TestAESCipherReordering13(t *testi
                serverHasAESGCM          bool
                preferServerCipherSuites bool
                expectedCipher           uint16
 +              boringExpectedCipher     uint16 // If non-zero, used when BoringCrypto is enabled.
        }{
                {
                        name: "server has hardware AES, client doesn't (pick ChaCha)",
                        serverHasAESGCM:          false,
                        preferServerCipherSuites: true,
                        expectedCipher:           TLS_CHACHA20_POLY1305_SHA256,
 +                      boringExpectedCipher:     TLS_AES_128_GCM_SHA256, // When BoringCrypto is enabled, AES-GCM is prioritized even without server hardware.
                },
                {
                        name: "client prefers AES and sends GREASE, server doesn't have hardware, prefer server ciphers (pick ChaCha)",
                        serverHasAESGCM:          false,
                        preferServerCipherSuites: true,
                        expectedCipher:           TLS_CHACHA20_POLY1305_SHA256,
 +                      boringExpectedCipher:     TLS_AES_128_GCM_SHA256, // When BoringCrypto is enabled, AES-GCM is prioritized even without server hardware.
                },
                {
                        name: "client prefers AES, server doesn't (pick ChaCha)",
                                TLS_AES_128_GCM_SHA256,
                                TLS_CHACHA20_POLY1305_SHA256,
                        },
 -                      serverHasAESGCM: false,
 -                      expectedCipher:  TLS_CHACHA20_POLY1305_SHA256,
 +                      serverHasAESGCM:      false,
 +                      expectedCipher:       TLS_CHACHA20_POLY1305_SHA256,
 +                      boringExpectedCipher: TLS_AES_128_GCM_SHA256, // When BoringCrypto is enabled, AES-GCM is prioritized even without server hardware.
                },
                {
                        name: "client prefers AES, server has hardware AES (pick AES)",
                                t.Errorf("pickCipherSuite failed: %s", err)
                        }
  
 -                      if tc.expectedCipher != hs.suite.id {
 -                              t.Errorf("unexpected cipher chosen: want %d, got %d", tc.expectedCipher, hs.suite.id)
 +                      want := tc.expectedCipher
 +                      if boringEnabled && tc.boringExpectedCipher != 0 {
 +                              want = tc.boringExpectedCipher
 +                      }
 +                      if want != hs.suite.id {
 +                              t.Errorf("unexpected cipher chosen: want %d, got %d", want, hs.suite.id)
                        }
                })
        }
index c3e3efbd11520691917682cbde15c0c6926268da,c2c288aed4325b280f435fcb26239d0d9f49780e..3e1255919f135a2bb6ae5147ae4ed1a198a94441
@@@ -6,7 -6,6 +6,6 @@@ package tl
  
  import (
        "bytes"
-       "context"
        "crypto"
        "crypto/hmac"
        "crypto/rsa"
@@@ -24,7 -23,6 +23,6 @@@ const maxClientPSKIdentities = 
  
  type serverHandshakeStateTLS13 struct {
        c               *Conn
-       ctx             context.Context
        clientHello     *clientHelloMsg
        hello           *serverHelloMsg
        sentDummyCCS    bool
  func (hs *serverHandshakeStateTLS13) handshake() error {
        c := hs.c
  
 +      if needFIPS() {
 +              return errors.New("tls: internal error: TLS 1.3 reached in FIPS mode")
 +      }
 +
        // For an overview of the TLS 1.3 handshake, see RFC 8446, Section 2.
        if err := hs.processClientHello(); err != nil {
                return err
@@@ -170,8 -164,7 +168,8 @@@ func (hs *serverHandshakeStateTLS13) pr
  
                // If we don't have hardware support for AES-GCM, prefer other AEAD
                // ciphers even if the client prioritized AES-GCM.
 -              if !hasAESGCMHardwareSupport {
 +              // If BoringCrypto is enabled, always prioritize AES-GCM.
 +              if !hasAESGCMHardwareSupport && !boringEnabled {
                        preferenceList = deprioritizeAES(preferenceList)
                }
        }
@@@ -381,7 -374,7 +379,7 @@@ func (hs *serverHandshakeStateTLS13) pi
                return c.sendAlert(alertMissingExtension)
        }
  
-       certificate, err := c.config.getCertificate(clientHelloInfo(hs.ctx, c, hs.clientHello))
+       certificate, err := c.config.getCertificate(clientHelloInfo(c, hs.clientHello))
        if err != nil {
                if err == errNoCertificates {
                        c.sendAlert(alertUnrecognizedName)
@@@ -604,7 -597,7 +602,7 @@@ func (hs *serverHandshakeStateTLS13) se
                certReq := new(certificateRequestMsgTLS13)
                certReq.ocspStapling = true
                certReq.scts = true
 -              certReq.supportedSignatureAlgorithms = supportedSignatureAlgorithms
 +              certReq.supportedSignatureAlgorithms = supportedSignatureAlgorithms()
                if c.config.ClientCAs != nil {
                        certReq.certificateAuthorities = c.config.ClientCAs.Subjects()
                }
@@@ -823,7 -816,7 +821,7 @@@ func (hs *serverHandshakeStateTLS13) re
                }
  
                // See RFC 8446, Section 4.4.3.
 -              if !isSupportedSignatureAlgorithm(certVerify.signatureAlgorithm, supportedSignatureAlgorithms) {
 +              if !isSupportedSignatureAlgorithm(certVerify.signatureAlgorithm, supportedSignatureAlgorithms()) {
                        c.sendAlert(alertIllegalParameter)
                        return errors.New("tls: client certificate used with invalid signature algorithm")
                }
diff --combined src/go/build/build.go
index 7783cad0dd4e544cdb6a7e51903ccc5347a91815,217fadf5bd48600402cd310192d735c7731d9037..35e07ea04ced0a5a0ef3a5fa3a669a29a54c86ee
@@@ -11,13 -11,13 +11,13 @@@ import 
        "go/ast"
        "go/doc"
        "go/token"
+       exec "internal/execabs"
        "internal/goroot"
        "internal/goversion"
        "io"
        "io/fs"
        "io/ioutil"
        "os"
-       "os/exec"
        pathpkg "path"
        "path/filepath"
        "runtime"
@@@ -449,9 -449,12 +449,12 @@@ type Package struct 
        //      //go:embed a* b.c
        // then the list will contain those two strings as separate entries.
        // (See package embed for more details about //go:embed.)
-       EmbedPatterns      []string // patterns from GoFiles, CgoFiles
-       TestEmbedPatterns  []string // patterns from TestGoFiles
-       XTestEmbedPatterns []string // patterns from XTestGoFiles
+       EmbedPatterns        []string                    // patterns from GoFiles, CgoFiles
+       EmbedPatternPos      map[string][]token.Position // line information for EmbedPatterns
+       TestEmbedPatterns    []string                    // patterns from TestGoFiles
+       TestEmbedPatternPos  map[string][]token.Position // line information for TestEmbedPatterns
+       XTestEmbedPatterns   []string                    // patterns from XTestGoFiles
+       XTestEmbedPatternPos map[string][]token.Position // line information for XTestEmbedPatternPos
  }
  
  // IsCommand reports whether the package is considered a
@@@ -794,10 -797,12 +797,12 @@@ Found
        var badGoError error
        var Sfiles []string // files with ".S"(capital S)/.sx(capital s equivalent for case insensitive filesystems)
        var firstFile, firstCommentFile string
-       var embeds, testEmbeds, xTestEmbeds []string
-       imported := make(map[string][]token.Position)
-       testImported := make(map[string][]token.Position)
-       xTestImported := make(map[string][]token.Position)
+       embedPos := make(map[string][]token.Position)
+       testEmbedPos := make(map[string][]token.Position)
+       xTestEmbedPos := make(map[string][]token.Position)
+       importPos := make(map[string][]token.Position)
+       testImportPos := make(map[string][]token.Position)
+       xTestImportPos := make(map[string][]token.Position)
        allTags := make(map[string]bool)
        fset := token.NewFileSet()
        for _, d := range dirs {
                        }
                }
  
-               var fileList, embedList *[]string
-               var importMap map[string][]token.Position
+               var fileList *[]string
+               var importMap, embedMap map[string][]token.Position
                switch {
                case isCgo:
                        allTags["cgo"] = true
                        if ctxt.CgoEnabled {
                                fileList = &p.CgoFiles
-                               importMap = imported
-                               embedList = &embeds
+                               importMap = importPos
+                               embedMap = embedPos
                        } else {
-                               // Ignore imports from cgo files if cgo is disabled.
+                               // Ignore imports and embeds from cgo files if cgo is disabled.
                                fileList = &p.IgnoredGoFiles
                        }
                case isXTest:
                        fileList = &p.XTestGoFiles
-                       importMap = xTestImported
-                       embedList = &xTestEmbeds
+                       importMap = xTestImportPos
+                       embedMap = xTestEmbedPos
                case isTest:
                        fileList = &p.TestGoFiles
-                       importMap = testImported
-                       embedList = &testEmbeds
+                       importMap = testImportPos
+                       embedMap = testEmbedPos
                default:
                        fileList = &p.GoFiles
-                       importMap = imported
-                       embedList = &embeds
+                       importMap = importPos
+                       embedMap = embedPos
                }
                *fileList = append(*fileList, name)
                if importMap != nil {
                                importMap[imp.path] = append(importMap[imp.path], fset.Position(imp.pos))
                        }
                }
-               if embedList != nil {
-                       *embedList = append(*embedList, info.embeds...)
+               if embedMap != nil {
+                       for _, emb := range info.embeds {
+                               embedMap[emb.pattern] = append(embedMap[emb.pattern], emb.pos)
+                       }
                }
        }
  
        }
        sort.Strings(p.AllTags)
  
-       p.EmbedPatterns = uniq(embeds)
-       p.TestEmbedPatterns = uniq(testEmbeds)
-       p.XTestEmbedPatterns = uniq(xTestEmbeds)
+       p.EmbedPatterns, p.EmbedPatternPos = cleanDecls(embedPos)
+       p.TestEmbedPatterns, p.TestEmbedPatternPos = cleanDecls(testEmbedPos)
+       p.XTestEmbedPatterns, p.XTestEmbedPatternPos = cleanDecls(xTestEmbedPos)
  
-       p.Imports, p.ImportPos = cleanImports(imported)
-       p.TestImports, p.TestImportPos = cleanImports(testImported)
-       p.XTestImports, p.XTestImportPos = cleanImports(xTestImported)
+       p.Imports, p.ImportPos = cleanDecls(importPos)
+       p.TestImports, p.TestImportPos = cleanDecls(testImportPos)
+       p.XTestImports, p.XTestImportPos = cleanDecls(xTestImportPos)
  
        // add the .S/.sx files only if we are using cgo
        // (which means gcc will compile them).
@@@ -1340,7 -1347,7 +1347,7 @@@ type fileInfo struct 
        parsed   *ast.File
        parseErr error
        imports  []fileImport
-       embeds   []string
+       embeds   []fileEmbed
        embedErr error
  }
  
@@@ -1350,6 -1357,11 +1357,11 @@@ type fileImport struct 
        doc  *ast.CommentGroup
  }
  
+ type fileEmbed struct {
+       pattern string
+       pos     token.Position
+ }
  // matchFile determines whether the file with the given name in the given directory
  // should be included in the package being constructed.
  // If the file should be included, matchFile returns a non-nil *fileInfo (and a nil error).
@@@ -1424,7 -1436,7 +1436,7 @@@ func (ctxt *Context) matchFile(dir, nam
        return info, nil
  }
  
- func cleanImports(m map[string][]token.Position) ([]string, map[string][]token.Position) {
+ func cleanDecls(m map[string][]token.Position) ([]string, map[string][]token.Position) {
        all := make([]string, 0, len(m))
        for path := range m {
                all = append(all, path)
@@@ -1825,7 -1837,6 +1837,7 @@@ func splitQuoted(s string) (r []string
  //    $GOARCH
  //    cgo (if cgo is enabled)
  //    !cgo (if cgo is disabled)
 +//    boringcrypto
  //    ctxt.Compiler
  //    !ctxt.Compiler
  //    tag (if tag is listed in ctxt.BuildTags or ctxt.ReleaseTags)
@@@ -1880,10 -1891,6 +1892,10 @@@ func (ctxt *Context) match(name string
        if ctxt.GOOS == "ios" && name == "darwin" {
                return true
        }
 +      // Let applications know that the Go+BoringCrypto toolchain is in use.
 +      if name == "boringcrypto" {
 +              return true
 +      }
  
        // other tags
        for _, tag := range ctxt.BuildTags {
index 89bae9fd511a0916dc6468c2f3bdbeb0e8cdc065,e5c849e8f53ea318e22def37a46108ee14d057b5..8849f5fd0531d11d9aee322d22234fec83f28724
@@@ -10,9 -10,9 +10,9 @@@ package buil
  import (
        "bytes"
        "fmt"
+       "go/token"
        "internal/testenv"
        "io/fs"
-       "io/ioutil"
        "os"
        "path/filepath"
        "runtime"
@@@ -76,8 -76,12 +76,12 @@@ var depsRules = 
          unicode/utf8, unicode/utf16, unicode,
          unsafe;
  
+       # These packages depend only on unsafe.
+       unsafe
+       < internal/abi;
        # RUNTIME is the core runtime group of packages, all of them very light-weight.
-       internal/cpu, unsafe
+       internal/abi, internal/cpu, unsafe
        < internal/bytealg
        < internal/unsafeheader
        < runtime/internal/sys
        < os
        < os/signal;
  
+       io/fs
+       < embed;
        unicode, fmt !< os, os/signal;
  
        os/signal, STR
        reflect !< OS;
  
        OS
-       < golang.org/x/sys/cpu, internal/goroot;
+       < golang.org/x/sys/cpu;
  
        # FMT is OS (which includes string routines) plus reflect and fmt.
        # It does not include package log, which should be avoided in core packages.
  
        log !< FMT;
  
+       OS, FMT
+       < internal/execabs;
+       OS, internal/execabs
+       < internal/goroot;
        # Misc packages needing only FMT.
        FMT
        < flag,
        math/big, go/token
        < go/constant;
  
-       container/heap, go/constant, go/parser
+       container/heap, go/constant, go/parser, regexp
        < go/types;
  
+       FMT
+       < go/build/constraint;
        go/doc, go/parser, internal/goroot, internal/goversion
        < go/build;
  
  
        # Bulk of the standard library must not use cgo.
        # The prohibition stops at net and os/user.
 -      C !< fmt, go/types, CRYPTO-MATH;
 +      C !< fmt, go/types;
  
        CGO, OS
        < plugin;
        NET, log
        < net/mail;
  
 -      # CRYPTO is core crypto algorithms - no cgo, fmt, net.
 -      # Unfortunately, stuck with reflect via encoding/binary.
 -      encoding/binary, golang.org/x/sys/cpu, hash
 +      NONE < crypto/internal/boring/sig;
 +      sync/atomic < crypto/internal/boring/fipstls;
 +
 +      encoding/binary, golang.org/x/sys/cpu, hash,
 +      FMT, math/big,
 +      CGO, crypto/internal/boring/sig, crypto/internal/boring/fipstls
        < crypto
        < crypto/subtle
        < crypto/internal/subtle
        < crypto/cipher
 +      < encoding/asn1
 +      < crypto/internal/boring
        < crypto/aes, crypto/des, crypto/hmac, crypto/md5, crypto/rc4,
          crypto/sha1, crypto/sha256, crypto/sha512
 -      < CRYPTO;
 -
 -      CGO, fmt, net !< CRYPTO;
 -
 -      # CRYPTO-MATH is core bignum-based crypto - no cgo, net; fmt now ok.
 -      CRYPTO, FMT, math/big
        < crypto/rand
        < crypto/internal/randutil
        < crypto/ed25519/internal/edwards25519
        < crypto/ed25519
 -      < encoding/asn1
        < golang.org/x/crypto/cryptobyte/asn1
        < golang.org/x/crypto/cryptobyte
        < golang.org/x/crypto/curve25519
        < crypto/dsa, crypto/elliptic, crypto/rsa
        < crypto/ecdsa
 -      < CRYPTO-MATH;
 +      < CRYPTO-BORING;
  
 -      CGO, net !< CRYPTO-MATH;
 +      net !< CRYPTO-BORING;
  
        # TLS, Prince of Dependencies.
 -      CRYPTO-MATH, NET, container/list, encoding/hex, encoding/pem
 +      CRYPTO-BORING, NET, container/list, encoding/hex, encoding/pem
        < golang.org/x/crypto/internal/subtle
        < golang.org/x/crypto/chacha20
        < golang.org/x/crypto/poly1305
        < crypto/x509
        < crypto/tls;
  
 +      crypto/internal/boring/sig, crypto/internal/boring/fipstls
 +      < crypto/tls/fipsonly;
 +
 +      crypto/internal/boring
 +      < crypto/boring;
 +
        # crypto-aware packages
  
        NET, crypto/rand, mime/quotedprintable
@@@ -514,8 -526,8 +530,8 @@@ func listStdPkgs(goroot string) ([]stri
        var pkgs []string
  
        src := filepath.Join(goroot, "src") + string(filepath.Separator)
-       walkFn := func(path string, fi fs.FileInfo, err error) error {
-               if err != nil || !fi.IsDir() || path == src {
+       walkFn := func(path string, d fs.DirEntry, err error) error {
+               if err != nil || !d.IsDir() || path == src {
                        return nil
                }
  
                pkgs = append(pkgs, strings.TrimPrefix(name, "vendor/"))
                return nil
        }
-       if err := filepath.Walk(src, walkFn); err != nil {
+       if err := filepath.WalkDir(src, walkFn); err != nil {
                return nil, err
        }
        return pkgs, nil
@@@ -601,12 -613,13 +617,13 @@@ func findImports(pkg string) ([]string
                vpkg = "vendor/" + pkg
        }
        dir := filepath.Join(Default.GOROOT, "src", vpkg)
-       files, err := ioutil.ReadDir(dir)
+       files, err := os.ReadDir(dir)
        if err != nil {
                return nil, err
        }
        var imports []string
        var haveImport = map[string]bool{}
+       fset := token.NewFileSet()
        for _, file := range files {
                name := file.Name()
                if name == "slice_go14.go" || name == "slice_go18.go" {
                if !strings.HasSuffix(name, ".go") || strings.HasSuffix(name, "_test.go") {
                        continue
                }
-               var info fileInfo
-               info.name = filepath.Join(dir, name)
+               info := fileInfo{
+                       name: filepath.Join(dir, name),
+                       fset: fset,
+               }
                f, err := os.Open(info.name)
                if err != nil {
                        return nil, err
@@@ -845,3 -860,22 +864,22 @@@ func TestStdlibLowercase(t *testing.T) 
                }
        }
  }
+ // TestFindImports tests that findImports works.  See #43249.
+ func TestFindImports(t *testing.T) {
+       imports, err := findImports("go/build")
+       if err != nil {
+               t.Fatal(err)
+       }
+       t.Logf("go/build imports %q", imports)
+       want := []string{"bytes", "os", "path/filepath", "strings"}
+ wantLoop:
+       for _, w := range want {
+               for _, imp := range imports {
+                       if imp == w {
+                               continue wantLoop
+                       }
+               }
+               t.Errorf("expected to find %q in import list", w)
+       }
+ }