[dev.link] all: merge branch 'master' into dev.link

Merge conflicts are mostly recently changed nm/objdump output
format and its tests. Resolved easily (mostly just using the
format on master branch).

Change-Id: I99d8410a9a02947ecf027d9cae5762861562baf5
diff --git a/doc/contribute.html b/doc/contribute.html
index 5fefac6..6188ee1 100644
--- a/doc/contribute.html
+++ b/doc/contribute.html
@@ -263,6 +263,24 @@
 an <a href="https://golang.org/issues">existing one</a>.
 </p>
 
+<h3 id="where">Where to contribute</h3>
+
+<p>
+The Go project consists of the main
+<a href="https://go.googlesource.com/go">go</a> repository, which contains the
+source code for the Go language, as well as many golang.org/x/... repostories.
+These contain the various tools and infrastructure that support Go. For
+example, <a href="https://go.googlesource.com/pkgsite">golang.org/x/pkgsite</a>
+is for <a href="https://pkg.go.dev">pkg.go.dev</a>,
+<a href="https://go.googlesource.com/playground">golang.org/x/playground</a>
+is for the Go playground, and
+<a href="https://go.googlesource.com/tools">golang.org/x/tools</a> contains
+a variety of Go tools, including the Go language server,
+<a href="https://golang.org/s/gopls">gopls</a>. You can see a
+list of all the golang.org/x/... repositories on
+<a href="https://go.googlesource.com">go.googlesource.com</a>.
+</p>
+
 <h3 id="check_tracker">Check the issue tracker</h3>
 
 <p>
@@ -273,6 +291,13 @@
 </p>
 
 <p>
+The majority of the golang.org/x/... repos also use the main Go
+issue tracker. However, a few of these repositories manage their issues
+separately, so please be sure to check the right tracker for the repository to
+which you would like to contribute.
+</p>
+
+<p>
 Most issues will be marked with one of the following workflow labels:
 </p>
 
@@ -329,11 +354,16 @@
 
 <p>
 When planning work, please note that the Go project follows a <a
-href="https://golang.org/wiki/Go-Release-Cycle">six-month development cycle</a>.
-The latter half of each cycle is a three-month feature freeze during
-which only bug fixes and documentation updates are accepted.
-New contributions can be sent during a feature freeze, but they will
-not be merged until the freeze is over.
+href="https://golang.org/wiki/Go-Release-Cycle">six-month development cycle</a>
+for the main Go repository. The latter half of each cycle is a three-month
+feature freeze during which only bug fixes and documentation updates are
+accepted. New contributions can be sent during a feature freeze, but they will
+not be merged until the freeze is over. The freeze applies to the entire main
+repository as well as to the code in golang.org/x/... repositories that is
+needed to build the binaries included in the release. See the lists of packages
+vendored into
+<a href="https://github.com/golang/go/blob/master/src/vendor/modules.txt">the standard library</a>
+and the <a href="https://github.com/golang/go/blob/master/src/cmd/vendor/modules.txt"><code>go</code> command</a>.
 </p>
 
 <p>
@@ -408,13 +438,29 @@
 
 <ul>
 <li>
-<b>Step 1:</b> Clone the Go source code from <code>go.googlesource.com</code>
-and make sure it's stable by compiling and testing it once:
+<b>Step 1:</b> Clone the source code from <code>go.googlesource.com</code> and
+make sure it's stable by compiling and testing it once.
+
+<p>If you're making a change to the
+<a href="https://go.googlesource.com/go">main Go repository</a>:</p>
+
 <pre>
 $ git clone https://go.googlesource.com/go
 $ cd go/src
 $ ./all.bash                                # compile and test
 </pre>
+
+<p>
+If you're making a change to one of the golang.org/x/... repositories
+(<a href="https://go.googlesource.com/tools">golang.org/x/tools</a>,
+in this example):
+</p>
+
+<pre>
+$ git clone https://go.googlesource.com/tools
+$ cd tools
+$ go test ./...                             # compile and test
+</pre>
 </li>
 
 <li>
@@ -434,10 +480,18 @@
 </li>
 
 <li>
-<b>Step 3:</b> Test your changes, re-running <code>all.bash</code>.
+<b>Step 3:</b> Test your changes, either by running the tests in the package
+you edited or by re-running <code>all.bash</code>.
+
+<p>In the main Go repository:</p>
 <pre>
 $ ./all.bash    # recompile and test
 </pre>
+
+<p>In a golang.org/x/... repository:</p>
+<pre>
+$ go test ./... # recompile and test
+</pre>
 </li>
 
 <li>
@@ -465,7 +519,7 @@
 </p>
 
 
-<h3 id="checkout_go">Step 1: Clone the Go source code</h3>
+<h3 id="checkout_go">Step 1: Clone the source code</h3>
 
 <p>
 In addition to a recent Go installation, you need to have a local copy of the source
@@ -475,11 +529,19 @@
 Clone from <code>go.googlesource.com</code> (not GitHub):
 </p>
 
+<p>Main Go repository:</p>
 <pre>
 $ git clone https://go.googlesource.com/go
 $ cd go
 </pre>
 
+<p>golang.org/x/... repository</p>
+(<a href="https://go.googlesource.com/tools">golang.org/x/tools</a> in this example):
+<pre>
+$ git clone https://go.googlesource.com/tools
+$ cd tools
+</pre>
+
 <h3 id="make_branch">Step 2: Prepare changes in a new branch</h3>
 
 <p>
@@ -543,9 +605,13 @@
 <p>
 You've <a href="code.html">written and tested your code</a>, but
 before sending code out for review, run <i>all the tests for the whole
-tree</i> to make sure the changes don't break other packages or programs:
+tree</i> to make sure the changes don't break other packages or programs.
 </p>
 
+<h4 id="test-gorepo">In the main Go repository</h4>
+
+<p>This can be done by running <code>all.bash</code>:</p>
+
 <pre>
 $ cd go/src
 $ ./all.bash
@@ -574,6 +640,33 @@
 the section on how to <a href="#quick_test">test your changes quickly</a>.
 </p>
 
+<h4 id="test-xrepo">In the golang.org/x/... repositories</h4>
+
+<p>
+Run the tests for the entire repository
+(<a href="https://go.googlesource.com/tools">golang.org/x/tools</a>,
+in this example):
+</p>
+
+<pre>
+$ cd tools
+$ go test ./...
+</pre>
+
+<p>
+If you're concerned about the build status,
+you can check the <a href="https://build.golang.org">Build Dashboard</a>.
+Test failures may also be caught by the TryBots in code review.
+</p>
+
+<p>
+Some repositories, like
+<a href="https://go.googlesource.com/vscode-go">golang.org/x/vscode-go</a> will
+have different testing infrastructures, so always check the documentation
+for the repository in which you are working. The README file in the root of the
+repository will usually have this information.
+</p>
+
 <h3 id="mail">Step 4: Send changes for review</h3>
 
 <p>
@@ -720,10 +813,10 @@
 </p>
 
 <p>
-If you are sending a change against a subrepository, you must use
+If you are sending a change against a golang.org/x/... repository, you must use
 the fully-qualified syntax supported by GitHub to make sure the change is
-linked to the issue in the main repository, not the subrepository.
-All issues are tracked in the main repository's issue tracker.
+linked to the issue in the main repository, not the x/ repository.
+Most issues are tracked in the main repository's issue tracker.
 The correct form is "Fixes golang/go#159".
 </p>
 
@@ -1070,25 +1163,6 @@
 </pre>
 </ul>
 
-<h3 id="subrepos">Contributing to subrepositories (golang.org/x/...)</h3>
-
-<p>
-If you are contributing a change to a subrepository, obtain the
-Go package using <code>go get</code>.
-For example, to contribute
-to <code>golang.org/x/oauth2</code>, check out the code by running:
-</p>
-
-<pre>
-$ go get -d golang.org/x/oauth2/...
-</pre>
-
-<p>
-Then, change your directory to the package's source directory
-(<code>$GOPATH/src/golang.org/x/oauth2</code>), and follow the
-normal contribution flow.
-</p>
-
 
 <h3 id="cc">Specifying a reviewer / CCing others</h3>
 
@@ -1209,5 +1283,5 @@
 
 <p>
 Make sure to explicitly specify <code>HEAD</code>, which is usually not required when sending
-single changes.
+single changes. More details can be found in the <a href="https://pkg.go.dev/golang.org/x/review/git-codereview?tab=doc#hdr-Multiple_Commit_Work_Branches">git-codereview documentation</a>.
 </p>
diff --git a/doc/editors.html b/doc/editors.html
index 4ff35a5..22927bf 100644
--- a/doc/editors.html
+++ b/doc/editors.html
@@ -20,7 +20,7 @@
 
 <ul>
 <li><a href="https://github.com/fatih/vim-go">vim</a>: vim-go plugin provides Go programming language support</li>
-<li><a href="https://marketplace.visualstudio.com/items?itemName=lukehoban.Go">Visual Studio Code</a>:
+<li><a href="https://marketplace.visualstudio.com/items?itemName=ms-vscode.Go">Visual Studio Code</a>:
 Go extension provides support for the Go programming language</li>
 <li><a href="https://www.jetbrains.com/go">GoLand</a>: GoLand is distributed either as a standalone IDE
 or as a plugin for IntelliJ IDEA Ultimate</li>
diff --git a/doc/go1.15.html b/doc/go1.15.html
index ba68c65..492cac0 100644
--- a/doc/go1.15.html
+++ b/doc/go1.15.html
@@ -39,7 +39,7 @@
   support for previous versions has been discontinued.
 </p>
 
-<p> <!-- golang.org/issue/37610, golang.org/issue/37611 -->
+<p> <!-- golang.org/issue/37610, golang.org/issue/37611, CL 227582, and CL 227198  -->
   As <a href="/doc/go1.14#darwin">announced</a> in the Go 1.14 release
   notes, Go 1.15 drops support for 32-bit binaries on macOS, iOS,
   iPadOS, watchOS, and tvOS (the <code>darwin/386</code>
@@ -55,16 +55,40 @@
   on Windows.
 </p>
 
-<p>
-TODO
+<p><!-- CL 211139 -->
+  Go-built DLLs no longer cause the process to exit when it receives a
+  signal (such as Ctrl-C at a terminal).
+</p>
+
+<h3 id="android">Android</h3>
+
+<p> <!-- CL 235017, golang.org/issue/38838 -->
+  When linking binaries for Android, Go 1.15 explicitly selects
+  the <code>lld</code> linker available in recent versions of the NDK.
+  The <code>lld</code> linker avoids crashes on some devices, and is
+  planned to become the default NDK linker in a future NDK version.
+</p>
+
+<h3 id="openbsd">OpenBSD</h3>
+
+<p><!-- CL 234381 -->
+  Go 1.15 adds support for OpenBSD 6.7 on <code>GOARCH=arm</code>
+  and <code>GOARCH=arm64</code>. Previous versions of Go already
+  supported OpenBSD 6.7 on <code>GOARCH=386</code>
+  and <code>GOARCH=amd64</code>.
+</p>
+
+<h3 id="riscv">RISC-V</h3>
+
+<p> <!-- CL 226400, CL 226206, and others -->
+  There has been progress in improving the stability and performance
+  of the 64-bit RISC-V port on Linux (<code>GOOS=linux</code>,
+  <code>GOARCH=riscv64</code>). It also now supports asynchronous
+  preemption.
 </p>
 
 <h2 id="tools">Tools</h2>
 
-<p>
-TODO
-</p>
-
 <h3 id="go-command">Go command</h3>
 
 <p><!-- golang.org/issue/37367 -->
@@ -79,10 +103,6 @@
   back to <code>direct</code> in case of errors.
 </p>
 
-<p>
-TODO
-</p>
-
 <h4 id="go-test"><code>go</code> <code>test</code></h4>
 
 <p><!-- https://golang.org/issue/36134 -->
@@ -191,21 +211,76 @@
 
 <h2 id="runtime">Runtime</h2>
 
+<p><!-- CL 232862 -->
+  Go now retries system calls that return <code>EINTR</code>. This
+  became more common in Go 1.14 with the addition of asynchronous
+  preemption, but is now handled transparently.
+</p>
+
+<p><!-- CL 221182, CL 229998 -->
+  Allocation of small objects now performs much better at high core
+  counts, and has lower worst-case latency.
+</p>
+
 <p>
 TODO
 </p>
 
 <h2 id="compiler">Compiler</h2>
 
-<p><!-- https://golang.org/cl/229578 -->
+<p><!-- CL 229578 -->
   Package <code>unsafe</code>'s <a href="/pkg/unsafe/#Pointer">safety
   rules</a> allow converting an <code>unsafe.Pointer</code>
   into <code>uintptr</code> when calling certain
   functions. Previously, in some cases, the compiler allowed multiple
-  chained conversions (for example, <code>syscall.Syscall(…,
-  uintptr(uintptr(ptr)), …)</code>). The compiler now requires exactly
-  one conversion. Code that used multiple conversions should be
-  updated to satisfy the safety rules.
+  chained conversions (for example, <code>syscall.Syscall(…,</code>
+  <code>uintptr(uintptr(ptr)),</code> <code>…)</code>). The compiler
+  now requires exactly one conversion. Code that used multiple
+  conversions should be updated to satisfy the safety rules.
+</p>
+
+<p><!-- CL 230544, CL 231397 -->
+  Go 1.15 reduces typical binary sizes by around 5% compared to Go
+  1.14 by eliminating certain types of GC metadata and more
+  aggressively eliminating unused type metadata.
+</p>
+
+<p><!-- CL 222661 -->
+  Go 1.15 adds a <code>-spectre</code> flag to both the
+  compiler and the assembler, to allow enabling Spectre mitigations.
+  These should almost never be needed and are provided mainly as a
+  “defense in depth” mechanism.
+  See the <a href="https://github.com/golang/go/wiki/Spectre">Spectre wiki page</a> for details.
+</p>
+
+<h2 id="linker">Linker</h2>
+
+<p>
+  This release includes substantial improvements to the Go linker,
+  which reduce linker resource usage (both time and memory) and
+  improve code robustness/maintainability.
+</p>
+
+<p>
+  For a representative set of large Go programs, linking is 20% faster
+  and requires 30% less memory on average, for <code>ELF</code>-based
+  OSes running on <code>amd64</code> architectures, with more modest
+  improvements for other architecture/OS combinations.
+</p>
+
+<p>
+  The key contributors to better linker performance are a newly
+  redesigned object file format, and a revamping of internal
+  phases to increase concurrency (for example, applying relocations to
+  symbols in parallel). Object files in Go 1.15 are slightly larger
+  than their 1.14 equivalents.
+</p>
+
+<p>
+  These changes are part of a multi-release project
+  to <a href="https://golang.org/s/better-linker">modernize the Go
+  linker</a>, meaning that there will be additional linker
+  improvements expected in future releases.
 </p>
 
 <h2 id="library">Core library</h2>
@@ -228,6 +303,16 @@
 TODO
 </p>
 
+<h3 id="cgo">Cgo</h3>
+
+<p><!-- CL 235817 -->
+	Go 1.15 will translate the C type <code>EGLConfig</code> to the
+	Go type <code>uintptr</code>. This change is similar to how Go
+	1.12 and newer treats <code>EGLDisplay</code>, Darwin's CoreFoundation and
+	Java's JNI types. See the <a href="/cmd/cgo/#hdr-Special_cases">cgo
+	documentation</a> for more information.
+</p>
+
 <h3 id="minor_library_changes">Minor changes to the library</h3>
 
 <p>
@@ -240,6 +325,25 @@
 TODO
 </p>
 
+<dl id="debug/pe"><dt><a href="/pkg/debug/pe/">debug/pe</a></dt>
+  <dd>
+    <p><!-- CL 222637 -->
+      The package now defines the
+      <code>IMAGE_FILE</code>, <code>IMAGE_SUBSYSTEM</code>,
+      and <code>IMAGE_DLLCHARACTERISTICS</code> constants used by the
+      PE file format.
+    </p>
+  </dd>
+</dl><!-- debug/pe -->
+
+<dl id="crypto/rsa"><dt><a href="/pkg/crypto/rsa/">crypto/rsa</a></dt>
+  <dd>
+    <p><!-- CL 226203 -->
+      VerifyPKCS1v15 now rejects invalid short signatures with missing leading zeroes.
+    </p>
+  </dd>
+</dl><!-- crypto/rsa -->
+
 <dl id="crypto/tls"><dt><a href="/crypto/tls/">crypto/tls</a></dt>
   <dd>
     <p><!-- CL 214977 -->
@@ -252,6 +356,22 @@
   </dd>
 </dl>
 
+<dl id="crypto/x509"><dt><a href="/pkg/crypto/x509/">crypto/x509</a></dt>
+  <dd>
+    <p><!-- CL 205237 -->
+      TODO: <a href="https://golang.org/cl/205237">https://golang.org/cl/205237</a>: load roots from colon separated SSL_CERT_DIR in loadSystemRoots
+    </p>
+  </dd>
+</dl><!-- crypto/x509 -->
+
+<dl id="encoding/xml"><dt><a href="/pkg/encoding/xml/">encoding/xml</a></dt>
+  <dd>
+    <p><!-- CL 203417 -->
+      TODO: <a href="https://golang.org/cl/203417">https://golang.org/cl/203417</a>: fix reserved namespace check to be case-insensitive
+    </p>
+  </dd>
+</dl><!-- encoding/xml -->
+
 <dl id="flag"><dt><a href="/pkg/flag/">flag</a></dt>
   <dd>
     <p><!-- CL 221427 -->
@@ -267,6 +387,34 @@
   </dd>
 </dl>
 
+<dl id="fmt"><dt><a href="/pkg/fmt/">fmt</a></dt>
+  <dd>
+    <p><!-- CL 215001 -->
+      TODO: <a href="https://golang.org/cl/215001">https://golang.org/cl/215001</a>: do not remove trailing zeros for %g and %G with #(sharp) flag
+    </p>
+  </dd>
+</dl><!-- fmt -->
+
+<dl id="io/ioutil"><dt><a href="/pkg/io/ioutil/">io/ioutil</a></dt>
+  <dd>
+    <p><!-- CL 212597 -->
+      <a href="/pkg/io/ioutil/#TempDir"><code>TempDir</code></a> and
+      <a href="/pkg/io/ioutil/#TempFile"><code>TempFile</code></a>
+      now reject patterns that contain path separators.
+      That is, calls such as <code>ioutil.TempFile("/tmp",</code> <code>"../base*")</code> will no longer succeed.
+      This prevents unintended directory traversal.
+    </p>
+  </dd>
+</dl><!-- io/ioutil -->
+
+<dl id="math/big"><dt><a href="/pkg/math/big/">math/big</a></dt>
+  <dd>
+    <p><!-- CL 230397 -->
+      TODO: <a href="https://golang.org/cl/230397">https://golang.org/cl/230397</a>: add (*Int).FillBytes
+    </p>
+  </dd>
+</dl><!-- math/big -->
+
 <dl id="net"><dt><a href="/pkg/net/">net</a></dt>
   <dd>
     <p><!-- CL 228645 -->
@@ -291,6 +439,14 @@
   </dd>
 </dl>
 
+<dl id="net/http"><dt><a href="/pkg/net/http/">net/http</a></dt>
+  <dd>
+    <p><!-- CL 231418 -->
+      TODO: <a href="https://golang.org/cl/231418">https://golang.org/cl/231418</a>: only support &#34;chunked&#34; in inbound Transfer-Encoding headers
+    </p>
+  </dd>
+</dl><!-- net/http -->
+
 <dl id="net/http/httputil"><dt><a href="/pkg/net/http/httputil/">net/http/httputil</a></dt>
   <dd>
     <p><!-- CL 230937 -->
@@ -299,6 +455,10 @@
       header when the incoming <code>Request.Header</code> map entry
       for that field is <code>nil</code>.
     </p>
+
+    <p><!-- CL 224897 -->
+      TODO: <a href="https://golang.org/cl/224897">https://golang.org/cl/224897</a>: make Switching Protocol requests (e.g. Websockets) cancelable
+    </p>
   </dd>
 </dl>
 
@@ -349,6 +509,19 @@
   </dd>
 </dl>
 
+<dl id="plugin"><dt><a href="/pkg/plugin/">plugin</a></dt>
+  <dd>
+    <p><!-- CL 182959 -->
+      DWARF generation is now supported (and enabled by default) for <code>-buildmode=plugin</code> on macOS.
+    </p>
+  </dd>
+  <dd>
+    <p><!-- CL 191617 -->
+      Building with <code>-buildmode=plugin</code> is now supported on <code>freebsd/amd64</code>.
+    </p>
+  </dd>
+</dl>
+
 <dl id="reflect"><dt><a href="/pkg/reflect/">reflect</a></dt>
   <dd>
     <p><!-- CL 228902 -->
@@ -361,6 +534,16 @@
   </dd>
 </dl>
 
+<dl id="regexp"><dt><a href="/pkg/regexp/">regexp</a></dt>
+  <dd>
+    <p><!-- CL 187919 -->
+      The new <a href="/pkg/regexp/#Regexp.SubexpIndex"><code>Regexp.SubexpIndex</code></a>
+      method returns the index of the first subexpression with the given name
+      within the regular expression.
+    </p>
+  </dd>
+</dl><!-- regexp -->
+
 <dl id="pkg-runtime"><dt><a href="/pkg/runtime/">runtime</a></dt>
   <dd>
     <p><!-- CL 221779 -->
@@ -369,6 +552,7 @@
       <code>int</code>, <code>int8</code>, <code>int16</code>, <code>int32</code>, <code>int64</code>, <code>string</code>,
       <code>uint</code>, <code>uint8</code>, <code>uint16</code>, <code>uint32</code>, <code>uint64</code>, <code>uintptr</code>,
       then the value will be printed, instead of just its address.
+      Previously, this was only true for values of exactly these types.
     </p>
 
     <p><!-- CL -->
@@ -381,6 +565,24 @@
       the Go program will now reliably crash with a stack trace.
       In earlier releases the behavior was unpredictable.
     </p>
+
+    <p><!-- CL 216557 -->
+      Several functions, including
+      <a href="/pkg/runtime/#ReadMemStats"><code>ReadMemStats</code></a>
+      and
+      <a href="/pkg/runtime/#GoroutineProfile"><code>GoroutineProfile</code></a>,
+      no longer block if a garbage collection is in progress.
+    </p>
+
+    <p><!-- CL 216401 -->
+      Converting small integer values into an interface value no
+      longer causes allocation.
+    </p>
+
+    <p><!-- CL 216818 -->
+      Non-blocking receives on closed channels now perform as well as
+      non-blocking receives on open channels.
+    </p>
   </dd>
 </dl>
 
@@ -394,6 +596,20 @@
   </dd>
 </dl>
 
+<dl id="strconv"><dt><a href="/pkg/strconv/">strconv</a></dt>
+  <dd>
+    <p><!-- CL 216617 -->
+      <a href="/pkg/strconv/#FormatComplex"><code>FormatComplex</code></a> and <a href="/pkg/strconv/#ParseComplex"><code>ParseComplex</code></a> are added for working with complex numbers.
+    </p>
+    <p>
+      <a href="/pkg/strconv/#FormatComplex"><code>FormatComplex</code></a> converts a complex number into a string of the form (a+bi), where a and b are the real and imaginary parts.
+    </p>
+    <p>
+      <a href="/pkg/strconv/#ParseComplex"><code>ParseComplex</code></a> converts a string into a complex number of a specificed precision. <code>ParseComplex</code> accepts complex numbers in the format <code>N+Ni</code>.
+    </p>
+  </dd>
+</dl><!-- strconv -->
+
 <dl id="sync"><dt><a href="/pkg/sync/">sync</a></dt>
   <dd>
     <p><!-- CL 205899, golang.org/issue/33762 -->
@@ -427,6 +643,12 @@
       Some programs that set <code>Setctty</code> will need to change
       the value of <code>Ctty</code> to use a child descriptor number.
     </p>
+
+    <p><!-- CL 220578 -->
+      It is <a href="/pkg/syscall/#Proc.Call">now possible</a> to call
+      system calls that return floating point values
+      on <code>windows/amd64</code>.
+    </p>
   </dd>
 </dl>
 
@@ -463,5 +685,9 @@
        <a href="/pkg/time/#Ticker.Reset"><code>Ticker.Reset</code></a>
        supports changing the duration of a ticker.
     </p>
+
+    <p><!-- CL 227878 -->
+      When returning an error, <a href="/pkg/time/#ParseDuration"><code>ParseDuration</code></a> now quotes the original value.
+    </p>
   </dd>
 </dl><!-- time -->
diff --git a/misc/cgo/test/testdata/issue27054/egl.h b/misc/cgo/test/testdata/issue27054/egl.h
index 33a759e..3079627 100644
--- a/misc/cgo/test/testdata/issue27054/egl.h
+++ b/misc/cgo/test/testdata/issue27054/egl.h
@@ -5,3 +5,4 @@
 // This is the relevant part of EGL/egl.h.
 
 typedef void *EGLDisplay;
+typedef void *EGLConfig;
diff --git a/misc/cgo/test/testdata/issue27054/test27054.go b/misc/cgo/test/testdata/issue27054/test27054.go
index 186f5bd..01bf43a 100644
--- a/misc/cgo/test/testdata/issue27054/test27054.go
+++ b/misc/cgo/test/testdata/issue27054/test27054.go
@@ -13,5 +13,9 @@
 )
 
 func Test27054(t *testing.T) {
-	var _ C.EGLDisplay = 0 // Note: 0, not nil. That makes sure we use uintptr for this type.
+	var (
+		// Note: 0, not nil. That makes sure we use uintptr for these types.
+		_ C.EGLDisplay = 0
+		_ C.EGLConfig  = 0
+	)
 }
diff --git a/misc/cgo/testplugin/plugin_test.go b/misc/cgo/testplugin/plugin_test.go
index ab98f61..2875271 100644
--- a/misc/cgo/testplugin/plugin_test.go
+++ b/misc/cgo/testplugin/plugin_test.go
@@ -32,7 +32,7 @@
 }
 
 func testMain(m *testing.M) int {
-	// Copy testdata into GOPATH/src/testarchive, along with a go.mod file
+	// Copy testdata into GOPATH/src/testplugin, along with a go.mod file
 	// declaring the same path.
 
 	GOPATH, err := ioutil.TempDir("", "plugin_test")
diff --git a/src/cmd/asm/doc.go b/src/cmd/asm/doc.go
index 8bf0aca..4a0c785 100644
--- a/src/cmd/asm/doc.go
+++ b/src/cmd/asm/doc.go
@@ -33,14 +33,17 @@
 		Dump instructions as they are parsed.
 	-dynlink
 		Support references to Go symbols defined in other shared libraries.
+	-gensymabis
+		Write symbol ABI information to output file. Don't assemble.
 	-o file
 		Write output to file. The default is foo.o for /a/b/c/foo.s.
 	-shared
 		Generate code that can be linked into a shared library.
+	-spectre list
+		Enable spectre mitigations in list (all, ret).
 	-trimpath prefix
 		Remove prefix from recorded source file paths.
-	-gensymabis
-		Write symbol ABI information to output file. Don't assemble.
+
 Input language:
 
 The assembler uses mostly the same syntax for all architectures,
diff --git a/src/cmd/cgo/doc.go b/src/cmd/cgo/doc.go
index 8c3bf81..4366df4 100644
--- a/src/cmd/cgo/doc.go
+++ b/src/cmd/cgo/doc.go
@@ -413,7 +413,7 @@
 	jobjectArray
 	jweak
 
-3. The EGLDisplay type from the EGL API.
+3. The EGLDisplay and EGLConfig types from the EGL API.
 
 These types are uintptr on the Go side because they would otherwise
 confuse the Go garbage collector; they are sometimes not really
@@ -429,11 +429,16 @@
 
 It will replace nil with 0 in the appropriate places.
 
-The EGLDisplay case were introduced in Go 1.12. Use the egl rewrite
+The EGLDisplay case was introduced in Go 1.12. Use the egl rewrite
 to auto-update code from Go 1.11 and earlier:
 
 	go tool fix -r egl <pkg>
 
+The EGLConfig case was introduced in Go 1.15. Use the eglconf rewrite
+to auto-update code from Go 1.14 and earlier:
+
+	go tool fix -r eglconf <pkg>
+
 Using cgo directly
 
 Usage:
diff --git a/src/cmd/cgo/gcc.go b/src/cmd/cgo/gcc.go
index edcbd8d..d903a7a 100644
--- a/src/cmd/cgo/gcc.go
+++ b/src/cmd/cgo/gcc.go
@@ -3029,7 +3029,7 @@
 	if c.badJNI(dt) {
 		return true
 	}
-	if c.badEGLDisplay(dt) {
+	if c.badEGLType(dt) {
 		return true
 	}
 	return false
@@ -3168,11 +3168,11 @@
 	return false
 }
 
-func (c *typeConv) badEGLDisplay(dt *dwarf.TypedefType) bool {
-	if dt.Name != "EGLDisplay" {
+func (c *typeConv) badEGLType(dt *dwarf.TypedefType) bool {
+	if dt.Name != "EGLDisplay" && dt.Name != "EGLConfig" {
 		return false
 	}
-	// Check that the typedef is "typedef void *EGLDisplay".
+	// Check that the typedef is "typedef void *<name>".
 	if ptr, ok := dt.Type.(*dwarf.PtrType); ok {
 		if _, ok := ptr.Type.(*dwarf.VoidType); ok {
 			return true
diff --git a/src/cmd/compile/doc.go b/src/cmd/compile/doc.go
index 36dd4bb..46d47220 100644
--- a/src/cmd/compile/doc.go
+++ b/src/cmd/compile/doc.go
@@ -107,6 +107,8 @@
 		Warn about composite literals that can be simplified.
 	-shared
 		Generate code that can be linked into a shared library.
+	-spectre list
+		Enable spectre mitigations in list (all, index, ret).
 	-traceprofile file
 		Write an execution trace to file.
 	-trimpath prefix
diff --git a/src/cmd/compile/internal/arm64/ssa.go b/src/cmd/compile/internal/arm64/ssa.go
index 709253b..e2a12f3 100644
--- a/src/cmd/compile/internal/arm64/ssa.go
+++ b/src/cmd/compile/internal/arm64/ssa.go
@@ -978,28 +978,28 @@
 var blockJump = map[ssa.BlockKind]struct {
 	asm, invasm obj.As
 }{
-	ssa.BlockARM64EQ:   {arm64.ABEQ, arm64.ABNE},
-	ssa.BlockARM64NE:   {arm64.ABNE, arm64.ABEQ},
-	ssa.BlockARM64LT:   {arm64.ABLT, arm64.ABGE},
-	ssa.BlockARM64GE:   {arm64.ABGE, arm64.ABLT},
-	ssa.BlockARM64LE:   {arm64.ABLE, arm64.ABGT},
-	ssa.BlockARM64GT:   {arm64.ABGT, arm64.ABLE},
-	ssa.BlockARM64ULT:  {arm64.ABLO, arm64.ABHS},
-	ssa.BlockARM64UGE:  {arm64.ABHS, arm64.ABLO},
-	ssa.BlockARM64UGT:  {arm64.ABHI, arm64.ABLS},
-	ssa.BlockARM64ULE:  {arm64.ABLS, arm64.ABHI},
-	ssa.BlockARM64Z:    {arm64.ACBZ, arm64.ACBNZ},
-	ssa.BlockARM64NZ:   {arm64.ACBNZ, arm64.ACBZ},
-	ssa.BlockARM64ZW:   {arm64.ACBZW, arm64.ACBNZW},
-	ssa.BlockARM64NZW:  {arm64.ACBNZW, arm64.ACBZW},
-	ssa.BlockARM64TBZ:  {arm64.ATBZ, arm64.ATBNZ},
-	ssa.BlockARM64TBNZ: {arm64.ATBNZ, arm64.ATBZ},
-	ssa.BlockARM64FLT:  {arm64.ABMI, arm64.ABPL},
-	ssa.BlockARM64FGE:  {arm64.ABGE, arm64.ABLT},
-	ssa.BlockARM64FLE:  {arm64.ABLS, arm64.ABHI},
-	ssa.BlockARM64FGT:  {arm64.ABGT, arm64.ABLE},
-	ssa.BlockARM64LTnoov:{arm64.ABMI, arm64.ABPL},
-	ssa.BlockARM64GEnoov:{arm64.ABPL, arm64.ABMI},
+	ssa.BlockARM64EQ:     {arm64.ABEQ, arm64.ABNE},
+	ssa.BlockARM64NE:     {arm64.ABNE, arm64.ABEQ},
+	ssa.BlockARM64LT:     {arm64.ABLT, arm64.ABGE},
+	ssa.BlockARM64GE:     {arm64.ABGE, arm64.ABLT},
+	ssa.BlockARM64LE:     {arm64.ABLE, arm64.ABGT},
+	ssa.BlockARM64GT:     {arm64.ABGT, arm64.ABLE},
+	ssa.BlockARM64ULT:    {arm64.ABLO, arm64.ABHS},
+	ssa.BlockARM64UGE:    {arm64.ABHS, arm64.ABLO},
+	ssa.BlockARM64UGT:    {arm64.ABHI, arm64.ABLS},
+	ssa.BlockARM64ULE:    {arm64.ABLS, arm64.ABHI},
+	ssa.BlockARM64Z:      {arm64.ACBZ, arm64.ACBNZ},
+	ssa.BlockARM64NZ:     {arm64.ACBNZ, arm64.ACBZ},
+	ssa.BlockARM64ZW:     {arm64.ACBZW, arm64.ACBNZW},
+	ssa.BlockARM64NZW:    {arm64.ACBNZW, arm64.ACBZW},
+	ssa.BlockARM64TBZ:    {arm64.ATBZ, arm64.ATBNZ},
+	ssa.BlockARM64TBNZ:   {arm64.ATBNZ, arm64.ATBZ},
+	ssa.BlockARM64FLT:    {arm64.ABMI, arm64.ABPL},
+	ssa.BlockARM64FGE:    {arm64.ABGE, arm64.ABLT},
+	ssa.BlockARM64FLE:    {arm64.ABLS, arm64.ABHI},
+	ssa.BlockARM64FGT:    {arm64.ABGT, arm64.ABLE},
+	ssa.BlockARM64LTnoov: {arm64.ABMI, arm64.ABPL},
+	ssa.BlockARM64GEnoov: {arm64.ABPL, arm64.ABMI},
 }
 
 // To model a 'LEnoov' ('<=' without overflow checking) branching
diff --git a/src/cmd/compile/internal/gc/alg.go b/src/cmd/compile/internal/gc/alg.go
index 835e7e7..ecbed1a 100644
--- a/src/cmd/compile/internal/gc/alg.go
+++ b/src/cmd/compile/internal/gc/alg.go
@@ -591,24 +591,6 @@
 		}
 
 		switch t.Elem().Etype {
-		case TINTER:
-			// Do two loops. First, check that all the types match (cheap).
-			// Second, check that all the data match (expensive).
-			// TODO: when the array size is small, unroll the tab match checks.
-			checkAll(3, func(pi, qi *Node) *Node {
-				// Compare types.
-				pi = typecheck(pi, ctxExpr)
-				qi = typecheck(qi, ctxExpr)
-				eqtab, _ := eqinterface(pi, qi)
-				return eqtab
-			})
-			checkAll(1, func(pi, qi *Node) *Node {
-				// Compare data.
-				pi = typecheck(pi, ctxExpr)
-				qi = typecheck(qi, ctxExpr)
-				_, eqdata := eqinterface(pi, qi)
-				return eqdata
-			})
 		case TSTRING:
 			// Do two loops. First, check that all the lengths match (cheap).
 			// Second, check that all the contents match (expensive).
@@ -672,14 +654,6 @@
 					eqlen, eqmem := eqstring(p, q)
 					and(eqlen)
 					and(eqmem)
-				case f.Type.IsInterface():
-					p.Type = f.Type
-					p = typecheck(p, ctxExpr)
-					q.Type = f.Type
-					q = typecheck(q, ctxExpr)
-					eqtab, eqdata := eqinterface(p, q)
-					and(eqtab)
-					and(eqdata)
 				default:
 					and(nod(OEQ, p, q))
 				}
diff --git a/src/cmd/compile/internal/gc/gsubr.go b/src/cmd/compile/internal/gc/gsubr.go
index bb1393a..336e870 100644
--- a/src/cmd/compile/internal/gc/gsubr.go
+++ b/src/cmd/compile/internal/gc/gsubr.go
@@ -1,5 +1,5 @@
 // Derived from Inferno utils/6c/txt.c
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/6c/txt.c
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/6c/txt.c
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
diff --git a/src/cmd/compile/internal/gc/reproduciblebuilds_test.go b/src/cmd/compile/internal/gc/reproduciblebuilds_test.go
index 59d1edb..8101e44 100644
--- a/src/cmd/compile/internal/gc/reproduciblebuilds_test.go
+++ b/src/cmd/compile/internal/gc/reproduciblebuilds_test.go
@@ -60,3 +60,53 @@
 		})
 	}
 }
+
+func TestIssue38068(t *testing.T) {
+	testenv.MustHaveGoBuild(t)
+	t.Parallel()
+
+	// Compile a small package with and without the concurrent
+	// backend, then check to make sure that the resulting archives
+	// are identical.  Note: this uses "go tool compile" instead of
+	// "go build" since the latter will generate differnent build IDs
+	// if it sees different command line flags.
+	scenarios := []struct {
+		tag     string
+		args    string
+		libpath string
+	}{
+		{tag: "serial", args: "-c=1"},
+		{tag: "concurrent", args: "-c=2"}}
+
+	tmpdir, err := ioutil.TempDir("", "TestIssue38068")
+	if err != nil {
+		t.Fatal(err)
+	}
+	defer os.RemoveAll(tmpdir)
+
+	src := filepath.Join("testdata", "reproducible", "issue38068.go")
+	for i := range scenarios {
+		s := &scenarios[i]
+		s.libpath = filepath.Join(tmpdir, s.tag+".a")
+		// Note: use of "-p" required in order for DWARF to be generated.
+		cmd := exec.Command(testenv.GoToolPath(t), "tool", "compile", "-trimpath", "-p=issue38068", "-buildid=", s.args, "-o", s.libpath, src)
+		out, err := cmd.CombinedOutput()
+		if err != nil {
+			t.Fatalf("%v: %v:\n%s", cmd.Args, err, out)
+		}
+	}
+
+	readBytes := func(fn string) []byte {
+		payload, err := ioutil.ReadFile(fn)
+		if err != nil {
+			t.Fatalf("failed to read executable '%s': %v", fn, err)
+		}
+		return payload
+	}
+
+	b1 := readBytes(scenarios[0].libpath)
+	b2 := readBytes(scenarios[1].libpath)
+	if !bytes.Equal(b1, b2) {
+		t.Fatalf("concurrent and serial builds produced different output")
+	}
+}
diff --git a/src/cmd/compile/internal/gc/testdata/reproducible/issue38068.go b/src/cmd/compile/internal/gc/testdata/reproducible/issue38068.go
new file mode 100644
index 0000000..db5ca7d
--- /dev/null
+++ b/src/cmd/compile/internal/gc/testdata/reproducible/issue38068.go
@@ -0,0 +1,70 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package issue38068
+
+// A type with a couple of inlinable, non-pointer-receiver methods
+// that have params and local variables.
+type A struct {
+	s    string
+	next *A
+	prev *A
+}
+
+// Inlinable, value-received method with locals and parms.
+func (a A) double(x string, y int) string {
+	if y == 191 {
+		a.s = ""
+	}
+	q := a.s + "a"
+	r := a.s + "b"
+	return q + r
+}
+
+// Inlinable, value-received method with locals and parms.
+func (a A) triple(x string, y int) string {
+	q := a.s
+	if y == 998877 {
+		a.s = x
+	}
+	r := a.s + a.s
+	return q + r
+}
+
+type methods struct {
+	m1 func(a *A, x string, y int) string
+	m2 func(a *A, x string, y int) string
+}
+
+// Now a function that makes references to the methods via pointers,
+// which should trigger the wrapper generation.
+func P(a *A, ms *methods) {
+	if a != nil {
+		defer func() { println("done") }()
+	}
+	println(ms.m1(a, "a", 2))
+	println(ms.m2(a, "b", 3))
+}
+
+func G(x *A, n int) {
+	if n <= 0 {
+		println(n)
+		return
+	}
+	// Address-taken local of type A, which will insure that the
+	// compiler's dtypesym() routine will create a method wrapper.
+	var a, b A
+	a.next = x
+	a.prev = &b
+	x = &a
+	G(x, n-2)
+}
+
+var M methods
+
+func F() {
+	M.m1 = (*A).double
+	M.m2 = (*A).triple
+	G(nil, 100)
+}
diff --git a/src/cmd/compile/internal/ssa/rewriteCond_test.go b/src/cmd/compile/internal/ssa/rewriteCond_test.go
index b8feff7..6536d3a 100644
--- a/src/cmd/compile/internal/ssa/rewriteCond_test.go
+++ b/src/cmd/compile/internal/ssa/rewriteCond_test.go
@@ -7,8 +7,8 @@
 import (
 	"math"
 	"math/rand"
-	"testing"
 	"runtime"
+	"testing"
 )
 
 var (
diff --git a/src/cmd/fix/egltype.go b/src/cmd/fix/egltype.go
index c8c4f03..cb0f7a7 100644
--- a/src/cmd/fix/egltype.go
+++ b/src/cmd/fix/egltype.go
@@ -9,13 +9,14 @@
 )
 
 func init() {
-	register(eglFix)
+	register(eglFixDisplay)
+	register(eglFixConfig)
 }
 
-var eglFix = fix{
+var eglFixDisplay = fix{
 	name:     "egl",
 	date:     "2018-12-15",
-	f:        eglfix,
+	f:        eglfixDisp,
 	desc:     `Fixes initializers of EGLDisplay`,
 	disabled: false,
 }
@@ -25,8 +26,27 @@
 // New state:
 //   type EGLDisplay uintptr
 // This fix finds nils initializing these types and replaces the nils with 0s.
-func eglfix(f *ast.File) bool {
+func eglfixDisp(f *ast.File) bool {
 	return typefix(f, func(s string) bool {
 		return s == "C.EGLDisplay"
 	})
 }
+
+var eglFixConfig = fix{
+	name:     "eglconf",
+	date:     "2020-05-30",
+	f:        eglfixConfig,
+	desc:     `Fixes initializers of EGLConfig`,
+	disabled: false,
+}
+
+// Old state:
+//   type EGLConfig unsafe.Pointer
+// New state:
+//   type EGLConfig uintptr
+// This fix finds nils initializing these types and replaces the nils with 0s.
+func eglfixConfig(f *ast.File) bool {
+	return typefix(f, func(s string) bool {
+		return s == "C.EGLConfig"
+	})
+}
diff --git a/src/cmd/fix/egltype_test.go b/src/cmd/fix/egltype_test.go
index 35ffe92..9b64a7c 100644
--- a/src/cmd/fix/egltype_test.go
+++ b/src/cmd/fix/egltype_test.go
@@ -4,182 +4,193 @@
 
 package main
 
+import "strings"
+
 func init() {
-	addTestCases(eglTests, eglfix)
+	addTestCases(eglTestsFor("EGLDisplay"), eglfixDisp)
+	addTestCases(eglTestsFor("EGLConfig"), eglfixConfig)
 }
 
-var eglTests = []testCase{
-	{
-		Name: "egl.localVariable",
-		In: `package main
+func eglTestsFor(tname string) []testCase {
+	var eglTests = []testCase{
+		{
+			Name: "egl.localVariable",
+			In: `package main
 
 import "C"
 
 func f() {
-	var x C.EGLDisplay = nil
+	var x C.$EGLTYPE = nil
 	x = nil
 	x, x = nil, nil
 }
 `,
-		Out: `package main
+			Out: `package main
 
 import "C"
 
 func f() {
-	var x C.EGLDisplay = 0
+	var x C.$EGLTYPE = 0
 	x = 0
 	x, x = 0, 0
 }
 `,
-	},
-	{
-		Name: "egl.globalVariable",
-		In: `package main
+		},
+		{
+			Name: "egl.globalVariable",
+			In: `package main
 
 import "C"
 
-var x C.EGLDisplay = nil
+var x C.$EGLTYPE = nil
 
 func f() {
 	x = nil
 }
 `,
-		Out: `package main
+			Out: `package main
 
 import "C"
 
-var x C.EGLDisplay = 0
+var x C.$EGLTYPE = 0
 
 func f() {
 	x = 0
 }
 `,
-	},
-	{
-		Name: "egl.EqualArgument",
-		In: `package main
+		},
+		{
+			Name: "egl.EqualArgument",
+			In: `package main
 
 import "C"
 
-var x C.EGLDisplay
+var x C.$EGLTYPE
 var y = x == nil
 var z = x != nil
 `,
-		Out: `package main
+			Out: `package main
 
 import "C"
 
-var x C.EGLDisplay
+var x C.$EGLTYPE
 var y = x == 0
 var z = x != 0
 `,
-	},
-	{
-		Name: "egl.StructField",
-		In: `package main
+		},
+		{
+			Name: "egl.StructField",
+			In: `package main
 
 import "C"
 
 type T struct {
-	x C.EGLDisplay
+	x C.$EGLTYPE
 }
 
 var t = T{x: nil}
 `,
-		Out: `package main
+			Out: `package main
 
 import "C"
 
 type T struct {
-	x C.EGLDisplay
+	x C.$EGLTYPE
 }
 
 var t = T{x: 0}
 `,
-	},
-	{
-		Name: "egl.FunctionArgument",
-		In: `package main
+		},
+		{
+			Name: "egl.FunctionArgument",
+			In: `package main
 
 import "C"
 
-func f(x C.EGLDisplay) {
+func f(x C.$EGLTYPE) {
 }
 
 func g() {
 	f(nil)
 }
 `,
-		Out: `package main
+			Out: `package main
 
 import "C"
 
-func f(x C.EGLDisplay) {
+func f(x C.$EGLTYPE) {
 }
 
 func g() {
 	f(0)
 }
 `,
-	},
-	{
-		Name: "egl.ArrayElement",
-		In: `package main
+		},
+		{
+			Name: "egl.ArrayElement",
+			In: `package main
 
 import "C"
 
-var x = [3]C.EGLDisplay{nil, nil, nil}
+var x = [3]C.$EGLTYPE{nil, nil, nil}
 `,
-		Out: `package main
+			Out: `package main
 
 import "C"
 
-var x = [3]C.EGLDisplay{0, 0, 0}
+var x = [3]C.$EGLTYPE{0, 0, 0}
 `,
-	},
-	{
-		Name: "egl.SliceElement",
-		In: `package main
+		},
+		{
+			Name: "egl.SliceElement",
+			In: `package main
 
 import "C"
 
-var x = []C.EGLDisplay{nil, nil, nil}
+var x = []C.$EGLTYPE{nil, nil, nil}
 `,
-		Out: `package main
+			Out: `package main
 
 import "C"
 
-var x = []C.EGLDisplay{0, 0, 0}
+var x = []C.$EGLTYPE{0, 0, 0}
 `,
-	},
-	{
-		Name: "egl.MapKey",
-		In: `package main
+		},
+		{
+			Name: "egl.MapKey",
+			In: `package main
 
 import "C"
 
-var x = map[C.EGLDisplay]int{nil: 0}
+var x = map[C.$EGLTYPE]int{nil: 0}
 `,
-		Out: `package main
+			Out: `package main
 
 import "C"
 
-var x = map[C.EGLDisplay]int{0: 0}
+var x = map[C.$EGLTYPE]int{0: 0}
 `,
-	},
-	{
-		Name: "egl.MapValue",
-		In: `package main
+		},
+		{
+			Name: "egl.MapValue",
+			In: `package main
 
 import "C"
 
-var x = map[int]C.EGLDisplay{0: nil}
+var x = map[int]C.$EGLTYPE{0: nil}
 `,
-		Out: `package main
+			Out: `package main
 
 import "C"
 
-var x = map[int]C.EGLDisplay{0: 0}
+var x = map[int]C.$EGLTYPE{0: 0}
 `,
-	},
+		},
+	}
+	for i := range eglTests {
+		t := &eglTests[i]
+		t.In = strings.ReplaceAll(t.In, "$EGLTYPE", tname)
+		t.Out = strings.ReplaceAll(t.Out, "$EGLTYPE", tname)
+	}
+	return eglTests
 }
diff --git a/src/cmd/go.mod b/src/cmd/go.mod
index d56dde8..c25ae38 100644
--- a/src/cmd/go.mod
+++ b/src/cmd/go.mod
@@ -9,5 +9,5 @@
 	golang.org/x/crypto v0.0.0-20200429183012-4b2356b1ed79
 	golang.org/x/mod v0.3.0
 	golang.org/x/sys v0.0.0-20200501145240-bc7a7d42d5c3 // indirect
-	golang.org/x/tools v0.0.0-20200504152539-33427f1b0364
+	golang.org/x/tools v0.0.0-20200601175630-2caf76543d99
 )
diff --git a/src/cmd/go.sum b/src/cmd/go.sum
index 922df77..067315a 100644
--- a/src/cmd/go.sum
+++ b/src/cmd/go.sum
@@ -28,8 +28,8 @@
 golang.org/x/sys v0.0.0-20200501145240-bc7a7d42d5c3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
 golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20200504152539-33427f1b0364 h1:B3dlRmcq+I6Bd22nHKKa7E+r0/6mLEoJQa75WjfILUE=
-golang.org/x/tools v0.0.0-20200504152539-33427f1b0364/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
+golang.org/x/tools v0.0.0-20200601175630-2caf76543d99 h1:deddXmhOJb/bvD/4M/j2AUMrhHeh6GkqykJSCWyTNVk=
+golang.org/x/tools v0.0.0-20200601175630-2caf76543d99/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
 golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
 golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
 golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
diff --git a/src/cmd/go/alldocs.go b/src/cmd/go/alldocs.go
index fdeef65..2316fb9 100644
--- a/src/cmd/go/alldocs.go
+++ b/src/cmd/go/alldocs.go
@@ -1480,56 +1480,91 @@
 //
 // Build constraints
 //
-// Build constraints describe the conditions under which each source file
-// should be included in the corresponding package. Build constraints
-// for a given source file may be added by build constraint comments
-// within the file, or by specific patterns in the file's name.
-//
-// A build constraint comment appears before the file's package clause and
-// must be separated from the package clause by at least one blank line.
-// The comment begins with:
+// A build constraint, also known as a build tag, is a line comment that begins
 //
 // 	// +build
 //
-// and follows with a space-separated list of options on the same line.
-// The constraint is evaluated as the OR of the options.
+// that lists the conditions under which a file should be included in the package.
+// Constraints may appear in any kind of source file (not just Go), but
+// they must appear near the top of the file, preceded
+// only by blank lines and other line comments. These rules mean that in Go
+// files a build constraint must appear before the package clause.
+//
+// To distinguish build constraints from package documentation, a series of
+// build constraints must be followed by a blank line.
+//
+// A build constraint is evaluated as the OR of space-separated options.
 // Each option evaluates as the AND of its comma-separated terms.
 // Each term consists of letters, digits, underscores, and dots.
-// Each term may be negated with a leading exclamation point.
-//
+// A term may be negated with a preceding !.
 // For example, the build constraint:
 //
-// 	// +build linux,386 darwin,!cgo arm
+// 	// +build linux,386 darwin,!cgo
 //
-// corresponds to boolean formula:
+// corresponds to the boolean formula:
 //
-// 	(linux AND 386) OR (darwin AND NOT cgo) OR arm
+// 	(linux AND 386) OR (darwin AND (NOT cgo))
 //
-// During a particular build, the following terms are satisfied:
-// - the target operating system and architecture, as spelled by
-//   runtime.GOOS and runtime.GOARCH respectively
-// - the compiler being used, either "gc" or "gccgo"
-// - "cgo", if the cgo command is supported
-//   (see CGO_ENABLED in 'go help environment')
-// - a term for each Go major release, through the current version:
-//   "go1.1" from Go version 1.1 onward,
-//   "go1.2" from Go version 1.2 onward, and so on
-// - and any additional tags given by the '-tags' flag (see 'go help build').
+// A file may have multiple build constraints. The overall constraint is the AND
+// of the individual constraints. That is, the build constraints:
 //
-// An additional build constraint may be derived from the source file name.
+// 	// +build linux darwin
+// 	// +build amd64
+//
+// corresponds to the boolean formula:
+//
+// 	(linux OR darwin) AND amd64
+//
+// During a particular build, the following words are satisfied:
+//
+// 	- the target operating system, as spelled by runtime.GOOS, set with the
+// 	  GOOS environment variable.
+// 	- the target architecture, as spelled by runtime.GOARCH, set with the
+// 	  GOARCH environment variable.
+// 	- the compiler being used, either "gc" or "gccgo"
+// 	- "cgo", if the cgo command is supported (see CGO_ENABLED in
+// 	  'go help environment').
+// 	- a term for each Go major release, through the current version:
+// 	  "go1.1" from Go version 1.1 onward, "go1.12" from Go 1.12, and so on.
+// 	- any additional tags given by the -tags flag (see 'go help build').
+//
+// There are no separate build tags for beta or minor releases.
+//
 // If a file's name, after stripping the extension and a possible _test suffix,
-// matches the patterns *_GOOS, *_GOARCH, or *_GOOS_GOARCH for any known
-// GOOS or GOARCH value, then the file is implicitly constrained to that
-// specific GOOS and/or GOARCH, in addition to any other build constraints
-// declared as comments within the file.
+// matches any of the following patterns:
+// 	*_GOOS
+// 	*_GOARCH
+// 	*_GOOS_GOARCH
+// (example: source_windows_amd64.go) where GOOS and GOARCH represent
+// any known operating system and architecture values respectively, then
+// the file is considered to have an implicit build constraint requiring
+// those terms (in addition to any explicit constraints in the file).
 //
-// For example, the file:
+// Using GOOS=android matches build tags and files as for GOOS=linux
+// in addition to android tags and files.
 //
-// 	source_windows_amd64.go
+// Using GOOS=illumos matches build tags and files as for GOOS=solaris
+// in addition to illumos tags and files.
 //
-// is implicitly constrained to windows / amd64.
+// To keep a file from being considered for the build:
 //
-// See 'go doc go/build' for more details.
+// 	// +build ignore
+//
+// (any other unsatisfied word will work as well, but "ignore" is conventional.)
+//
+// To build a file only when using cgo, and only on Linux and OS X:
+//
+// 	// +build linux,cgo darwin,cgo
+//
+// Such a file is usually paired with another file implementing the
+// default functionality for other systems, which in this case would
+// carry the constraint:
+//
+// 	// +build !linux,!darwin !cgo
+//
+// Naming a file dns_windows.go will cause it to be included only when
+// building the package for Windows; similarly, math_386.s will be included
+// only when building the package for 32-bit x86.
 //
 //
 // Build modes
diff --git a/src/cmd/go/internal/help/helpdoc.go b/src/cmd/go/internal/help/helpdoc.go
index 693de8f..b937a61 100644
--- a/src/cmd/go/internal/help/helpdoc.go
+++ b/src/cmd/go/internal/help/helpdoc.go
@@ -770,55 +770,90 @@
 	UsageLine: "buildconstraint",
 	Short:     "build constraints",
 	Long: `
-Build constraints describe the conditions under which each source file
-should be included in the corresponding package. Build constraints
-for a given source file may be added by build constraint comments
-within the file, or by specific patterns in the file's name.
-
-A build constraint comment appears before the file's package clause and
-must be separated from the package clause by at least one blank line.
-The comment begins with:
+A build constraint, also known as a build tag, is a line comment that begins
 
 	// +build
 
-and follows with a space-separated list of options on the same line.
-The constraint is evaluated as the OR of the options.
+that lists the conditions under which a file should be included in the package.
+Constraints may appear in any kind of source file (not just Go), but
+they must appear near the top of the file, preceded
+only by blank lines and other line comments. These rules mean that in Go
+files a build constraint must appear before the package clause.
+
+To distinguish build constraints from package documentation, a series of
+build constraints must be followed by a blank line.
+
+A build constraint is evaluated as the OR of space-separated options.
 Each option evaluates as the AND of its comma-separated terms.
 Each term consists of letters, digits, underscores, and dots.
-Each term may be negated with a leading exclamation point.
-
+A term may be negated with a preceding !.
 For example, the build constraint:
 
-	// +build linux,386 darwin,!cgo arm
+	// +build linux,386 darwin,!cgo
 
-corresponds to boolean formula:
+corresponds to the boolean formula:
 
-	(linux AND 386) OR (darwin AND NOT cgo) OR arm
+	(linux AND 386) OR (darwin AND (NOT cgo))
 
-During a particular build, the following terms are satisfied:
-- the target operating system and architecture, as spelled by
-  runtime.GOOS and runtime.GOARCH respectively
-- the compiler being used, either "gc" or "gccgo"
-- "cgo", if the cgo command is supported
-  (see CGO_ENABLED in 'go help environment')
-- a term for each Go major release, through the current version:
-  "go1.1" from Go version 1.1 onward,
-  "go1.2" from Go version 1.2 onward, and so on
-- and any additional tags given by the '-tags' flag (see 'go help build').
+A file may have multiple build constraints. The overall constraint is the AND
+of the individual constraints. That is, the build constraints:
 
-An additional build constraint may be derived from the source file name.
+	// +build linux darwin
+	// +build amd64
+
+corresponds to the boolean formula:
+
+	(linux OR darwin) AND amd64
+
+During a particular build, the following words are satisfied:
+
+	- the target operating system, as spelled by runtime.GOOS, set with the
+	  GOOS environment variable.
+	- the target architecture, as spelled by runtime.GOARCH, set with the
+	  GOARCH environment variable.
+	- the compiler being used, either "gc" or "gccgo"
+	- "cgo", if the cgo command is supported (see CGO_ENABLED in
+	  'go help environment').
+	- a term for each Go major release, through the current version:
+	  "go1.1" from Go version 1.1 onward, "go1.12" from Go 1.12, and so on.
+	- any additional tags given by the -tags flag (see 'go help build').
+
+There are no separate build tags for beta or minor releases.
+
 If a file's name, after stripping the extension and a possible _test suffix,
-matches the patterns *_GOOS, *_GOARCH, or *_GOOS_GOARCH for any known
-GOOS or GOARCH value, then the file is implicitly constrained to that
-specific GOOS and/or GOARCH, in addition to any other build constraints
-declared as comments within the file.
+matches any of the following patterns:
+	*_GOOS
+	*_GOARCH
+	*_GOOS_GOARCH
+(example: source_windows_amd64.go) where GOOS and GOARCH represent
+any known operating system and architecture values respectively, then
+the file is considered to have an implicit build constraint requiring
+those terms (in addition to any explicit constraints in the file).
 
-For example, the file:
+Using GOOS=android matches build tags and files as for GOOS=linux
+in addition to android tags and files.
 
-	source_windows_amd64.go
+Using GOOS=illumos matches build tags and files as for GOOS=solaris
+in addition to illumos tags and files.
 
-is implicitly constrained to windows / amd64.
+To keep a file from being considered for the build:
 
-See 'go doc go/build' for more details.
+	// +build ignore
+
+(any other unsatisfied word will work as well, but "ignore" is conventional.)
+
+To build a file only when using cgo, and only on Linux and OS X:
+
+	// +build linux,cgo darwin,cgo
+
+Such a file is usually paired with another file implementing the
+default functionality for other systems, which in this case would
+carry the constraint:
+
+	// +build !linux,!darwin !cgo
+
+Naming a file dns_windows.go will cause it to be included only when
+building the package for Windows; similarly, math_386.s will be included
+only when building the package for 32-bit x86.
 `,
 }
diff --git a/src/cmd/go/internal/modload/mvs.go b/src/cmd/go/internal/modload/mvs.go
index a4bdf3e..5dd009d 100644
--- a/src/cmd/go/internal/modload/mvs.go
+++ b/src/cmd/go/internal/modload/mvs.go
@@ -157,6 +157,12 @@
 	return r.modFileToList(f), nil
 }
 
+// Max returns the maximum of v1 and v2 according to semver.Compare.
+//
+// As a special case, the version "" is considered higher than all other
+// versions. The main module (also known as the target) has no version and must
+// be chosen over other versions of the same module in the module dependency
+// graph.
 func (*mvsReqs) Max(v1, v2 string) string {
 	if v1 != "" && semver.Compare(v1, v2) == -1 {
 		return v2
diff --git a/src/cmd/go/internal/mvs/mvs.go b/src/cmd/go/internal/mvs/mvs.go
index dd3b3cc..1f8eaa1 100644
--- a/src/cmd/go/internal/mvs/mvs.go
+++ b/src/cmd/go/internal/mvs/mvs.go
@@ -115,7 +115,21 @@
 }
 
 // BuildList returns the build list for the target module.
-// The first element is the target itself, with the remainder of the list sorted by path.
+//
+// target is the root vertex of a module requirement graph. For cmd/go, this is
+// typically the main module, but note that this algorithm is not intended to
+// be Go-specific: module paths and versions are treated as opaque values.
+//
+// reqs describes the module requirement graph and provides an opaque method
+// for comparing versions.
+//
+// BuildList traverses the graph and returns a list containing the highest
+// version for each visited module. The first element of the returned list is
+// target itself; reqs.Max requires target.Version to compare higher than all
+// other versions, so no other version can be selected. The remaining elements
+// of the list are sorted by path.
+//
+// See https://research.swtch.com/vgo-mvs for details.
 func BuildList(target module.Version, reqs Reqs) ([]module.Version, error) {
 	return buildList(target, reqs, nil)
 }
@@ -220,10 +234,9 @@
 	// The final list is the minimum version of each module found in the graph.
 
 	if v := min[target.Path]; v != target.Version {
-		// TODO(jayconrod): there is a special case in modload.mvsReqs.Max
-		// that prevents us from selecting a newer version of a module
-		// when the module has no version. This may only be the case for target.
-		// Should we always panic when target has a version?
+		// target.Version will be "" for modload, the main client of MVS.
+		// "" denotes the main module, which has no version. However, MVS treats
+		// version strings as opaque, so "" is not a special value here.
 		// See golang.org/issue/31491, golang.org/issue/29773.
 		panic(fmt.Sprintf("mistake: chose version %q instead of target %+v", v, target)) // TODO: Don't panic.
 	}
diff --git a/src/cmd/go/internal/work/security.go b/src/cmd/go/internal/work/security.go
index b5e4d46..3ee68ac 100644
--- a/src/cmd/go/internal/work/security.go
+++ b/src/cmd/go/internal/work/security.go
@@ -202,6 +202,7 @@
 	re(`-Wl,-undefined[=,]([^,@\-][^,]+)`),
 	re(`-Wl,-?-unresolved-symbols=[^,]+`),
 	re(`-Wl,--(no-)?warn-([^,]+)`),
+	re(`-Wl,-?-wrap[=,][^,@\-][^,]*`),
 	re(`-Wl,-z,(no)?execstack`),
 	re(`-Wl,-z,relro`),
 
diff --git a/src/cmd/go/testdata/script/test_chatty_parallel_success_sleepy.txt b/src/cmd/go/testdata/script/test_chatty_parallel_success_sleepy.txt
new file mode 100644
index 0000000..5952a87
--- /dev/null
+++ b/src/cmd/go/testdata/script/test_chatty_parallel_success_sleepy.txt
@@ -0,0 +1,39 @@
+# Run parallel chatty tests. Assert on CONT lines. This test makes sure that
+# multiple parallel outputs have the appropriate CONT lines between them.
+go test -parallel 3 chatty_parallel_test.go -v
+
+stdout '--- PASS: TestFast \([0-9.]{4}s\)\n=== CONT  TestSlow\n    chatty_parallel_test.go:31: this is the second TestSlow log\n--- PASS: TestSlow \([0-9.]{4}s\)'
+
+-- chatty_parallel_test.go --
+package chatty_paralell_test
+
+import (
+	"testing"
+	"time"
+)
+
+var (
+	run           = make(chan struct{})
+	afterFirstLog = make(chan struct{})
+	afterPass     = make(chan struct{})
+)
+
+func TestFast(t *testing.T) {
+	t.Parallel()
+
+	<-afterFirstLog
+	t.Cleanup(func() {
+		close(afterPass)
+	})
+}
+
+func TestSlow(t *testing.T) {
+	t.Parallel()
+
+	t.Logf("this is the first TestSlow log")
+	close(afterFirstLog)
+
+	<-afterPass
+	time.Sleep(100 * time.Millisecond)
+	t.Logf("this is the second TestSlow log")
+}
diff --git a/src/cmd/internal/goobj/goobj_test.go b/src/cmd/internal/goobj/goobj_test.go
index 4acd30e..4a4d35a 100644
--- a/src/cmd/internal/goobj/goobj_test.go
+++ b/src/cmd/internal/goobj/goobj_test.go
@@ -17,7 +17,6 @@
 	"os/exec"
 	"path/filepath"
 	"runtime"
-	"strings"
 	"testing"
 )
 
@@ -151,11 +150,6 @@
 	return nil
 }
 
-// Check that a symbol has a given name.
-func matchSymName(symname, want string) bool {
-	return strings.HasPrefix(symname, want+"#") // new style, with index
-}
-
 func TestParseGoobj(t *testing.T) {
 	path := go1obj
 
@@ -174,7 +168,7 @@
 	}
 	var found bool
 	for _, s := range p.Syms {
-		if matchSymName(s.Name, "mypkg.go1") {
+		if s.Name == "mypkg.go1" {
 			found = true
 			break
 		}
@@ -203,10 +197,10 @@
 	var found1 bool
 	var found2 bool
 	for _, s := range p.Syms {
-		if matchSymName(s.Name, "mypkg.go1") {
+		if s.Name == "mypkg.go1" {
 			found1 = true
 		}
-		if matchSymName(s.Name, "mypkg.go2") {
+		if s.Name == "mypkg.go2" {
 			found2 = true
 		}
 	}
@@ -239,10 +233,10 @@
 	var found1 bool
 	var found2 bool
 	for _, s := range p.Syms {
-		if matchSymName(s.Name, "mycgo.go1") {
+		if s.Name == "mycgo.go1" {
 			found1 = true
 		}
-		if matchSymName(s.Name, "mycgo.go2") {
+		if s.Name == "mycgo.go2" {
 			found2 = true
 		}
 	}
diff --git a/src/cmd/internal/goobj/readnew.go b/src/cmd/internal/goobj/readnew.go
index 43f0fda..cd1a904 100644
--- a/src/cmd/internal/goobj/readnew.go
+++ b/src/cmd/internal/goobj/readnew.go
@@ -7,7 +7,6 @@
 import (
 	"cmd/internal/goobj2"
 	"cmd/internal/objabi"
-	"fmt"
 	"strings"
 )
 
@@ -31,7 +30,13 @@
 		// Ignore fingerprint (for tools like objdump which only reads one object).
 	}
 
-	pkglist := rr.Pkglist()
+	// Name of referenced indexed symbols.
+	nrefName := rr.NRefName()
+	refNames := make(map[goobj2.SymRef]string, nrefName)
+	for i := 0; i < nrefName; i++ {
+		rn := rr.RefName(i)
+		refNames[rn.Sym()] = rn.Name(rr)
+	}
 
 	abiToVer := func(abi uint16) int64 {
 		var vers int64
@@ -58,10 +63,7 @@
 		case goobj2.PkgIdxSelf:
 			i = s.SymIdx
 		default:
-			// Symbol from other package, referenced by index.
-			// We don't know the name. Use index.
-			pkg := pkglist[p]
-			return SymID{fmt.Sprintf("%s.#%d", pkg, s.SymIdx), 0}
+			return SymID{refNames[s], 0}
 		}
 		sym := rr.Sym(i)
 		return SymID{sym.Name(rr), abiToVer(sym.ABI())}
@@ -72,7 +74,6 @@
 	// Symbols
 	pcdataBase := start + rr.PcdataBase()
 	n := uint32(rr.NSym() + rr.NNonpkgdef() + rr.NNonpkgref())
-	npkgdef := uint32(rr.NSym())
 	ndef := uint32(rr.NSym() + rr.NNonpkgdef())
 	for i := uint32(0); i < n; i++ {
 		osym := rr.Sym(i)
@@ -83,10 +84,6 @@
 		// prefix for the package in which the object file has been found.
 		// Expand it.
 		name := strings.ReplaceAll(osym.Name(rr), `"".`, r.pkgprefix)
-		if i < npkgdef {
-			// Indexed symbol. Attach index to the name.
-			name += fmt.Sprintf("#%d", i)
-		}
 		symID := SymID{Name: name, Version: abiToVer(osym.ABI())}
 		r.p.SymRefs = append(r.p.SymRefs, symID)
 
diff --git a/src/cmd/internal/goobj2/objfile.go b/src/cmd/internal/goobj2/objfile.go
index dc5174f..3e6375b 100644
--- a/src/cmd/internal/goobj2/objfile.go
+++ b/src/cmd/internal/goobj2/objfile.go
@@ -73,6 +73,14 @@
 //    Data   [...]byte
 //    Pcdata [...]byte
 //
+//    // blocks only used by tools (objdump, nm)
+//
+//    RefNames [...]struct { // referenced symbol names
+//       Sym  symRef
+//       Name string
+//       // TODO: include ABI version as well?
+//    }
+//
 // string is encoded as is a uint32 length followed by a uint32 offset
 // that points to the corresponding string bytes.
 //
@@ -152,6 +160,8 @@
 	BlkAux
 	BlkData
 	BlkPcdata
+	BlkRefName
+	BlkEnd
 	NBlk
 )
 
@@ -370,6 +380,37 @@
 // for testing
 func (a *Aux) fromBytes(b []byte) { copy(a[:], b) }
 
+// Referenced symbol name.
+//
+// Serialized format:
+// RefName struct {
+//    Sym  symRef
+//    Name string
+// }
+type RefName [RefNameSize]byte
+
+const RefNameSize = 8 + stringRefSize
+
+func (n *RefName) Sym() SymRef {
+	return SymRef{binary.LittleEndian.Uint32(n[:]), binary.LittleEndian.Uint32(n[4:])}
+}
+func (n *RefName) Name(r *Reader) string {
+	len := binary.LittleEndian.Uint32(n[8:])
+	off := binary.LittleEndian.Uint32(n[12:])
+	return r.StringAt(off, len)
+}
+
+func (n *RefName) SetSym(x SymRef) {
+	binary.LittleEndian.PutUint32(n[:], x.PkgIdx)
+	binary.LittleEndian.PutUint32(n[4:], x.SymIdx)
+}
+func (n *RefName) SetName(x string, w *Writer) {
+	binary.LittleEndian.PutUint32(n[8:], uint32(len(x)))
+	binary.LittleEndian.PutUint32(n[12:], w.stringOff(x))
+}
+
+func (n *RefName) Write(w *Writer) { w.Bytes(n[:]) }
+
 type Writer struct {
 	wr        *bio.Writer
 	stringMap map[string]uint32
@@ -667,6 +708,18 @@
 	return r.h.Offsets[BlkPcdata]
 }
 
+// NRefName returns the number of referenced symbol names.
+func (r *Reader) NRefName() int {
+	return int(r.h.Offsets[BlkRefName+1]-r.h.Offsets[BlkRefName]) / RefNameSize
+}
+
+// RefName returns a pointer to the i-th referenced symbol name.
+// Note: here i is not a local symbol index, just a counter.
+func (r *Reader) RefName(i int) *RefName {
+	off := r.h.Offsets[BlkRefName] + uint32(i*RefNameSize)
+	return (*RefName)(unsafe.Pointer(&r.b[off]))
+}
+
 // ReadOnly returns whether r.BytesAt returns read-only bytes.
 func (r *Reader) ReadOnly() bool {
 	return r.readonly
diff --git a/src/cmd/internal/obj/arm/a.out.go b/src/cmd/internal/obj/arm/a.out.go
index 51e6163..a1d9e28 100644
--- a/src/cmd/internal/obj/arm/a.out.go
+++ b/src/cmd/internal/obj/arm/a.out.go
@@ -1,5 +1,5 @@
 // Inferno utils/5c/5.out.h
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/5c/5.out.h
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/5c/5.out.h
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
diff --git a/src/cmd/internal/obj/arm/asm5.go b/src/cmd/internal/obj/arm/asm5.go
index b398de2..f66f8aa 100644
--- a/src/cmd/internal/obj/arm/asm5.go
+++ b/src/cmd/internal/obj/arm/asm5.go
@@ -1,5 +1,5 @@
 // Inferno utils/5l/span.c
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/5l/span.c
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/5l/span.c
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
diff --git a/src/cmd/internal/obj/arm/list5.go b/src/cmd/internal/obj/arm/list5.go
index 2654312b..6d630f6 100644
--- a/src/cmd/internal/obj/arm/list5.go
+++ b/src/cmd/internal/obj/arm/list5.go
@@ -1,5 +1,5 @@
 // Inferno utils/5c/list.c
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/5c/list.c
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/5c/list.c
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
diff --git a/src/cmd/internal/obj/arm/obj5.go b/src/cmd/internal/obj/arm/obj5.go
index a895929..008118c 100644
--- a/src/cmd/internal/obj/arm/obj5.go
+++ b/src/cmd/internal/obj/arm/obj5.go
@@ -1,5 +1,5 @@
 // Derived from Inferno utils/5c/swt.c
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/5c/swt.c
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/5c/swt.c
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
diff --git a/src/cmd/internal/obj/arm64/doc.go b/src/cmd/internal/obj/arm64/doc.go
index d66e6f8..75152175 100644
--- a/src/cmd/internal/obj/arm64/doc.go
+++ b/src/cmd/internal/obj/arm64/doc.go
@@ -22,7 +22,8 @@
 
   Examples:
     MOVD.P -8(R10), R8         <=>      ldr x8, [x10],#-8
-    MOVB.W 16(R16), R10        <=>      ldr x10, [x16,#16]!
+    MOVB.W 16(R16), R10        <=>      ldrsb x10, [x16,#16]!
+    MOVBU.W 16(R16), R10       <=>      ldrb x10, [x16,#16]!
 
 3. Go uses a series of MOV instructions as load and store.
 
diff --git a/src/cmd/internal/obj/data.go b/src/cmd/internal/obj/data.go
index 12385b5..f32e07a 100644
--- a/src/cmd/internal/obj/data.go
+++ b/src/cmd/internal/obj/data.go
@@ -1,6 +1,6 @@
 // Derived from Inferno utils/6l/obj.c and utils/6l/span.c
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/6l/obj.c
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/6l/span.c
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/6l/obj.c
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/6l/span.c
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
diff --git a/src/cmd/internal/obj/ld.go b/src/cmd/internal/obj/ld.go
index 275540d..4ba52c7 100644
--- a/src/cmd/internal/obj/ld.go
+++ b/src/cmd/internal/obj/ld.go
@@ -1,6 +1,6 @@
 // Derived from Inferno utils/6l/obj.c and utils/6l/span.c
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/6l/obj.c
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/6l/span.c
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/6l/obj.c
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/6l/span.c
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
diff --git a/src/cmd/internal/obj/link.go b/src/cmd/internal/obj/link.go
index 1b54df2..d9628bf 100644
--- a/src/cmd/internal/obj/link.go
+++ b/src/cmd/internal/obj/link.go
@@ -1,5 +1,5 @@
 // Derived from Inferno utils/6l/l.h and related files.
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/6l/l.h
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/6l/l.h
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
diff --git a/src/cmd/internal/obj/objfile2.go b/src/cmd/internal/obj/objfile2.go
index 4679bbb..591df09 100644
--- a/src/cmd/internal/obj/objfile2.go
+++ b/src/cmd/internal/obj/objfile2.go
@@ -162,6 +162,14 @@
 		}
 	}
 
+	// Blocks used only by tools (objdump, nm).
+
+	// Referenced symbol names from other packages
+	h.Offsets[goobj2.BlkRefName] = w.Offset()
+	w.refNames()
+
+	h.Offsets[goobj2.BlkEnd] = w.Offset()
+
 	// Fix up block offsets in the header
 	end := start + int64(w.Offset())
 	b.MustSeek(start, 0)
@@ -194,6 +202,9 @@
 		w.AddString(pkg)
 	}
 	w.ctxt.traverseSyms(traverseAll, func(s *LSym) {
+		// TODO: this includes references of indexed symbols from other packages,
+		// for which the linker doesn't need the name. Consider moving them to
+		// a separate block (for tools only).
 		if w.pkgpath != "" {
 			s.Name = strings.Replace(s.Name, "\"\".", w.pkgpath+".", -1)
 		}
@@ -319,6 +330,34 @@
 	}
 }
 
+// Emits names of referenced indexed symbols, used by tools (objdump, nm)
+// only.
+func (w *writer) refNames() {
+	seen := make(map[goobj2.SymRef]bool)
+	w.ctxt.traverseSyms(traverseRefs, func(rs *LSym) { // only traverse refs, not auxs, as tools don't need auxs
+		switch rs.PkgIdx {
+		case goobj2.PkgIdxNone, goobj2.PkgIdxBuiltin, goobj2.PkgIdxSelf: // not an external indexed reference
+			return
+		case goobj2.PkgIdxInvalid:
+			panic("unindexed symbol reference")
+		}
+		symref := makeSymRef(rs)
+		if seen[symref] {
+			return
+		}
+		seen[symref] = true
+		var o goobj2.RefName
+		o.SetSym(symref)
+		o.SetName(rs.Name, w.Writer)
+		o.Write(w.Writer)
+	})
+	// TODO: output in sorted order?
+	// Currently tools (cmd/internal/goobj package) doesn't use mmap,
+	// and it just read it into a map in memory upfront. If it uses
+	// mmap, if the output is sorted, it probably could avoid reading
+	// into memory and just do lookups in the mmap'd object file.
+}
+
 // return the number of aux symbols s have.
 func nAuxSym(s *LSym) int {
 	n := 0
diff --git a/src/cmd/internal/obj/pass.go b/src/cmd/internal/obj/pass.go
index 0c40171..4f156d9 100644
--- a/src/cmd/internal/obj/pass.go
+++ b/src/cmd/internal/obj/pass.go
@@ -1,5 +1,5 @@
 // Inferno utils/6l/pass.c
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/6l/pass.c
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/6l/pass.c
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
diff --git a/src/cmd/internal/obj/sym.go b/src/cmd/internal/obj/sym.go
index 72a314a..bfc405c 100644
--- a/src/cmd/internal/obj/sym.go
+++ b/src/cmd/internal/obj/sym.go
@@ -1,6 +1,6 @@
 // Derived from Inferno utils/6l/obj.c and utils/6l/span.c
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/6l/obj.c
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/6l/span.c
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/6l/obj.c
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/6l/span.c
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
diff --git a/src/cmd/internal/obj/x86/a.out.go b/src/cmd/internal/obj/x86/a.out.go
index 517d541..30c1a6a 100644
--- a/src/cmd/internal/obj/x86/a.out.go
+++ b/src/cmd/internal/obj/x86/a.out.go
@@ -1,5 +1,5 @@
 // Inferno utils/6c/6.out.h
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/6c/6.out.h
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/6c/6.out.h
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
diff --git a/src/cmd/internal/obj/x86/asm6.go b/src/cmd/internal/obj/x86/asm6.go
index f7d81dc..82a2e6a 100644
--- a/src/cmd/internal/obj/x86/asm6.go
+++ b/src/cmd/internal/obj/x86/asm6.go
@@ -1,5 +1,5 @@
 // Inferno utils/6l/span.c
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/6l/span.c
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/6l/span.c
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
diff --git a/src/cmd/internal/obj/x86/list6.go b/src/cmd/internal/obj/x86/list6.go
index f194b4b..6028031 100644
--- a/src/cmd/internal/obj/x86/list6.go
+++ b/src/cmd/internal/obj/x86/list6.go
@@ -1,5 +1,5 @@
 // Inferno utils/6c/list.c
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/6c/list.c
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/6c/list.c
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
diff --git a/src/cmd/internal/obj/x86/obj6.go b/src/cmd/internal/obj/x86/obj6.go
index 4283d99..c1e5bea 100644
--- a/src/cmd/internal/obj/x86/obj6.go
+++ b/src/cmd/internal/obj/x86/obj6.go
@@ -1,5 +1,5 @@
 // Inferno utils/6l/pass.c
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/6l/pass.c
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/6l/pass.c
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
diff --git a/src/cmd/internal/objabi/autotype.go b/src/cmd/internal/objabi/autotype.go
index 1b46b0f..f9d17a3 100644
--- a/src/cmd/internal/objabi/autotype.go
+++ b/src/cmd/internal/objabi/autotype.go
@@ -1,5 +1,5 @@
 // Derived from Inferno utils/6l/l.h and related files.
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/6l/l.h
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/6l/l.h
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
diff --git a/src/cmd/internal/objabi/head.go b/src/cmd/internal/objabi/head.go
index 6836c33..95b8db3 100644
--- a/src/cmd/internal/objabi/head.go
+++ b/src/cmd/internal/objabi/head.go
@@ -1,5 +1,5 @@
 // Derived from Inferno utils/6l/l.h and related files.
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/6l/l.h
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/6l/l.h
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
diff --git a/src/cmd/internal/objabi/reloctype.go b/src/cmd/internal/objabi/reloctype.go
index dc64828..f029a3c 100644
--- a/src/cmd/internal/objabi/reloctype.go
+++ b/src/cmd/internal/objabi/reloctype.go
@@ -1,5 +1,5 @@
 // Derived from Inferno utils/6l/l.h and related files.
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/6l/l.h
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/6l/l.h
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
diff --git a/src/cmd/internal/objabi/symkind.go b/src/cmd/internal/objabi/symkind.go
index 89577e2..6c99112 100644
--- a/src/cmd/internal/objabi/symkind.go
+++ b/src/cmd/internal/objabi/symkind.go
@@ -1,5 +1,5 @@
 // Derived from Inferno utils/6l/l.h and related files.
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/6l/l.h
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/6l/l.h
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
diff --git a/src/cmd/internal/test2json/test2json.go b/src/cmd/internal/test2json/test2json.go
index 098128e..a01a890 100644
--- a/src/cmd/internal/test2json/test2json.go
+++ b/src/cmd/internal/test2json/test2json.go
@@ -211,8 +211,18 @@
 		}
 	}
 
+	// Not a special test output line.
 	if !ok {
-		// Not a special test output line.
+		// Lookup the name of the test which produced the output using the
+		// indentation of the output as an index into the stack of the current
+		// subtests.
+		// If the indentation is greater than the number of current subtests
+		// then the output must have included extra indentation. We can't
+		// determine which subtest produced this output, so we default to the
+		// old behaviour of assuming the most recently run subtest produced it.
+		if indent > 0 && indent <= len(c.report) {
+			c.testName = c.report[indent-1].Test
+		}
 		c.output.write(origLine)
 		return
 	}
diff --git a/src/cmd/internal/test2json/testdata/issue29755.json b/src/cmd/internal/test2json/testdata/issue29755.json
new file mode 100644
index 0000000..2e8ba48
--- /dev/null
+++ b/src/cmd/internal/test2json/testdata/issue29755.json
@@ -0,0 +1,38 @@
+{"Action":"run","Test":"TestOutputWithSubtest"}
+{"Action":"output","Test":"TestOutputWithSubtest","Output":"=== RUN   TestOutputWithSubtest\n"}
+{"Action":"run","Test":"TestOutputWithSubtest/sub_test"}
+{"Action":"output","Test":"TestOutputWithSubtest/sub_test","Output":"=== RUN   TestOutputWithSubtest/sub_test\n"}
+{"Action":"run","Test":"TestOutputWithSubtest/sub_test/sub2"}
+{"Action":"output","Test":"TestOutputWithSubtest/sub_test/sub2","Output":"=== RUN   TestOutputWithSubtest/sub_test/sub2\n"}
+{"Action":"run","Test":"TestOutputWithSubtest/sub_test2"}
+{"Action":"output","Test":"TestOutputWithSubtest/sub_test2","Output":"=== RUN   TestOutputWithSubtest/sub_test2\n"}
+{"Action":"run","Test":"TestOutputWithSubtest/sub_test2/sub2"}
+{"Action":"output","Test":"TestOutputWithSubtest/sub_test2/sub2","Output":"=== RUN   TestOutputWithSubtest/sub_test2/sub2\n"}
+{"Action":"output","Test":"TestOutputWithSubtest","Output":"--- FAIL: TestOutputWithSubtest (0.00s)\n"}
+{"Action":"output","Test":"TestOutputWithSubtest","Output":"    foo_test.go:6: output before sub tests\n"}
+{"Action":"output","Test":"TestOutputWithSubtest","Output":"    foo_test.go:10: output from root test\n"}
+{"Action":"output","Test":"TestOutputWithSubtest","Output":"    foo_test.go:15: output from root test\n"}
+{"Action":"output","Test":"TestOutputWithSubtest/sub_test","Output":"    --- PASS: TestOutputWithSubtest/sub_test (0.00s)\n"}
+{"Action":"output","Test":"TestOutputWithSubtest/sub_test","Output":"        foo_test.go:9: output from sub test\n"}
+{"Action":"output","Test":"TestOutputWithSubtest/sub_test","Output":"        foo_test.go:11: more output from sub test\n"}
+{"Action":"output","Test":"TestOutputWithSubtest/sub_test","Output":"        foo_test.go:16: more output from sub test\n"}
+{"Action":"output","Test":"TestOutputWithSubtest/sub_test/sub2","Output":"        --- PASS: TestOutputWithSubtest/sub_test/sub2 (0.00s)\n"}
+{"Action":"output","Test":"TestOutputWithSubtest/sub_test/sub2","Output":"            foo_test.go:14: output from sub2 test\n"}
+{"Action":"output","Test":"TestOutputWithSubtest","Output":"    foo_test.go:22: output from root test\n"}
+{"Action":"output","Test":"TestOutputWithSubtest","Output":"    foo_test.go:27: output from root test\n"}
+{"Action":"pass","Test":"TestOutputWithSubtest/sub_test/sub2"}
+{"Action":"pass","Test":"TestOutputWithSubtest/sub_test"}
+{"Action":"output","Test":"TestOutputWithSubtest/sub_test2","Output":"    --- PASS: TestOutputWithSubtest/sub_test2 (0.00s)\n"}
+{"Action":"output","Test":"TestOutputWithSubtest/sub_test2","Output":"        foo_test.go:21: output from sub test2\n"}
+{"Action":"output","Test":"TestOutputWithSubtest/sub_test2","Output":"        foo_test.go:23: more output from sub test2\n"}
+{"Action":"output","Test":"TestOutputWithSubtest/sub_test2","Output":"        foo_test.go:28: more output from sub test2\n"}
+{"Action":"output","Test":"TestOutputWithSubtest/sub_test2/sub2","Output":"        --- PASS: TestOutputWithSubtest/sub_test2/sub2 (0.00s)\n"}
+{"Action":"output","Test":"TestOutputWithSubtest/sub_test2/sub2","Output":"            foo_test.go:26: output from sub2 test\n"}
+{"Action":"output","Test":"TestOutputWithSubtest","Output":"    foo_test.go:32: output after sub test\n"}
+{"Action":"pass","Test":"TestOutputWithSubtest/sub_test2/sub2"}
+{"Action":"pass","Test":"TestOutputWithSubtest/sub_test2"}
+{"Action":"fail","Test":"TestOutputWithSubtest"}
+{"Action":"output","Output":"FAIL\n"}
+{"Action":"output","Output":"FAIL\tgotest.tools/gotestsum/foo\t0.001s\n"}
+{"Action":"output","Output":"FAIL\n"}
+{"Action":"fail"}
diff --git a/src/cmd/internal/test2json/testdata/issue29755.test b/src/cmd/internal/test2json/testdata/issue29755.test
new file mode 100644
index 0000000..b0c596c
--- /dev/null
+++ b/src/cmd/internal/test2json/testdata/issue29755.test
@@ -0,0 +1,27 @@
+=== RUN   TestOutputWithSubtest
+=== RUN   TestOutputWithSubtest/sub_test
+=== RUN   TestOutputWithSubtest/sub_test/sub2
+=== RUN   TestOutputWithSubtest/sub_test2
+=== RUN   TestOutputWithSubtest/sub_test2/sub2
+--- FAIL: TestOutputWithSubtest (0.00s)
+    foo_test.go:6: output before sub tests
+    foo_test.go:10: output from root test
+    foo_test.go:15: output from root test
+    --- PASS: TestOutputWithSubtest/sub_test (0.00s)
+        foo_test.go:9: output from sub test
+        foo_test.go:11: more output from sub test
+        foo_test.go:16: more output from sub test
+        --- PASS: TestOutputWithSubtest/sub_test/sub2 (0.00s)
+            foo_test.go:14: output from sub2 test
+    foo_test.go:22: output from root test
+    foo_test.go:27: output from root test
+    --- PASS: TestOutputWithSubtest/sub_test2 (0.00s)
+        foo_test.go:21: output from sub test2
+        foo_test.go:23: more output from sub test2
+        foo_test.go:28: more output from sub test2
+        --- PASS: TestOutputWithSubtest/sub_test2/sub2 (0.00s)
+            foo_test.go:26: output from sub2 test
+    foo_test.go:32: output after sub test
+FAIL
+FAIL	gotest.tools/gotestsum/foo	0.001s
+FAIL
diff --git a/src/cmd/internal/test2json/testdata/smiley.json b/src/cmd/internal/test2json/testdata/smiley.json
index afa990d..f49180d 100644
--- a/src/cmd/internal/test2json/testdata/smiley.json
+++ b/src/cmd/internal/test2json/testdata/smiley.json
@@ -116,13 +116,13 @@
 {"Action":"output","Test":"Test☺☹/2","Output":"=== CONT  Test☺☹/2\n"}
 {"Action":"output","Test":"TestTags","Output":"--- PASS: TestTags (0.00s)\n"}
 {"Action":"output","Test":"TestTags/x_testtag_y","Output":"    --- PASS: TestTags/x_testtag_y (0.04s)\n"}
-{"Action":"output","Test":"TestTags/x_testtag_y","Output":"    \tvet_test.go:187: -tags=x testtag y\n"}
+{"Action":"output","Test":"TestTags/x_testtag_y","Output":"        vet_test.go:187: -tags=x testtag y\n"}
 {"Action":"pass","Test":"TestTags/x_testtag_y"}
 {"Action":"output","Test":"TestTags/x,testtag,y","Output":"    --- PASS: TestTags/x,testtag,y (0.04s)\n"}
-{"Action":"output","Test":"TestTags/x,testtag,y","Output":"    \tvet_test.go:187: -tags=x,testtag,y\n"}
+{"Action":"output","Test":"TestTags/x,testtag,y","Output":"        vet_test.go:187: -tags=x,testtag,y\n"}
 {"Action":"pass","Test":"TestTags/x,testtag,y"}
 {"Action":"output","Test":"TestTags/testtag","Output":"    --- PASS: TestTags/testtag (0.04s)\n"}
-{"Action":"output","Test":"TestTags/testtag","Output":"    \tvet_test.go:187: -tags=testtag\n"}
+{"Action":"output","Test":"TestTags/testtag","Output":"        vet_test.go:187: -tags=testtag\n"}
 {"Action":"pass","Test":"TestTags/testtag"}
 {"Action":"pass","Test":"TestTags"}
 {"Action":"cont","Test":"Test☺☹/1"}
@@ -139,28 +139,28 @@
 {"Action":"output","Test":"Test☺☹Dirs/cgo","Output":"=== CONT  Test☺☹Dirs/cgo\n"}
 {"Action":"output","Test":"Test☺☹","Output":"--- PASS: Test☺☹ (0.39s)\n"}
 {"Action":"output","Test":"Test☺☹/5","Output":"    --- PASS: Test☺☹/5 (0.07s)\n"}
-{"Action":"output","Test":"Test☺☹/5","Output":"    \tvet_test.go:114: φιλεσ: [\"testdata/copylock_func.go\" \"testdata/rangeloop.go\"]\n"}
+{"Action":"output","Test":"Test☺☹/5","Output":"        vet_test.go:114: φιλεσ: [\"testdata/copylock_func.go\" \"testdata/rangeloop.go\"]\n"}
 {"Action":"pass","Test":"Test☺☹/5"}
 {"Action":"output","Test":"Test☺☹/3","Output":"    --- PASS: Test☺☹/3 (0.07s)\n"}
-{"Action":"output","Test":"Test☺☹/3","Output":"    \tvet_test.go:114: φιλεσ: [\"testdata/composite.go\" \"testdata/nilfunc.go\"]\n"}
+{"Action":"output","Test":"Test☺☹/3","Output":"        vet_test.go:114: φιλεσ: [\"testdata/composite.go\" \"testdata/nilfunc.go\"]\n"}
 {"Action":"pass","Test":"Test☺☹/3"}
 {"Action":"output","Test":"Test☺☹/6","Output":"    --- PASS: Test☺☹/6 (0.07s)\n"}
-{"Action":"output","Test":"Test☺☹/6","Output":"    \tvet_test.go:114: φιλεσ: [\"testdata/copylock_range.go\" \"testdata/shadow.go\"]\n"}
+{"Action":"output","Test":"Test☺☹/6","Output":"        vet_test.go:114: φιλεσ: [\"testdata/copylock_range.go\" \"testdata/shadow.go\"]\n"}
 {"Action":"pass","Test":"Test☺☹/6"}
 {"Action":"output","Test":"Test☺☹/2","Output":"    --- PASS: Test☺☹/2 (0.07s)\n"}
-{"Action":"output","Test":"Test☺☹/2","Output":"    \tvet_test.go:114: φιλεσ: [\"testdata/bool.go\" \"testdata/method.go\" \"testdata/unused.go\"]\n"}
+{"Action":"output","Test":"Test☺☹/2","Output":"        vet_test.go:114: φιλεσ: [\"testdata/bool.go\" \"testdata/method.go\" \"testdata/unused.go\"]\n"}
 {"Action":"pass","Test":"Test☺☹/2"}
 {"Action":"output","Test":"Test☺☹/0","Output":"    --- PASS: Test☺☹/0 (0.13s)\n"}
-{"Action":"output","Test":"Test☺☹/0","Output":"    \tvet_test.go:114: φιλεσ: [\"testdata/assign.go\" \"testdata/httpresponse.go\" \"testdata/structtag.go\"]\n"}
+{"Action":"output","Test":"Test☺☹/0","Output":"        vet_test.go:114: φιλεσ: [\"testdata/assign.go\" \"testdata/httpresponse.go\" \"testdata/structtag.go\"]\n"}
 {"Action":"pass","Test":"Test☺☹/0"}
 {"Action":"output","Test":"Test☺☹/4","Output":"    --- PASS: Test☺☹/4 (0.16s)\n"}
-{"Action":"output","Test":"Test☺☹/4","Output":"    \tvet_test.go:114: φιλεσ: [\"testdata/copylock.go\" \"testdata/print.go\"]\n"}
+{"Action":"output","Test":"Test☺☹/4","Output":"        vet_test.go:114: φιλεσ: [\"testdata/copylock.go\" \"testdata/print.go\"]\n"}
 {"Action":"pass","Test":"Test☺☹/4"}
 {"Action":"output","Test":"Test☺☹/1","Output":"    --- PASS: Test☺☹/1 (0.07s)\n"}
-{"Action":"output","Test":"Test☺☹/1","Output":"    \tvet_test.go:114: φιλεσ: [\"testdata/atomic.go\" \"testdata/lostcancel.go\" \"testdata/unsafeptr.go\"]\n"}
+{"Action":"output","Test":"Test☺☹/1","Output":"        vet_test.go:114: φιλεσ: [\"testdata/atomic.go\" \"testdata/lostcancel.go\" \"testdata/unsafeptr.go\"]\n"}
 {"Action":"pass","Test":"Test☺☹/1"}
 {"Action":"output","Test":"Test☺☹/7","Output":"    --- PASS: Test☺☹/7 (0.19s)\n"}
-{"Action":"output","Test":"Test☺☹/7","Output":"    \tvet_test.go:114: φιλεσ: [\"testdata/deadcode.go\" \"testdata/shift.go\"]\n"}
+{"Action":"output","Test":"Test☺☹/7","Output":"        vet_test.go:114: φιλεσ: [\"testdata/deadcode.go\" \"testdata/shift.go\"]\n"}
 {"Action":"pass","Test":"Test☺☹/7"}
 {"Action":"pass","Test":"Test☺☹"}
 {"Action":"output","Test":"Test☺☹Dirs","Output":"--- PASS: Test☺☹Dirs (0.01s)\n"}
diff --git a/src/cmd/internal/test2json/testdata/smiley.test b/src/cmd/internal/test2json/testdata/smiley.test
index 05edf5a..bd1ed2d 100644
--- a/src/cmd/internal/test2json/testdata/smiley.test
+++ b/src/cmd/internal/test2json/testdata/smiley.test
@@ -58,11 +58,11 @@
 === CONT  Test☺☹/2
 --- PASS: TestTags (0.00s)
     --- PASS: TestTags/x_testtag_y (0.04s)
-    	vet_test.go:187: -tags=x testtag y
+        vet_test.go:187: -tags=x testtag y
     --- PASS: TestTags/x,testtag,y (0.04s)
-    	vet_test.go:187: -tags=x,testtag,y
+        vet_test.go:187: -tags=x,testtag,y
     --- PASS: TestTags/testtag (0.04s)
-    	vet_test.go:187: -tags=testtag
+        vet_test.go:187: -tags=testtag
 === CONT  Test☺☹/1
 === CONT  Test☺☹Dirs/testingpkg
 === CONT  Test☺☹Dirs/buildtag
@@ -71,21 +71,21 @@
 === CONT  Test☺☹Dirs/cgo
 --- PASS: Test☺☹ (0.39s)
     --- PASS: Test☺☹/5 (0.07s)
-    	vet_test.go:114: φιλεσ: ["testdata/copylock_func.go" "testdata/rangeloop.go"]
+        vet_test.go:114: φιλεσ: ["testdata/copylock_func.go" "testdata/rangeloop.go"]
     --- PASS: Test☺☹/3 (0.07s)
-    	vet_test.go:114: φιλεσ: ["testdata/composite.go" "testdata/nilfunc.go"]
+        vet_test.go:114: φιλεσ: ["testdata/composite.go" "testdata/nilfunc.go"]
     --- PASS: Test☺☹/6 (0.07s)
-    	vet_test.go:114: φιλεσ: ["testdata/copylock_range.go" "testdata/shadow.go"]
+        vet_test.go:114: φιλεσ: ["testdata/copylock_range.go" "testdata/shadow.go"]
     --- PASS: Test☺☹/2 (0.07s)
-    	vet_test.go:114: φιλεσ: ["testdata/bool.go" "testdata/method.go" "testdata/unused.go"]
+        vet_test.go:114: φιλεσ: ["testdata/bool.go" "testdata/method.go" "testdata/unused.go"]
     --- PASS: Test☺☹/0 (0.13s)
-    	vet_test.go:114: φιλεσ: ["testdata/assign.go" "testdata/httpresponse.go" "testdata/structtag.go"]
+        vet_test.go:114: φιλεσ: ["testdata/assign.go" "testdata/httpresponse.go" "testdata/structtag.go"]
     --- PASS: Test☺☹/4 (0.16s)
-    	vet_test.go:114: φιλεσ: ["testdata/copylock.go" "testdata/print.go"]
+        vet_test.go:114: φιλεσ: ["testdata/copylock.go" "testdata/print.go"]
     --- PASS: Test☺☹/1 (0.07s)
-    	vet_test.go:114: φιλεσ: ["testdata/atomic.go" "testdata/lostcancel.go" "testdata/unsafeptr.go"]
+        vet_test.go:114: φιλεσ: ["testdata/atomic.go" "testdata/lostcancel.go" "testdata/unsafeptr.go"]
     --- PASS: Test☺☹/7 (0.19s)
-    	vet_test.go:114: φιλεσ: ["testdata/deadcode.go" "testdata/shift.go"]
+        vet_test.go:114: φιλεσ: ["testdata/deadcode.go" "testdata/shift.go"]
 --- PASS: Test☺☹Dirs (0.01s)
     --- PASS: Test☺☹Dirs/testingpkg (0.06s)
     --- PASS: Test☺☹Dirs/divergent (0.05s)
diff --git a/src/cmd/internal/test2json/testdata/vet.json b/src/cmd/internal/test2json/testdata/vet.json
index 8c5921d..2558d61 100644
--- a/src/cmd/internal/test2json/testdata/vet.json
+++ b/src/cmd/internal/test2json/testdata/vet.json
@@ -116,13 +116,13 @@
 {"Action":"output","Test":"TestVet/2","Output":"=== CONT  TestVet/2\n"}
 {"Action":"output","Test":"TestTags","Output":"--- PASS: TestTags (0.00s)\n"}
 {"Action":"output","Test":"TestTags/x_testtag_y","Output":"    --- PASS: TestTags/x_testtag_y (0.04s)\n"}
-{"Action":"output","Test":"TestTags/x_testtag_y","Output":"    \tvet_test.go:187: -tags=x testtag y\n"}
+{"Action":"output","Test":"TestTags/x_testtag_y","Output":"        vet_test.go:187: -tags=x testtag y\n"}
 {"Action":"pass","Test":"TestTags/x_testtag_y"}
 {"Action":"output","Test":"TestTags/x,testtag,y","Output":"    --- PASS: TestTags/x,testtag,y (0.04s)\n"}
-{"Action":"output","Test":"TestTags/x,testtag,y","Output":"    \tvet_test.go:187: -tags=x,testtag,y\n"}
+{"Action":"output","Test":"TestTags/x,testtag,y","Output":"        vet_test.go:187: -tags=x,testtag,y\n"}
 {"Action":"pass","Test":"TestTags/x,testtag,y"}
 {"Action":"output","Test":"TestTags/testtag","Output":"    --- PASS: TestTags/testtag (0.04s)\n"}
-{"Action":"output","Test":"TestTags/testtag","Output":"    \tvet_test.go:187: -tags=testtag\n"}
+{"Action":"output","Test":"TestTags/testtag","Output":"        vet_test.go:187: -tags=testtag\n"}
 {"Action":"pass","Test":"TestTags/testtag"}
 {"Action":"pass","Test":"TestTags"}
 {"Action":"cont","Test":"TestVet/1"}
@@ -139,28 +139,28 @@
 {"Action":"output","Test":"TestVetDirs/cgo","Output":"=== CONT  TestVetDirs/cgo\n"}
 {"Action":"output","Test":"TestVet","Output":"--- PASS: TestVet (0.39s)\n"}
 {"Action":"output","Test":"TestVet/5","Output":"    --- PASS: TestVet/5 (0.07s)\n"}
-{"Action":"output","Test":"TestVet/5","Output":"    \tvet_test.go:114: files: [\"testdata/copylock_func.go\" \"testdata/rangeloop.go\"]\n"}
+{"Action":"output","Test":"TestVet/5","Output":"        vet_test.go:114: files: [\"testdata/copylock_func.go\" \"testdata/rangeloop.go\"]\n"}
 {"Action":"pass","Test":"TestVet/5"}
 {"Action":"output","Test":"TestVet/3","Output":"    --- PASS: TestVet/3 (0.07s)\n"}
-{"Action":"output","Test":"TestVet/3","Output":"    \tvet_test.go:114: files: [\"testdata/composite.go\" \"testdata/nilfunc.go\"]\n"}
+{"Action":"output","Test":"TestVet/3","Output":"        vet_test.go:114: files: [\"testdata/composite.go\" \"testdata/nilfunc.go\"]\n"}
 {"Action":"pass","Test":"TestVet/3"}
 {"Action":"output","Test":"TestVet/6","Output":"    --- PASS: TestVet/6 (0.07s)\n"}
-{"Action":"output","Test":"TestVet/6","Output":"    \tvet_test.go:114: files: [\"testdata/copylock_range.go\" \"testdata/shadow.go\"]\n"}
+{"Action":"output","Test":"TestVet/6","Output":"        vet_test.go:114: files: [\"testdata/copylock_range.go\" \"testdata/shadow.go\"]\n"}
 {"Action":"pass","Test":"TestVet/6"}
 {"Action":"output","Test":"TestVet/2","Output":"    --- PASS: TestVet/2 (0.07s)\n"}
-{"Action":"output","Test":"TestVet/2","Output":"    \tvet_test.go:114: files: [\"testdata/bool.go\" \"testdata/method.go\" \"testdata/unused.go\"]\n"}
+{"Action":"output","Test":"TestVet/2","Output":"        vet_test.go:114: files: [\"testdata/bool.go\" \"testdata/method.go\" \"testdata/unused.go\"]\n"}
 {"Action":"pass","Test":"TestVet/2"}
 {"Action":"output","Test":"TestVet/0","Output":"    --- PASS: TestVet/0 (0.13s)\n"}
-{"Action":"output","Test":"TestVet/0","Output":"    \tvet_test.go:114: files: [\"testdata/assign.go\" \"testdata/httpresponse.go\" \"testdata/structtag.go\"]\n"}
+{"Action":"output","Test":"TestVet/0","Output":"        vet_test.go:114: files: [\"testdata/assign.go\" \"testdata/httpresponse.go\" \"testdata/structtag.go\"]\n"}
 {"Action":"pass","Test":"TestVet/0"}
 {"Action":"output","Test":"TestVet/4","Output":"    --- PASS: TestVet/4 (0.16s)\n"}
-{"Action":"output","Test":"TestVet/4","Output":"    \tvet_test.go:114: files: [\"testdata/copylock.go\" \"testdata/print.go\"]\n"}
+{"Action":"output","Test":"TestVet/4","Output":"        vet_test.go:114: files: [\"testdata/copylock.go\" \"testdata/print.go\"]\n"}
 {"Action":"pass","Test":"TestVet/4"}
 {"Action":"output","Test":"TestVet/1","Output":"    --- PASS: TestVet/1 (0.07s)\n"}
-{"Action":"output","Test":"TestVet/1","Output":"    \tvet_test.go:114: files: [\"testdata/atomic.go\" \"testdata/lostcancel.go\" \"testdata/unsafeptr.go\"]\n"}
+{"Action":"output","Test":"TestVet/1","Output":"        vet_test.go:114: files: [\"testdata/atomic.go\" \"testdata/lostcancel.go\" \"testdata/unsafeptr.go\"]\n"}
 {"Action":"pass","Test":"TestVet/1"}
 {"Action":"output","Test":"TestVet/7","Output":"    --- PASS: TestVet/7 (0.19s)\n"}
-{"Action":"output","Test":"TestVet/7","Output":"    \tvet_test.go:114: files: [\"testdata/deadcode.go\" \"testdata/shift.go\"]\n"}
+{"Action":"output","Test":"TestVet/7","Output":"        vet_test.go:114: files: [\"testdata/deadcode.go\" \"testdata/shift.go\"]\n"}
 {"Action":"pass","Test":"TestVet/7"}
 {"Action":"pass","Test":"TestVet"}
 {"Action":"output","Test":"TestVetDirs","Output":"--- PASS: TestVetDirs (0.01s)\n"}
diff --git a/src/cmd/internal/test2json/testdata/vet.test b/src/cmd/internal/test2json/testdata/vet.test
index 3389559..59d187e0 100644
--- a/src/cmd/internal/test2json/testdata/vet.test
+++ b/src/cmd/internal/test2json/testdata/vet.test
@@ -58,11 +58,11 @@
 === CONT  TestVet/2
 --- PASS: TestTags (0.00s)
     --- PASS: TestTags/x_testtag_y (0.04s)
-    	vet_test.go:187: -tags=x testtag y
+        vet_test.go:187: -tags=x testtag y
     --- PASS: TestTags/x,testtag,y (0.04s)
-    	vet_test.go:187: -tags=x,testtag,y
+        vet_test.go:187: -tags=x,testtag,y
     --- PASS: TestTags/testtag (0.04s)
-    	vet_test.go:187: -tags=testtag
+        vet_test.go:187: -tags=testtag
 === CONT  TestVet/1
 === CONT  TestVetDirs/testingpkg
 === CONT  TestVetDirs/buildtag
@@ -71,21 +71,21 @@
 === CONT  TestVetDirs/cgo
 --- PASS: TestVet (0.39s)
     --- PASS: TestVet/5 (0.07s)
-    	vet_test.go:114: files: ["testdata/copylock_func.go" "testdata/rangeloop.go"]
+        vet_test.go:114: files: ["testdata/copylock_func.go" "testdata/rangeloop.go"]
     --- PASS: TestVet/3 (0.07s)
-    	vet_test.go:114: files: ["testdata/composite.go" "testdata/nilfunc.go"]
+        vet_test.go:114: files: ["testdata/composite.go" "testdata/nilfunc.go"]
     --- PASS: TestVet/6 (0.07s)
-    	vet_test.go:114: files: ["testdata/copylock_range.go" "testdata/shadow.go"]
+        vet_test.go:114: files: ["testdata/copylock_range.go" "testdata/shadow.go"]
     --- PASS: TestVet/2 (0.07s)
-    	vet_test.go:114: files: ["testdata/bool.go" "testdata/method.go" "testdata/unused.go"]
+        vet_test.go:114: files: ["testdata/bool.go" "testdata/method.go" "testdata/unused.go"]
     --- PASS: TestVet/0 (0.13s)
-    	vet_test.go:114: files: ["testdata/assign.go" "testdata/httpresponse.go" "testdata/structtag.go"]
+        vet_test.go:114: files: ["testdata/assign.go" "testdata/httpresponse.go" "testdata/structtag.go"]
     --- PASS: TestVet/4 (0.16s)
-    	vet_test.go:114: files: ["testdata/copylock.go" "testdata/print.go"]
+        vet_test.go:114: files: ["testdata/copylock.go" "testdata/print.go"]
     --- PASS: TestVet/1 (0.07s)
-    	vet_test.go:114: files: ["testdata/atomic.go" "testdata/lostcancel.go" "testdata/unsafeptr.go"]
+        vet_test.go:114: files: ["testdata/atomic.go" "testdata/lostcancel.go" "testdata/unsafeptr.go"]
     --- PASS: TestVet/7 (0.19s)
-    	vet_test.go:114: files: ["testdata/deadcode.go" "testdata/shift.go"]
+        vet_test.go:114: files: ["testdata/deadcode.go" "testdata/shift.go"]
 --- PASS: TestVetDirs (0.01s)
     --- PASS: TestVetDirs/testingpkg (0.06s)
     --- PASS: TestVetDirs/divergent (0.05s)
diff --git a/src/cmd/link/internal/amd64/asm.go b/src/cmd/link/internal/amd64/asm.go
index 07354eb..659c03e 100644
--- a/src/cmd/link/internal/amd64/asm.go
+++ b/src/cmd/link/internal/amd64/asm.go
@@ -1,5 +1,5 @@
 // Inferno utils/6l/asm.c
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/6l/asm.c
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/6l/asm.c
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
diff --git a/src/cmd/link/internal/amd64/l.go b/src/cmd/link/internal/amd64/l.go
index 393da6b..a9afb3a 100644
--- a/src/cmd/link/internal/amd64/l.go
+++ b/src/cmd/link/internal/amd64/l.go
@@ -1,5 +1,5 @@
 // Inferno utils/6l/l.h
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/6l/l.h
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/6l/l.h
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
diff --git a/src/cmd/link/internal/amd64/obj.go b/src/cmd/link/internal/amd64/obj.go
index 924ce58..4c52574 100644
--- a/src/cmd/link/internal/amd64/obj.go
+++ b/src/cmd/link/internal/amd64/obj.go
@@ -1,5 +1,5 @@
 // Inferno utils/6l/obj.c
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/6l/obj.c
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/6l/obj.c
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
diff --git a/src/cmd/link/internal/arm/asm.go b/src/cmd/link/internal/arm/asm.go
index 4c2dd80..1f78f76 100644
--- a/src/cmd/link/internal/arm/asm.go
+++ b/src/cmd/link/internal/arm/asm.go
@@ -1,5 +1,5 @@
 // Inferno utils/5l/asm.c
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/5l/asm.c
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/5l/asm.c
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
diff --git a/src/cmd/link/internal/arm/l.go b/src/cmd/link/internal/arm/l.go
index a83d26b..d16dc27 100644
--- a/src/cmd/link/internal/arm/l.go
+++ b/src/cmd/link/internal/arm/l.go
@@ -1,5 +1,5 @@
 // Inferno utils/5l/asm.c
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/5l/asm.c
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/5l/asm.c
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
@@ -33,7 +33,7 @@
 // Writing object files.
 
 // Inferno utils/5l/l.h
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/5l/l.h
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/5l/l.h
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
diff --git a/src/cmd/link/internal/arm/obj.go b/src/cmd/link/internal/arm/obj.go
index 151445e..1a57298 100644
--- a/src/cmd/link/internal/arm/obj.go
+++ b/src/cmd/link/internal/arm/obj.go
@@ -1,5 +1,5 @@
 // Inferno utils/5l/obj.c
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/5l/obj.c
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/5l/obj.c
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
diff --git a/src/cmd/link/internal/arm64/asm.go b/src/cmd/link/internal/arm64/asm.go
index a225314..bb23071 100644
--- a/src/cmd/link/internal/arm64/asm.go
+++ b/src/cmd/link/internal/arm64/asm.go
@@ -1,5 +1,5 @@
 // Inferno utils/5l/asm.c
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/5l/asm.c
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/5l/asm.c
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
diff --git a/src/cmd/link/internal/arm64/l.go b/src/cmd/link/internal/arm64/l.go
index 5f35303..4aa2708 100644
--- a/src/cmd/link/internal/arm64/l.go
+++ b/src/cmd/link/internal/arm64/l.go
@@ -1,5 +1,5 @@
 // Inferno utils/5l/asm.c
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/5l/asm.c
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/5l/asm.c
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
diff --git a/src/cmd/link/internal/arm64/obj.go b/src/cmd/link/internal/arm64/obj.go
index c092cf4..8eeba0d 100644
--- a/src/cmd/link/internal/arm64/obj.go
+++ b/src/cmd/link/internal/arm64/obj.go
@@ -1,5 +1,5 @@
 // Inferno utils/5l/obj.c
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/5l/obj.c
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/5l/obj.c
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
diff --git a/src/cmd/link/internal/ld/ar.go b/src/cmd/link/internal/ld/ar.go
index 268f40e..52adbc3 100644
--- a/src/cmd/link/internal/ld/ar.go
+++ b/src/cmd/link/internal/ld/ar.go
@@ -1,5 +1,5 @@
 // Inferno utils/include/ar.h
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/include/ar.h
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/include/ar.h
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
diff --git a/src/cmd/link/internal/ld/data.go b/src/cmd/link/internal/ld/data.go
index 26f443c..8fec08b 100644
--- a/src/cmd/link/internal/ld/data.go
+++ b/src/cmd/link/internal/ld/data.go
@@ -1,6 +1,6 @@
 // Derived from Inferno utils/6l/obj.c and utils/6l/span.c
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/6l/obj.c
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/6l/span.c
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/6l/obj.c
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/6l/span.c
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
diff --git a/src/cmd/link/internal/ld/dwarf.go b/src/cmd/link/internal/ld/dwarf.go
index 2fff7a8..617f968 100644
--- a/src/cmd/link/internal/ld/dwarf.go
+++ b/src/cmd/link/internal/ld/dwarf.go
@@ -1271,6 +1271,18 @@
 		}
 	}
 
+	// Issue 38192: the DWARF standard specifies that when you issue
+	// an end-sequence op, the PC value should be one past the last
+	// text address in the translation unit, so apply a delta to the
+	// text address before the end sequence op. If this isn't done,
+	// GDB will assign a line number of zero the last row in the line
+	// table, which we don't want. The 1 + ptrsize amount is somewhat
+	// arbitrary, this is chosen to be consistent with the way LLVM
+	// emits its end sequence ops.
+	lsu.AddUint8(dwarf.DW_LNS_advance_pc)
+	dwarf.Uleb128put(d, lsDwsym, int64(1+d.arch.PtrSize))
+
+	// Emit an end-sequence at the end of the unit.
 	lsu.AddUint8(0) // start extended opcode
 	dwarf.Uleb128put(d, lsDwsym, 1)
 	lsu.AddUint8(dwarf.DW_LNE_end_sequence)
diff --git a/src/cmd/link/internal/ld/dwarf_test.go b/src/cmd/link/internal/ld/dwarf_test.go
index a1c8496..fb9c45b 100644
--- a/src/cmd/link/internal/ld/dwarf_test.go
+++ b/src/cmd/link/internal/ld/dwarf_test.go
@@ -1368,3 +1368,114 @@
 		rdr.SkipChildren()
 	}
 }
+
+func TestIssue38192(t *testing.T) {
+	testenv.MustHaveGoBuild(t)
+
+	if runtime.GOOS == "plan9" {
+		t.Skip("skipping on plan9; no DWARF symbol table in executables")
+	}
+
+	// Build a test program that contains a translation unit whose
+	// text (from am assembly source) contains only a single instruction.
+	tmpdir, err := ioutil.TempDir("", "TestIssue38192")
+	if err != nil {
+		t.Fatalf("could not create directory: %v", err)
+	}
+	defer os.RemoveAll(tmpdir)
+	wd, err := os.Getwd()
+	if err != nil {
+		t.Fatalf("where am I? %v", err)
+	}
+	pdir := filepath.Join(wd, "testdata", "issue38192")
+	f := gobuildTestdata(t, tmpdir, pdir, DefaultOpt)
+
+	// Open the resulting binary and examine the DWARF it contains.
+	// Look for the function of interest ("main.singleInstruction")
+	// and verify that the line table has an entry not just for the
+	// single instruction but also a dummy instruction following it,
+	// so as to test that whoever is emitting the DWARF doesn't
+	// emit an end-sequence op immediately after the last instruction
+	// in the translation unit.
+	//
+	// NB: another way to write this test would have been to run the
+	// resulting executable under GDB, set a breakpoint in
+	// "main.singleInstruction", then verify that GDB displays the
+	// correct line/file information.  Given the headache and flakiness
+	// associated with GDB-based tests these days, a direct read of
+	// the line table seems more desirable.
+	rows := []dwarf.LineEntry{}
+	dw, err := f.DWARF()
+	if err != nil {
+		t.Fatalf("error parsing DWARF: %v", err)
+	}
+	rdr := dw.Reader()
+	for {
+		e, err := rdr.Next()
+		if err != nil {
+			t.Fatalf("error reading DWARF: %v", err)
+		}
+		if e == nil {
+			break
+		}
+		if e.Tag != dwarf.TagCompileUnit {
+			continue
+		}
+		// NB: there can be multiple compile units named "main".
+		name := e.Val(dwarf.AttrName).(string)
+		if name != "main" {
+			continue
+		}
+		lnrdr, err := dw.LineReader(e)
+		if err != nil {
+			t.Fatalf("error creating DWARF line reader: %v", err)
+		}
+		if lnrdr != nil {
+			var lne dwarf.LineEntry
+			for {
+				err := lnrdr.Next(&lne)
+				if err == io.EOF {
+					break
+				}
+				if err != nil {
+					t.Fatalf("error reading next DWARF line: %v", err)
+				}
+				if !strings.HasSuffix(lne.File.Name, "ld/testdata/issue38192/oneline.s") {
+					continue
+				}
+				rows = append(rows, lne)
+			}
+		}
+		rdr.SkipChildren()
+	}
+	f.Close()
+
+	// Make sure that:
+	// - main.singleInstruction appears in the line table
+	// - more than one PC value appears the line table for
+	//   that compilation unit.
+	// - at least one row has the correct line number (8)
+	pcs := make(map[uint64]bool)
+	line8seen := false
+	for _, r := range rows {
+		pcs[r.Address] = true
+		if r.Line == 8 {
+			line8seen = true
+		}
+	}
+	failed := false
+	if len(pcs) < 2 {
+		failed = true
+		t.Errorf("not enough line table rows for main.singleInstruction (got %d, wanted > 1", len(pcs))
+	}
+	if !line8seen {
+		failed = true
+		t.Errorf("line table does not contain correct line for main.singleInstruction")
+	}
+	if !failed {
+		return
+	}
+	for i, r := range rows {
+		t.Logf("row %d: A=%x F=%s L=%d\n", i, r.Address, r.File.Name, r.Line)
+	}
+}
diff --git a/src/cmd/link/internal/ld/ld.go b/src/cmd/link/internal/ld/ld.go
index 9b8c219..0846439 100644
--- a/src/cmd/link/internal/ld/ld.go
+++ b/src/cmd/link/internal/ld/ld.go
@@ -1,6 +1,6 @@
 // Derived from Inferno utils/6l/obj.c and utils/6l/span.c
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/6l/obj.c
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/6l/span.c
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/6l/obj.c
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/6l/span.c
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go
index dcb5f79..a747cde 100644
--- a/src/cmd/link/internal/ld/lib.go
+++ b/src/cmd/link/internal/ld/lib.go
@@ -1,5 +1,5 @@
 // Inferno utils/8l/asm.c
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/8l/asm.c
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/8l/asm.c
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
@@ -64,7 +64,7 @@
 // Data layout and relocation.
 
 // Derived from Inferno utils/6l/l.h
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/6l/l.h
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/6l/l.h
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
diff --git a/src/cmd/link/internal/ld/link.go b/src/cmd/link/internal/ld/link.go
index babef8c..9ad477e 100644
--- a/src/cmd/link/internal/ld/link.go
+++ b/src/cmd/link/internal/ld/link.go
@@ -1,5 +1,5 @@
 // Derived from Inferno utils/6l/l.h and related files.
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/6l/l.h
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/6l/l.h
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
diff --git a/src/cmd/link/internal/ld/main.go b/src/cmd/link/internal/ld/main.go
index 3404ba7..e68997f 100644
--- a/src/cmd/link/internal/ld/main.go
+++ b/src/cmd/link/internal/ld/main.go
@@ -1,5 +1,5 @@
 // Inferno utils/6l/obj.c
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/6l/obj.c
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/6l/obj.c
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
diff --git a/src/cmd/link/internal/ld/outbuf_windows.go b/src/cmd/link/internal/ld/outbuf_windows.go
index a7140cc..807c0e2 100644
--- a/src/cmd/link/internal/ld/outbuf_windows.go
+++ b/src/cmd/link/internal/ld/outbuf_windows.go
@@ -35,7 +35,13 @@
 	if out.buf == nil {
 		return
 	}
-	err := syscall.UnmapViewOfFile(uintptr(unsafe.Pointer(&out.buf[0])))
+	// Apparently unmapping without flush may cause ACCESS_DENIED error
+	// (see issue 38440).
+	err := syscall.FlushViewOfFile(uintptr(unsafe.Pointer(&out.buf[0])), 0)
+	if err != nil {
+		Exitf("FlushViewOfFile failed: %v", err)
+	}
+	err = syscall.UnmapViewOfFile(uintptr(unsafe.Pointer(&out.buf[0])))
 	out.buf = nil
 	if err != nil {
 		Exitf("UnmapViewOfFile failed: %v", err)
diff --git a/src/cmd/link/internal/ld/sym.go b/src/cmd/link/internal/ld/sym.go
index 7cf3a50..3f26945 100644
--- a/src/cmd/link/internal/ld/sym.go
+++ b/src/cmd/link/internal/ld/sym.go
@@ -1,6 +1,6 @@
 // Derived from Inferno utils/6l/obj.c and utils/6l/span.c
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/6l/obj.c
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/6l/span.c
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/6l/obj.c
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/6l/span.c
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
diff --git a/src/cmd/link/internal/ld/symtab.go b/src/cmd/link/internal/ld/symtab.go
index 4363939..577c24e 100644
--- a/src/cmd/link/internal/ld/symtab.go
+++ b/src/cmd/link/internal/ld/symtab.go
@@ -1,5 +1,5 @@
 // Inferno utils/6l/span.c
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/6l/span.c
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/6l/span.c
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
diff --git a/src/cmd/link/internal/ld/testdata/issue38192/main.go b/src/cmd/link/internal/ld/testdata/issue38192/main.go
new file mode 100644
index 0000000..3b7df60
--- /dev/null
+++ b/src/cmd/link/internal/ld/testdata/issue38192/main.go
@@ -0,0 +1,11 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+func singleInstruction()
+
+func main() {
+	singleInstruction()
+}
diff --git a/src/cmd/link/internal/ld/testdata/issue38192/oneline.s b/src/cmd/link/internal/ld/testdata/issue38192/oneline.s
new file mode 100644
index 0000000..f5290d7
--- /dev/null
+++ b/src/cmd/link/internal/ld/testdata/issue38192/oneline.s
@@ -0,0 +1,8 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+#include "textflag.h"
+
+TEXT ·singleInstruction(SB),NOSPLIT,$0
+        RET
diff --git a/src/cmd/link/internal/loader/loader.go b/src/cmd/link/internal/loader/loader.go
index 1917876..9b4214b 100644
--- a/src/cmd/link/internal/loader/loader.go
+++ b/src/cmd/link/internal/loader/loader.go
@@ -1912,7 +1912,7 @@
 // Does not read symbol data.
 // Returns the fingerprint of the object.
 func (l *Loader) Preload(localSymVersion int, f *bio.Reader, lib *sym.Library, unit *sym.CompilationUnit, length int64) goobj2.FingerprintType {
-	roObject, readonly, err := f.Slice(uint64(length))
+	roObject, readonly, err := f.Slice(uint64(length)) // TODO: no need to map blocks that are for tools only (e.g. RefName)
 	if err != nil {
 		log.Fatal("cannot read object file:", err)
 	}
diff --git a/src/cmd/link/internal/mips/asm.go b/src/cmd/link/internal/mips/asm.go
index 6f8d64d..d0e0245 100644
--- a/src/cmd/link/internal/mips/asm.go
+++ b/src/cmd/link/internal/mips/asm.go
@@ -1,5 +1,5 @@
 // Inferno utils/5l/asm.c
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/5l/asm.c
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/5l/asm.c
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
diff --git a/src/cmd/link/internal/mips/l.go b/src/cmd/link/internal/mips/l.go
index adbde40..affc48c 100644
--- a/src/cmd/link/internal/mips/l.go
+++ b/src/cmd/link/internal/mips/l.go
@@ -1,5 +1,5 @@
 // Inferno utils/5l/asm.c
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/5l/asm.c
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/5l/asm.c
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
diff --git a/src/cmd/link/internal/mips/obj.go b/src/cmd/link/internal/mips/obj.go
index a80d4ed..cc3cc43 100644
--- a/src/cmd/link/internal/mips/obj.go
+++ b/src/cmd/link/internal/mips/obj.go
@@ -1,5 +1,5 @@
 // Inferno utils/5l/obj.c
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/5l/obj.c
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/5l/obj.c
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
diff --git a/src/cmd/link/internal/mips64/asm.go b/src/cmd/link/internal/mips64/asm.go
index b9d7c27..dcca72c 100644
--- a/src/cmd/link/internal/mips64/asm.go
+++ b/src/cmd/link/internal/mips64/asm.go
@@ -1,5 +1,5 @@
 // Inferno utils/5l/asm.c
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/5l/asm.c
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/5l/asm.c
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
diff --git a/src/cmd/link/internal/mips64/l.go b/src/cmd/link/internal/mips64/l.go
index d794122..837af0e 100644
--- a/src/cmd/link/internal/mips64/l.go
+++ b/src/cmd/link/internal/mips64/l.go
@@ -1,5 +1,5 @@
 // Inferno utils/5l/asm.c
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/5l/asm.c
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/5l/asm.c
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
diff --git a/src/cmd/link/internal/mips64/obj.go b/src/cmd/link/internal/mips64/obj.go
index bbc1e84..449a200 100644
--- a/src/cmd/link/internal/mips64/obj.go
+++ b/src/cmd/link/internal/mips64/obj.go
@@ -1,5 +1,5 @@
 // Inferno utils/5l/obj.c
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/5l/obj.c
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/5l/obj.c
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
diff --git a/src/cmd/link/internal/ppc64/asm.go b/src/cmd/link/internal/ppc64/asm.go
index d26a501..ed086f0 100644
--- a/src/cmd/link/internal/ppc64/asm.go
+++ b/src/cmd/link/internal/ppc64/asm.go
@@ -1,5 +1,5 @@
 // Inferno utils/5l/asm.c
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/5l/asm.c
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/5l/asm.c
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
diff --git a/src/cmd/link/internal/ppc64/l.go b/src/cmd/link/internal/ppc64/l.go
index c78535b..e8d3b68 100644
--- a/src/cmd/link/internal/ppc64/l.go
+++ b/src/cmd/link/internal/ppc64/l.go
@@ -1,5 +1,5 @@
 // Inferno utils/5l/asm.c
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/5l/asm.c
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/5l/asm.c
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
diff --git a/src/cmd/link/internal/ppc64/obj.go b/src/cmd/link/internal/ppc64/obj.go
index 2b04f25..8a94f9a 100644
--- a/src/cmd/link/internal/ppc64/obj.go
+++ b/src/cmd/link/internal/ppc64/obj.go
@@ -1,5 +1,5 @@
 // Inferno utils/5l/obj.c
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/5l/obj.c
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/5l/obj.c
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
diff --git a/src/cmd/link/internal/s390x/asm.go b/src/cmd/link/internal/s390x/asm.go
index 6617575..11406ee 100644
--- a/src/cmd/link/internal/s390x/asm.go
+++ b/src/cmd/link/internal/s390x/asm.go
@@ -1,5 +1,5 @@
 // Inferno utils/5l/asm.c
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/5l/asm.c
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/5l/asm.c
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
diff --git a/src/cmd/link/internal/s390x/l.go b/src/cmd/link/internal/s390x/l.go
index 87d10ee..f040587 100644
--- a/src/cmd/link/internal/s390x/l.go
+++ b/src/cmd/link/internal/s390x/l.go
@@ -1,5 +1,5 @@
 // Inferno utils/5l/asm.c
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/5l/asm.c
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/5l/asm.c
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
diff --git a/src/cmd/link/internal/s390x/obj.go b/src/cmd/link/internal/s390x/obj.go
index 5e4c863..bb62fe1 100644
--- a/src/cmd/link/internal/s390x/obj.go
+++ b/src/cmd/link/internal/s390x/obj.go
@@ -1,5 +1,5 @@
 // Inferno utils/5l/obj.c
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/5l/obj.c
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/5l/obj.c
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
diff --git a/src/cmd/link/internal/sym/segment.go b/src/cmd/link/internal/sym/segment.go
index 743c752..9b49c62 100644
--- a/src/cmd/link/internal/sym/segment.go
+++ b/src/cmd/link/internal/sym/segment.go
@@ -1,5 +1,5 @@
 // Inferno utils/8l/asm.c
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/8l/asm.c
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/8l/asm.c
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
diff --git a/src/cmd/link/internal/sym/symkind.go b/src/cmd/link/internal/sym/symkind.go
index e4a8fe7..3e47d9a 100644
--- a/src/cmd/link/internal/sym/symkind.go
+++ b/src/cmd/link/internal/sym/symkind.go
@@ -1,5 +1,5 @@
 // Derived from Inferno utils/6l/l.h and related files.
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/6l/l.h
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/6l/l.h
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
diff --git a/src/cmd/link/internal/x86/asm.go b/src/cmd/link/internal/x86/asm.go
index 3fb67a9..6683c79 100644
--- a/src/cmd/link/internal/x86/asm.go
+++ b/src/cmd/link/internal/x86/asm.go
@@ -1,5 +1,5 @@
 // Inferno utils/8l/asm.c
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/8l/asm.c
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/8l/asm.c
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
diff --git a/src/cmd/link/internal/x86/l.go b/src/cmd/link/internal/x86/l.go
index 0f104ea..5875d45 100644
--- a/src/cmd/link/internal/x86/l.go
+++ b/src/cmd/link/internal/x86/l.go
@@ -1,5 +1,5 @@
 // Inferno utils/8l/l.h
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/8l/l.h
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/8l/l.h
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
diff --git a/src/cmd/link/internal/x86/obj.go b/src/cmd/link/internal/x86/obj.go
index 9239e71..e1c469c 100644
--- a/src/cmd/link/internal/x86/obj.go
+++ b/src/cmd/link/internal/x86/obj.go
@@ -1,5 +1,5 @@
 // Inferno utils/8l/obj.c
-// https://bitbucket.org/inferno-os/inferno-os/src/default/utils/8l/obj.c
+// https://bitbucket.org/inferno-os/inferno-os/src/master/utils/8l/obj.c
 //
 //	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
 //	Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
diff --git a/src/cmd/nm/nm_test.go b/src/cmd/nm/nm_test.go
index cdffb68..5d7fff0 100644
--- a/src/cmd/nm/nm_test.go
+++ b/src/cmd/nm/nm_test.go
@@ -315,7 +315,7 @@
 		}
 		for i := range syms {
 			sym := &syms[i]
-			if sym.Type == typ && matchSymName(name, sym.Name) && sym.CSym == csym {
+			if sym.Type == typ && sym.Name == name && sym.CSym == csym {
 				if sym.Found {
 					t.Fatalf("duplicate symbol %s %s", sym.Type, sym.Name)
 				}
@@ -334,14 +334,6 @@
 	testGoLib(t, false)
 }
 
-// Check that a symbol has a given name, accepting both
-// with (for packaged symbols) and without index (for
-// non-package symbols).
-func matchSymName(symname, want string) bool {
-	return symname == want ||
-		strings.HasPrefix(symname, want+"#")
-}
-
 const testexec = `
 package main
 
diff --git a/src/cmd/objdump/objdump_test.go b/src/cmd/objdump/objdump_test.go
index be271e4..c974d67 100644
--- a/src/cmd/objdump/objdump_test.go
+++ b/src/cmd/objdump/objdump_test.go
@@ -14,7 +14,6 @@
 	"os"
 	"os/exec"
 	"path/filepath"
-	"regexp"
 	"runtime"
 	"strings"
 	"testing"
@@ -285,10 +284,9 @@
 	if err != nil {
 		t.Fatalf("go tool compile fmthello.go: %v\n%s", err, out)
 	}
-
 	need := []string{
-		`main#\d+\(SB\)`,
-		`fmthello\.go:6`,
+		"main(SB)",
+		"fmthello.go:6",
 	}
 
 	args = []string{
@@ -304,9 +302,8 @@
 	text := string(out)
 	ok := true
 	for _, s := range need {
-		re := regexp.MustCompile(s)
-		if !re.MatchString(text) {
-			t.Errorf("disassembly missing %q", s)
+		if !strings.Contains(text, s) {
+			t.Errorf("disassembly missing '%s'", s)
 			ok = false
 		}
 	}
diff --git a/src/cmd/vendor/golang.org/x/tools/go/analysis/passes/printf/printf.go b/src/cmd/vendor/golang.org/x/tools/go/analysis/passes/printf/printf.go
index 14f3a47..ddad4c7 100644
--- a/src/cmd/vendor/golang.org/x/tools/go/analysis/passes/printf/printf.go
+++ b/src/cmd/vendor/golang.org/x/tools/go/analysis/passes/printf/printf.go
@@ -805,6 +805,7 @@
 	{'g', sharpNumFlag, argFloat | argComplex},
 	{'G', sharpNumFlag, argFloat | argComplex},
 	{'o', sharpNumFlag, argInt | argPointer},
+	{'O', sharpNumFlag, argInt | argPointer},
 	{'p', "-#", argPointer},
 	{'q', " -+.0#", argRune | argInt | argString},
 	{'s', " -+.0", argString},
diff --git a/src/cmd/vendor/golang.org/x/tools/go/types/objectpath/objectpath.go b/src/cmd/vendor/golang.org/x/tools/go/types/objectpath/objectpath.go
index 882e3b3..cffd7ac 100644
--- a/src/cmd/vendor/golang.org/x/tools/go/types/objectpath/objectpath.go
+++ b/src/cmd/vendor/golang.org/x/tools/go/types/objectpath/objectpath.go
@@ -226,7 +226,8 @@
 	// the best paths because non-types may
 	// refer to types, but not the reverse.
 	empty := make([]byte, 0, 48) // initial space
-	for _, name := range scope.Names() {
+	names := scope.Names()
+	for _, name := range names {
 		o := scope.Lookup(name)
 		tname, ok := o.(*types.TypeName)
 		if !ok {
@@ -253,7 +254,7 @@
 
 	// Then inspect everything else:
 	// non-types, and declared methods of defined types.
-	for _, name := range scope.Names() {
+	for _, name := range names {
 		o := scope.Lookup(name)
 		path := append(empty, name...)
 		if _, ok := o.(*types.TypeName); !ok {
diff --git a/src/cmd/vendor/modules.txt b/src/cmd/vendor/modules.txt
index 8a7976a..334aef0 100644
--- a/src/cmd/vendor/modules.txt
+++ b/src/cmd/vendor/modules.txt
@@ -45,7 +45,7 @@
 golang.org/x/sys/internal/unsafeheader
 golang.org/x/sys/unix
 golang.org/x/sys/windows
-# golang.org/x/tools v0.0.0-20200504152539-33427f1b0364
+# golang.org/x/tools v0.0.0-20200601175630-2caf76543d99
 ## explicit
 golang.org/x/tools/go/analysis
 golang.org/x/tools/go/analysis/internal/analysisflags
diff --git a/src/container/list/list.go b/src/container/list/list.go
index cc9ff09..210424c 100644
--- a/src/container/list/list.go
+++ b/src/container/list/list.go
@@ -219,7 +219,7 @@
 	l.move(e, mark)
 }
 
-// PushBackList inserts a copy of an other list at the back of list l.
+// PushBackList inserts a copy of another list at the back of list l.
 // The lists l and other may be the same. They must not be nil.
 func (l *List) PushBackList(other *List) {
 	l.lazyInit()
@@ -228,7 +228,7 @@
 	}
 }
 
-// PushFrontList inserts a copy of an other list at the front of list l.
+// PushFrontList inserts a copy of another list at the front of list l.
 // The lists l and other may be the same. They must not be nil.
 func (l *List) PushFrontList(other *List) {
 	l.lazyInit()
diff --git a/src/crypto/tls/handshake_client_test.go b/src/crypto/tls/handshake_client_test.go
index de93e1b..1cda901 100644
--- a/src/crypto/tls/handshake_client_test.go
+++ b/src/crypto/tls/handshake_client_test.go
@@ -1464,6 +1464,228 @@
 	}
 }
 
+func TestVerifyConnection(t *testing.T) {
+	t.Run("TLSv12", func(t *testing.T) { testVerifyConnection(t, VersionTLS12) })
+	t.Run("TLSv13", func(t *testing.T) { testVerifyConnection(t, VersionTLS13) })
+}
+
+func testVerifyConnection(t *testing.T, version uint16) {
+	checkFields := func(c ConnectionState, called *int, errorType string) error {
+		if c.Version != version {
+			return fmt.Errorf("%s: got Version %v, want %v", errorType, c.Version, version)
+		}
+		if c.HandshakeComplete {
+			return fmt.Errorf("%s: got HandshakeComplete, want false", errorType)
+		}
+		if c.ServerName != "example.golang" {
+			return fmt.Errorf("%s: got ServerName %s, want %s", errorType, c.ServerName, "example.golang")
+		}
+		if c.NegotiatedProtocol != "protocol1" {
+			return fmt.Errorf("%s: got NegotiatedProtocol %s, want %s", errorType, c.NegotiatedProtocol, "protocol1")
+		}
+		if c.CipherSuite == 0 {
+			return fmt.Errorf("%s: got CipherSuite 0, want non-zero", errorType)
+		}
+		wantDidResume := false
+		if *called == 2 { // if this is the second time, then it should be a resumption
+			wantDidResume = true
+		}
+		if c.DidResume != wantDidResume {
+			return fmt.Errorf("%s: got DidResume %t, want %t", errorType, c.DidResume, wantDidResume)
+		}
+		return nil
+	}
+
+	tests := []struct {
+		name            string
+		configureServer func(*Config, *int)
+		configureClient func(*Config, *int)
+	}{
+		{
+			name: "RequireAndVerifyClientCert",
+			configureServer: func(config *Config, called *int) {
+				config.ClientAuth = RequireAndVerifyClientCert
+				config.VerifyConnection = func(c ConnectionState) error {
+					*called++
+					if l := len(c.PeerCertificates); l != 1 {
+						return fmt.Errorf("server: got len(PeerCertificates) = %d, wanted 1", l)
+					}
+					if len(c.VerifiedChains) == 0 {
+						return fmt.Errorf("server: got len(VerifiedChains) = 0, wanted non-zero")
+					}
+					return checkFields(c, called, "server")
+				}
+			},
+			configureClient: func(config *Config, called *int) {
+				config.VerifyConnection = func(c ConnectionState) error {
+					*called++
+					if l := len(c.PeerCertificates); l != 1 {
+						return fmt.Errorf("client: got len(PeerCertificates) = %d, wanted 1", l)
+					}
+					if len(c.VerifiedChains) == 0 {
+						return fmt.Errorf("client: got len(VerifiedChains) = 0, wanted non-zero")
+					}
+					if c.DidResume {
+						return nil
+						// The SCTs and OCSP Responce are dropped on resumption.
+						// See http://golang.org/issue/39075.
+					}
+					if len(c.OCSPResponse) == 0 {
+						return fmt.Errorf("client: got len(OCSPResponse) = 0, wanted non-zero")
+					}
+					if len(c.SignedCertificateTimestamps) == 0 {
+						return fmt.Errorf("client: got len(SignedCertificateTimestamps) = 0, wanted non-zero")
+					}
+					return checkFields(c, called, "client")
+				}
+			},
+		},
+		{
+			name: "InsecureSkipVerify",
+			configureServer: func(config *Config, called *int) {
+				config.ClientAuth = RequireAnyClientCert
+				config.InsecureSkipVerify = true
+				config.VerifyConnection = func(c ConnectionState) error {
+					*called++
+					if l := len(c.PeerCertificates); l != 1 {
+						return fmt.Errorf("server: got len(PeerCertificates) = %d, wanted 1", l)
+					}
+					if c.VerifiedChains != nil {
+						return fmt.Errorf("server: got Verified Chains %v, want nil", c.VerifiedChains)
+					}
+					return checkFields(c, called, "server")
+				}
+			},
+			configureClient: func(config *Config, called *int) {
+				config.InsecureSkipVerify = true
+				config.VerifyConnection = func(c ConnectionState) error {
+					*called++
+					if l := len(c.PeerCertificates); l != 1 {
+						return fmt.Errorf("client: got len(PeerCertificates) = %d, wanted 1", l)
+					}
+					if c.VerifiedChains != nil {
+						return fmt.Errorf("server: got Verified Chains %v, want nil", c.VerifiedChains)
+					}
+					if c.DidResume {
+						return nil
+						// The SCTs and OCSP Responce are dropped on resumption.
+						// See http://golang.org/issue/39075.
+					}
+					if len(c.OCSPResponse) == 0 {
+						return fmt.Errorf("client: got len(OCSPResponse) = 0, wanted non-zero")
+					}
+					if len(c.SignedCertificateTimestamps) == 0 {
+						return fmt.Errorf("client: got len(SignedCertificateTimestamps) = 0, wanted non-zero")
+					}
+					return checkFields(c, called, "client")
+				}
+			},
+		},
+		{
+			name: "NoClientCert",
+			configureServer: func(config *Config, called *int) {
+				config.ClientAuth = NoClientCert
+				config.VerifyConnection = func(c ConnectionState) error {
+					*called++
+					return checkFields(c, called, "server")
+				}
+			},
+			configureClient: func(config *Config, called *int) {
+				config.VerifyConnection = func(c ConnectionState) error {
+					*called++
+					return checkFields(c, called, "client")
+				}
+			},
+		},
+		{
+			name: "RequestClientCert",
+			configureServer: func(config *Config, called *int) {
+				config.ClientAuth = RequestClientCert
+				config.VerifyConnection = func(c ConnectionState) error {
+					*called++
+					return checkFields(c, called, "server")
+				}
+			},
+			configureClient: func(config *Config, called *int) {
+				config.Certificates = nil // clear the client cert
+				config.VerifyConnection = func(c ConnectionState) error {
+					*called++
+					if l := len(c.PeerCertificates); l != 1 {
+						return fmt.Errorf("client: got len(PeerCertificates) = %d, wanted 1", l)
+					}
+					if len(c.VerifiedChains) == 0 {
+						return fmt.Errorf("client: got len(VerifiedChains) = 0, wanted non-zero")
+					}
+					if c.DidResume {
+						return nil
+						// The SCTs and OCSP Responce are dropped on resumption.
+						// See http://golang.org/issue/39075.
+					}
+					if len(c.OCSPResponse) == 0 {
+						return fmt.Errorf("client: got len(OCSPResponse) = 0, wanted non-zero")
+					}
+					if len(c.SignedCertificateTimestamps) == 0 {
+						return fmt.Errorf("client: got len(SignedCertificateTimestamps) = 0, wanted non-zero")
+					}
+					return checkFields(c, called, "client")
+				}
+			},
+		},
+	}
+	for _, test := range tests {
+		issuer, err := x509.ParseCertificate(testRSACertificateIssuer)
+		if err != nil {
+			panic(err)
+		}
+		rootCAs := x509.NewCertPool()
+		rootCAs.AddCert(issuer)
+
+		var serverCalled, clientCalled int
+
+		serverConfig := &Config{
+			MaxVersion:   version,
+			Certificates: []Certificate{testConfig.Certificates[0]},
+			ClientCAs:    rootCAs,
+			NextProtos:   []string{"protocol1"},
+		}
+		serverConfig.Certificates[0].SignedCertificateTimestamps = [][]byte{[]byte("dummy sct 1"), []byte("dummy sct 2")}
+		serverConfig.Certificates[0].OCSPStaple = []byte("dummy ocsp")
+		test.configureServer(serverConfig, &serverCalled)
+
+		clientConfig := &Config{
+			MaxVersion:         version,
+			ClientSessionCache: NewLRUClientSessionCache(32),
+			RootCAs:            rootCAs,
+			ServerName:         "example.golang",
+			Certificates:       []Certificate{testConfig.Certificates[0]},
+			NextProtos:         []string{"protocol1"},
+		}
+		test.configureClient(clientConfig, &clientCalled)
+
+		testHandshakeState := func(name string, didResume bool) {
+			_, hs, err := testHandshake(t, clientConfig, serverConfig)
+			if err != nil {
+				t.Fatalf("%s: handshake failed: %s", name, err)
+			}
+			if hs.DidResume != didResume {
+				t.Errorf("%s: resumed: %v, expected: %v", name, hs.DidResume, didResume)
+			}
+			wantCalled := 1
+			if didResume {
+				wantCalled = 2 // resumption would mean this is the second time it was called in this test
+			}
+			if clientCalled != wantCalled {
+				t.Errorf("%s: expected client VerifyConnection called %d times, did %d times", name, wantCalled, clientCalled)
+			}
+			if serverCalled != wantCalled {
+				t.Errorf("%s: expected server VerifyConnection called %d times, did %d times", name, wantCalled, serverCalled)
+			}
+		}
+		testHandshakeState(fmt.Sprintf("%s-FullHandshake", test.name), false)
+		testHandshakeState(fmt.Sprintf("%s-Resumption", test.name), true)
+	}
+}
+
 func TestVerifyPeerCertificate(t *testing.T) {
 	t.Run("TLSv12", func(t *testing.T) { testVerifyPeerCertificate(t, VersionTLS12) })
 	t.Run("TLSv13", func(t *testing.T) { testVerifyPeerCertificate(t, VersionTLS13) })
diff --git a/src/crypto/tls/handshake_server.go b/src/crypto/tls/handshake_server.go
index 57fba10..16d3e64 100644
--- a/src/crypto/tls/handshake_server.go
+++ b/src/crypto/tls/handshake_server.go
@@ -308,6 +308,7 @@
 		c.sendAlert(alertHandshakeFailure)
 		return errors.New("tls: no cipher suite supported by both client and server")
 	}
+	c.cipherSuite = hs.suite.id
 
 	for _, id := range hs.clientHello.cipherSuites {
 		if id == TLS_FALLBACK_SCSV {
@@ -407,6 +408,7 @@
 	c := hs.c
 
 	hs.hello.cipherSuite = hs.suite.id
+	c.cipherSuite = hs.suite.id
 	// We echo the client's session ID in the ServerHello to let it know
 	// that we're doing a resumption.
 	hs.hello.sessionId = hs.clientHello.sessionId
@@ -425,6 +427,13 @@
 		return err
 	}
 
+	if c.config.VerifyConnection != nil {
+		if err := c.config.VerifyConnection(c.connectionStateLocked()); err != nil {
+			c.sendAlert(alertBadCertificate)
+			return err
+		}
+	}
+
 	hs.masterSecret = hs.sessionState.masterSecret
 
 	return nil
@@ -548,14 +557,11 @@
 		if err != nil {
 			return err
 		}
-	} else {
-		// Make sure the connection is still being verified whether or not
-		// the server requested a client certificate.
-		if c.config.VerifyConnection != nil {
-			if err := c.config.VerifyConnection(c.connectionStateLocked()); err != nil {
-				c.sendAlert(alertBadCertificate)
-				return err
-			}
+	}
+	if c.config.VerifyConnection != nil {
+		if err := c.config.VerifyConnection(c.connectionStateLocked()); err != nil {
+			c.sendAlert(alertBadCertificate)
+			return err
 		}
 	}
 
@@ -739,7 +745,6 @@
 		return err
 	}
 
-	c.cipherSuite = hs.suite.id
 	copy(out, finished.verifyData)
 
 	return nil
@@ -805,13 +810,6 @@
 		}
 	}
 
-	if c.config.VerifyConnection != nil {
-		if err := c.config.VerifyConnection(c.connectionStateLocked()); err != nil {
-			c.sendAlert(alertBadCertificate)
-			return err
-		}
-	}
-
 	return nil
 }
 
diff --git a/src/crypto/tls/handshake_server_tls13.go b/src/crypto/tls/handshake_server_tls13.go
index fb7f871..92d55e0 100644
--- a/src/crypto/tls/handshake_server_tls13.go
+++ b/src/crypto/tls/handshake_server_tls13.go
@@ -783,6 +783,13 @@
 		return err
 	}
 
+	if c.config.VerifyConnection != nil {
+		if err := c.config.VerifyConnection(c.connectionStateLocked()); err != nil {
+			c.sendAlert(alertBadCertificate)
+			return err
+		}
+	}
+
 	if len(certMsg.certificate.Certificate) != 0 {
 		msg, err = c.readHandshake()
 		if err != nil {
diff --git a/src/crypto/tls/tls_test.go b/src/crypto/tls/tls_test.go
index 9e34077..d523802 100644
--- a/src/crypto/tls/tls_test.go
+++ b/src/crypto/tls/tls_test.go
@@ -785,11 +785,6 @@
 	typ := v.Type()
 	for i := 0; i < typ.NumField(); i++ {
 		f := v.Field(i)
-		if !f.CanSet() {
-			// unexported field; not cloned.
-			continue
-		}
-
 		// testing/quick can't handle functions or interfaces and so
 		// isn't used here.
 		switch fn := typ.Field(i).Name; fn {
@@ -830,17 +825,17 @@
 			f.Set(reflect.ValueOf([]CurveID{CurveP256}))
 		case "Renegotiation":
 			f.Set(reflect.ValueOf(RenegotiateOnceAsClient))
+		case "mutex", "autoSessionTicketKeys", "sessionTicketKeys":
+			continue // these are unexported fields that are handled separately
 		default:
 			t.Errorf("all fields must be accounted for, but saw unknown field %q", fn)
 		}
 	}
+	// Set the unexported fields related to session ticket keys, which are copied with Clone().
+	c1.autoSessionTicketKeys = []ticketKey{c1.ticketKeyFromBytes(c1.SessionTicketKey)}
+	c1.sessionTicketKeys = []ticketKey{c1.ticketKeyFromBytes(c1.SessionTicketKey)}
 
 	c2 := c1.Clone()
-	// DeepEqual also compares unexported fields, thus c2 needs to have run
-	// serverInit in order to be DeepEqual to c1. Cloning it and discarding
-	// the result is sufficient.
-	c2.Clone()
-
 	if !reflect.DeepEqual(&c1, c2) {
 		t.Errorf("clone failed to copy a field")
 	}
diff --git a/src/crypto/x509/root_darwin_amd64.go b/src/crypto/x509/root_darwin_amd64.go
index 3ddd3a4..8ad5a96 100644
--- a/src/crypto/x509/root_darwin_amd64.go
+++ b/src/crypto/x509/root_darwin_amd64.go
@@ -140,20 +140,39 @@
 //
 // https://developer.apple.com/documentation/security/1400261-sectrustsettingscopytrustsetting
 func sslTrustSettingsResult(cert macOS.CFRef) (macOS.SecTrustSettingsResult, error) {
+	// In Apple's implementation user trust settings override admin trust settings
+	// (which themselves override system trust settings). If SecTrustSettingsCopyTrustSettings
+	// fails, or returns a NULL trust settings, when looking for the user trust
+	// settings then fallback to checking the admin trust settings.
+	//
+	// See Security-59306.41.2/trust/headers/SecTrustSettings.h for a description of
+	// the trust settings overrides, and SecLegacyAnchorSourceCopyUsageConstraints in
+	// Security-59306.41.2/trust/trustd/SecCertificateSource.c for a concrete example
+	// of how Apple applies the override in the case of NULL trust settings, or non
+	// success errors.
 	trustSettings, err := macOS.SecTrustSettingsCopyTrustSettings(cert, macOS.SecTrustSettingsDomainUser)
-	// According to Apple's SecTrustServer.c, "user trust settings overrule
-	// admin trust settings", but the rules of the override are unclear. Let's
-	// assume admin trust settings are applicable if and only if there are no
-	// user trust settings.
-	if err == macOS.ErrNoTrustSettings {
-		trustSettings, err = macOS.SecTrustSettingsCopyTrustSettings(cert, macOS.SecTrustSettingsDomainAdmin)
-		// "no trust settings [...] means 'this certificate must be verified to a known trusted certificate'"
-		if err == macOS.ErrNoTrustSettings {
-			return macOS.SecTrustSettingsResultUnspecified, nil
+	if err != nil || trustSettings == 0 {
+		if debugDarwinRoots && err != macOS.ErrNoTrustSettings {
+			fmt.Fprintf(os.Stderr, "crypto/x509: SecTrustSettingsCopyTrustSettings for SecTrustSettingsDomainUser failed: %s\n", err)
 		}
+		trustSettings, err = macOS.SecTrustSettingsCopyTrustSettings(cert, macOS.SecTrustSettingsDomainAdmin)
 	}
-	if err != nil {
-		return 0, err
+	if err != nil || trustSettings == 0 {
+		// If there are neither user nor admin trust settings for a certificate returned
+		// from SecTrustSettingsCopyCertificates Apple returns kSecTrustSettingsResultInvalid,
+		// as this method is intended to return certificates _which have trust settings_.
+		// The most likely case for this being triggered is that the existing trust settings
+		// are invalid and cannot be properly parsed. In this case SecTrustSettingsCopyTrustSettings
+		// returns errSecInvalidTrustSettings. The existing cgo implementation returns
+		// kSecTrustSettingsResultUnspecified in this case, which mostly matches the Apple
+		// implementation because we don't do anything with certificates marked with this
+		// result.
+		//
+		// See SecPVCGetTrustSettingsResult in Security-59306.41.2/trust/trustd/SecPolicyServer.c
+		if debugDarwinRoots && err != macOS.ErrNoTrustSettings {
+			fmt.Fprintf(os.Stderr, "crypto/x509: SecTrustSettingsCopyTrustSettings for SecTrustSettingsDomainAdmin failed: %s\n", err)
+		}
+		return macOS.SecTrustSettingsResultUnspecified, nil
 	}
 	defer macOS.CFRelease(trustSettings)
 
diff --git a/src/crypto/x509/verify.go b/src/crypto/x509/verify.go
index a058f34..be11e730 100644
--- a/src/crypto/x509/verify.go
+++ b/src/crypto/x509/verify.go
@@ -744,6 +744,12 @@
 // the name being validated. Note that DirectoryName constraints are not
 // supported.
 //
+// Name constraint validation follows the rules from RFC 5280, with the
+// addition that DNS name constraints may use the leading period format
+// defined for emails and URIs. When a constraint has a leading period
+// it indicates that at least one additional label must be prepended to
+// the constrained name to be considered valid.
+//
 // Extended Key Usage values are enforced down a chain, so an intermediate or
 // root that enumerates EKUs prevents a leaf from asserting an EKU not in that
 // list.
diff --git a/src/database/sql/driver/driver.go b/src/database/sql/driver/driver.go
index 99fbd43..5bbcf20 100644
--- a/src/database/sql/driver/driver.go
+++ b/src/database/sql/driver/driver.go
@@ -96,7 +96,7 @@
 
 // If a Driver implements DriverContext, then sql.DB will call
 // OpenConnector to obtain a Connector and then invoke
-// that Connector's Conn method to obtain each needed connection,
+// that Connector's Connect method to obtain each needed connection,
 // instead of invoking the Driver's Open method for each connection.
 // The two-step sequence allows drivers to parse the name just once
 // and also provides access to per-Conn contexts.
diff --git a/src/go/build/doc.go b/src/go/build/doc.go
index 9633d59..2c6f0a8 100644
--- a/src/go/build/doc.go
+++ b/src/go/build/doc.go
@@ -59,99 +59,15 @@
 //
 // A build constraint, also known as a build tag, is a line comment that begins
 //
-//	// +build
+// 	// +build
 //
-// that lists the conditions under which a file should be included in the package.
-// Constraints may appear in any kind of source file (not just Go), but
-// they must appear near the top of the file, preceded
-// only by blank lines and other line comments. These rules mean that in Go
-// files a build constraint must appear before the package clause.
+// that lists the conditions under which a file should be included in the
+// package. Build constraints may also be part of a file's name
+// (for example, source_windows.go will only be included if the target
+// operating system is windows).
 //
-// To distinguish build constraints from package documentation, a series of
-// build constraints must be followed by a blank line.
-//
-// A build constraint is evaluated as the OR of space-separated options.
-// Each option evaluates as the AND of its comma-separated terms.
-// Each term consists of letters, digits, underscores, and dots.
-// A term may be negated with a preceding !.
-// For example, the build constraint:
-//
-//	// +build linux,386 darwin,!cgo
-//
-// corresponds to the boolean formula:
-//
-//	(linux AND 386) OR (darwin AND (NOT cgo))
-//
-// A file may have multiple build constraints. The overall constraint is the AND
-// of the individual constraints. That is, the build constraints:
-//
-//	// +build linux darwin
-//	// +build amd64
-//
-// corresponds to the boolean formula:
-//
-//	(linux OR darwin) AND amd64
-//
-// During a particular build, the following words are satisfied:
-//
-//	- the target operating system, as spelled by runtime.GOOS
-//	- the target architecture, as spelled by runtime.GOARCH
-//	- the compiler being used, either "gc" or "gccgo"
-//	- "cgo", if ctxt.CgoEnabled is true
-//	- "go1.1", from Go version 1.1 onward
-//	- "go1.2", from Go version 1.2 onward
-//	- "go1.3", from Go version 1.3 onward
-//	- "go1.4", from Go version 1.4 onward
-//	- "go1.5", from Go version 1.5 onward
-//	- "go1.6", from Go version 1.6 onward
-//	- "go1.7", from Go version 1.7 onward
-//	- "go1.8", from Go version 1.8 onward
-//	- "go1.9", from Go version 1.9 onward
-//	- "go1.10", from Go version 1.10 onward
-//	- "go1.11", from Go version 1.11 onward
-//	- "go1.12", from Go version 1.12 onward
-//	- "go1.13", from Go version 1.13 onward
-//	- "go1.14", from Go version 1.14 onward
-//	- "go1.15", from Go version 1.15 onward
-//	- any additional words listed in ctxt.BuildTags
-//
-// There are no build tags for beta or minor releases.
-//
-// If a file's name, after stripping the extension and a possible _test suffix,
-// matches any of the following patterns:
-//	*_GOOS
-// 	*_GOARCH
-// 	*_GOOS_GOARCH
-// (example: source_windows_amd64.go) where GOOS and GOARCH represent
-// any known operating system and architecture values respectively, then
-// the file is considered to have an implicit build constraint requiring
-// those terms (in addition to any explicit constraints in the file).
-//
-// To keep a file from being considered for the build:
-//
-//	// +build ignore
-//
-// (any other unsatisfied word will work as well, but ``ignore'' is conventional.)
-//
-// To build a file only when using cgo, and only on Linux and OS X:
-//
-//	// +build linux,cgo darwin,cgo
-//
-// Such a file is usually paired with another file implementing the
-// default functionality for other systems, which in this case would
-// carry the constraint:
-//
-//	// +build !linux,!darwin !cgo
-//
-// Naming a file dns_windows.go will cause it to be included only when
-// building the package for Windows; similarly, math_386.s will be included
-// only when building the package for 32-bit x86.
-//
-// Using GOOS=android matches build tags and files as for GOOS=linux
-// in addition to android tags and files.
-//
-// Using GOOS=illumos matches build tags and files as for GOOS=solaris
-// in addition to illumos tags and files.
+// See 'go help buildconstraint'
+// (https://golang.org/cmd/go/#hdr-Build_constraints) for details.
 //
 // Binary-Only Packages
 //
diff --git a/src/internal/poll/fd_plan9.go b/src/internal/poll/fd_plan9.go
index e57e041..0b5b937 100644
--- a/src/internal/poll/fd_plan9.go
+++ b/src/internal/poll/fd_plan9.go
@@ -7,6 +7,7 @@
 import (
 	"errors"
 	"io"
+	"sync"
 	"sync/atomic"
 	"time"
 )
@@ -24,6 +25,8 @@
 	Destroy func()
 
 	// deadlines
+	rmu       sync.Mutex
+	wmu       sync.Mutex
 	raio      *asyncIO
 	waio      *asyncIO
 	rtimer    *time.Timer
@@ -59,9 +62,6 @@
 
 // Read implements io.Reader.
 func (fd *FD) Read(fn func([]byte) (int, error), b []byte) (int, error) {
-	if fd.rtimedout.isSet() {
-		return 0, ErrDeadlineExceeded
-	}
 	if err := fd.readLock(); err != nil {
 		return 0, err
 	}
@@ -69,7 +69,13 @@
 	if len(b) == 0 {
 		return 0, nil
 	}
+	fd.rmu.Lock()
+	if fd.rtimedout.isSet() {
+		fd.rmu.Unlock()
+		return 0, ErrDeadlineExceeded
+	}
 	fd.raio = newAsyncIO(fn, b)
+	fd.rmu.Unlock()
 	n, err := fd.raio.Wait()
 	fd.raio = nil
 	if isHangup(err) {
@@ -83,14 +89,17 @@
 
 // Write implements io.Writer.
 func (fd *FD) Write(fn func([]byte) (int, error), b []byte) (int, error) {
-	if fd.wtimedout.isSet() {
-		return 0, ErrDeadlineExceeded
-	}
 	if err := fd.writeLock(); err != nil {
 		return 0, err
 	}
 	defer fd.writeUnlock()
+	fd.wmu.Lock()
+	if fd.wtimedout.isSet() {
+		fd.wmu.Unlock()
+		return 0, ErrDeadlineExceeded
+	}
 	fd.waio = newAsyncIO(fn, b)
+	fd.wmu.Unlock()
 	n, err := fd.waio.Wait()
 	fd.waio = nil
 	if isInterrupted(err) {
@@ -117,9 +126,13 @@
 func setDeadlineImpl(fd *FD, t time.Time, mode int) error {
 	d := t.Sub(time.Now())
 	if mode == 'r' || mode == 'r'+'w' {
+		fd.rmu.Lock()
+		defer fd.rmu.Unlock()
 		fd.rtimedout.setFalse()
 	}
 	if mode == 'w' || mode == 'r'+'w' {
+		fd.wmu.Lock()
+		defer fd.wmu.Unlock()
 		fd.wtimedout.setFalse()
 	}
 	if t.IsZero() || d < 0 {
@@ -140,18 +153,22 @@
 		// Interrupt I/O operation once timer has expired
 		if mode == 'r' || mode == 'r'+'w' {
 			fd.rtimer = time.AfterFunc(d, func() {
+				fd.rmu.Lock()
 				fd.rtimedout.setTrue()
 				if fd.raio != nil {
 					fd.raio.Cancel()
 				}
+				fd.rmu.Unlock()
 			})
 		}
 		if mode == 'w' || mode == 'r'+'w' {
 			fd.wtimer = time.AfterFunc(d, func() {
+				fd.wmu.Lock()
 				fd.wtimedout.setTrue()
 				if fd.waio != nil {
 					fd.waio.Cancel()
 				}
+				fd.wmu.Unlock()
 			})
 		}
 	}
diff --git a/src/io/ioutil/ioutil.go b/src/io/ioutil/ioutil.go
index b1cb841..acc6ec3 100644
--- a/src/io/ioutil/ioutil.go
+++ b/src/io/ioutil/ioutil.go
@@ -75,7 +75,7 @@
 
 // WriteFile writes data to a file named by filename.
 // If the file does not exist, WriteFile creates it with permissions perm
-// (before umask); otherwise WriteFile truncates it before writing.
+// (before umask); otherwise WriteFile truncates it before writing, without changing permissions.
 func WriteFile(filename string, data []byte, perm os.FileMode) error {
 	f, err := os.OpenFile(filename, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, perm)
 	if err != nil {
diff --git a/src/net/http/httptest/recorder.go b/src/net/http/httptest/recorder.go
index 1369745..66e67e7 100644
--- a/src/net/http/httptest/recorder.go
+++ b/src/net/http/httptest/recorder.go
@@ -226,9 +226,9 @@
 	if cl == "" {
 		return -1
 	}
-	n, err := strconv.ParseInt(cl, 10, 64)
+	n, err := strconv.ParseUint(cl, 10, 63)
 	if err != nil {
 		return -1
 	}
-	return n
+	return int64(n)
 }
diff --git a/src/net/http/httptest/recorder_test.go b/src/net/http/httptest/recorder_test.go
index 0986554..e953489 100644
--- a/src/net/http/httptest/recorder_test.go
+++ b/src/net/http/httptest/recorder_test.go
@@ -310,3 +310,39 @@
 		})
 	}
 }
+
+// issue 39017 - disallow Content-Length values such as "+3"
+func TestParseContentLength(t *testing.T) {
+	tests := []struct {
+		cl   string
+		want int64
+	}{
+		{
+			cl:   "3",
+			want: 3,
+		},
+		{
+			cl:   "+3",
+			want: -1,
+		},
+		{
+			cl:   "-3",
+			want: -1,
+		},
+		{
+			// max int64, for safe conversion before returning
+			cl:   "9223372036854775807",
+			want: 9223372036854775807,
+		},
+		{
+			cl:   "9223372036854775808",
+			want: -1,
+		},
+	}
+
+	for _, tt := range tests {
+		if got := parseContentLength(tt.cl); got != tt.want {
+			t.Errorf("%q:\n\tgot=%d\n\twant=%d", tt.cl, got, tt.want)
+		}
+	}
+}
diff --git a/src/net/http/transfer.go b/src/net/http/transfer.go
index 9019afb..50d434b 100644
--- a/src/net/http/transfer.go
+++ b/src/net/http/transfer.go
@@ -1039,11 +1039,11 @@
 	if cl == "" {
 		return -1, nil
 	}
-	n, err := strconv.ParseInt(cl, 10, 64)
-	if err != nil || n < 0 {
+	n, err := strconv.ParseUint(cl, 10, 63)
+	if err != nil {
 		return 0, badStringError("bad Content-Length", cl)
 	}
-	return n, nil
+	return int64(n), nil
 
 }
 
diff --git a/src/net/http/transfer_test.go b/src/net/http/transfer_test.go
index e27d34d..185225f 100644
--- a/src/net/http/transfer_test.go
+++ b/src/net/http/transfer_test.go
@@ -326,3 +326,39 @@
 		}
 	}
 }
+
+// issue 39017 - disallow Content-Length values such as "+3"
+func TestParseContentLength(t *testing.T) {
+	tests := []struct {
+		cl      string
+		wantErr error
+	}{
+		{
+			cl:      "3",
+			wantErr: nil,
+		},
+		{
+			cl:      "+3",
+			wantErr: badStringError("bad Content-Length", "+3"),
+		},
+		{
+			cl:      "-3",
+			wantErr: badStringError("bad Content-Length", "-3"),
+		},
+		{
+			// max int64, for safe conversion before returning
+			cl:      "9223372036854775807",
+			wantErr: nil,
+		},
+		{
+			cl:      "9223372036854775808",
+			wantErr: badStringError("bad Content-Length", "9223372036854775808"),
+		},
+	}
+
+	for _, tt := range tests {
+		if _, gotErr := parseContentLength(tt.cl); !reflect.DeepEqual(gotErr, tt.wantErr) {
+			t.Errorf("%q:\n\tgot=%v\n\twant=%v", tt.cl, gotErr, tt.wantErr)
+		}
+	}
+}
diff --git a/src/net/http/transport_test.go b/src/net/http/transport_test.go
index 5ccb3d1..99056a4 100644
--- a/src/net/http/transport_test.go
+++ b/src/net/http/transport_test.go
@@ -6222,3 +6222,22 @@
 		t.Error(err)
 	}
 }
+
+// Issue 39017. Ensure that HTTP/1 transports reject Content-Length headers
+// that contain a sign (eg. "+3"), per RFC 2616, Section 14.13.
+func TestTransportRejectsSignInContentLength(t *testing.T) {
+	cst := httptest.NewServer(HandlerFunc(func(w ResponseWriter, r *Request) {
+		w.Header().Set("Content-Length", "+3")
+		w.Write([]byte("abc"))
+	}))
+	defer cst.Close()
+
+	c := cst.Client()
+	res, err := c.Get(cst.URL)
+	if err == nil || res != nil {
+		t.Fatal("Expected a non-nil error and a nil http.Response")
+	}
+	if got, want := err.Error(), `bad Content-Length "+3"`; !strings.Contains(got, want) {
+		t.Fatalf("Error mismatch\nGot: %q\nWanted substring: %q", got, want)
+	}
+}
diff --git a/src/runtime/extern.go b/src/runtime/extern.go
index 4fa21f0..7316503 100644
--- a/src/runtime/extern.go
+++ b/src/runtime/extern.go
@@ -87,7 +87,7 @@
 	When set to 0 memory profiling is disabled.  Refer to the description of
 	MemProfileRate for the default value.
 
-	invalidptr: defaults to invalidptr=1, causing the garbage collector and stack
+	invalidptr: invalidptr=1 (the default) causes the garbage collector and stack
 	copier to crash the program if an invalid pointer value (for example, 1)
 	is found in a pointer-typed location. Setting invalidptr=0 disables this check.
 	This should only be used as a temporary workaround to diagnose buggy code.
diff --git a/src/runtime/lock_futex.go b/src/runtime/lock_futex.go
index 29b7be0..91467fd 100644
--- a/src/runtime/lock_futex.go
+++ b/src/runtime/lock_futex.go
@@ -238,8 +238,8 @@
 	return ok
 }
 
-func beforeIdle(int64) bool {
-	return false
+func beforeIdle(int64) (*g, bool) {
+	return nil, false
 }
 
 func checkTimeouts() {}
diff --git a/src/runtime/lock_js.go b/src/runtime/lock_js.go
index 429ce63..14bdc76 100644
--- a/src/runtime/lock_js.go
+++ b/src/runtime/lock_js.go
@@ -173,7 +173,9 @@
 // beforeIdle gets called by the scheduler if no goroutine is awake.
 // If we are not already handling an event, then we pause for an async event.
 // If an event handler returned, we resume it and it will pause the execution.
-func beforeIdle(delay int64) bool {
+// beforeIdle either returns the specific goroutine to schedule next or
+// indicates with otherReady that some goroutine became ready.
+func beforeIdle(delay int64) (gp *g, otherReady bool) {
 	if delay > 0 {
 		clearIdleID()
 		if delay < 1e6 {
@@ -190,15 +192,14 @@
 
 	if len(events) == 0 {
 		go handleAsyncEvent()
-		return true
+		return nil, true
 	}
 
 	e := events[len(events)-1]
 	if e.returned {
-		goready(e.gp, 1)
-		return true
+		return e.gp, false
 	}
-	return false
+	return nil, false
 }
 
 func handleAsyncEvent() {
diff --git a/src/runtime/lock_sema.go b/src/runtime/lock_sema.go
index bf2584a..671e524 100644
--- a/src/runtime/lock_sema.go
+++ b/src/runtime/lock_sema.go
@@ -297,8 +297,8 @@
 	return ok
 }
 
-func beforeIdle(int64) bool {
-	return false
+func beforeIdle(int64) (*g, bool) {
+	return nil, false
 }
 
 func checkTimeouts() {}
diff --git a/src/runtime/lockrank.go b/src/runtime/lockrank.go
index a4fe921..0001935 100644
--- a/src/runtime/lockrank.go
+++ b/src/runtime/lockrank.go
@@ -213,7 +213,7 @@
 	lockRankItab:          {},
 	lockRankReflectOffs:   {lockRankItab},
 	lockRankHchan:         {lockRankScavenge, lockRankSweep, lockRankHchan},
-	lockRankFin:           {lockRankSched, lockRankAllg, lockRankTimers, lockRankHchan},
+	lockRankFin:           {lockRankSysmon, lockRankScavenge, lockRankSched, lockRankAllg, lockRankTimers, lockRankHchan},
 	lockRankNotifyList:    {},
 	lockRankTraceBuf:      {lockRankSysmon, lockRankScavenge},
 	lockRankTraceStrings:  {lockRankTraceBuf},
@@ -236,7 +236,7 @@
 	lockRankStackLarge:   {lockRankSysmon, lockRankAssistQueue, lockRankSched, lockRankItab, lockRankHchan, lockRankProf, lockRankGcBitsArenas, lockRankRoot, lockRankMcentral, lockRankSpanSetSpine, lockRankGscan},
 	lockRankDefer:        {},
 	lockRankSudog:        {lockRankNotifyList, lockRankHchan},
-	lockRankWbufSpans:    {lockRankScavenge, lockRankSweepWaiters, lockRankAssistQueue, lockRankSweep, lockRankSched, lockRankAllg, lockRankPollDesc, lockRankTimers, lockRankItab, lockRankReflectOffs, lockRankHchan, lockRankNotifyList, lockRankTraceStrings, lockRankMspanSpecial, lockRankProf, lockRankRoot, lockRankGscan, lockRankDefer, lockRankSudog},
+	lockRankWbufSpans:    {lockRankSysmon, lockRankScavenge, lockRankSweepWaiters, lockRankAssistQueue, lockRankSweep, lockRankSched, lockRankAllg, lockRankPollDesc, lockRankTimers, lockRankItab, lockRankReflectOffs, lockRankHchan, lockRankNotifyList, lockRankTraceStrings, lockRankMspanSpecial, lockRankProf, lockRankRoot, lockRankGscan, lockRankDefer, lockRankSudog},
 	lockRankMheap:        {lockRankSysmon, lockRankScavenge, lockRankSweepWaiters, lockRankAssistQueue, lockRankCpuprof, lockRankSweep, lockRankSched, lockRankAllg, lockRankAllp, lockRankPollDesc, lockRankTimers, lockRankItab, lockRankReflectOffs, lockRankNotifyList, lockRankTraceBuf, lockRankTraceStrings, lockRankHchan, lockRankMspanSpecial, lockRankProf, lockRankGcBitsArenas, lockRankRoot, lockRankMcentral, lockRankGscan, lockRankStackpool, lockRankStackLarge, lockRankDefer, lockRankSudog, lockRankWbufSpans, lockRankSpanSetSpine},
 	lockRankMheapSpecial: {lockRankSysmon, lockRankScavenge, lockRankAssistQueue, lockRankCpuprof, lockRankSweep, lockRankSched, lockRankAllg, lockRankAllp, lockRankTimers, lockRankItab, lockRankReflectOffs, lockRankNotifyList, lockRankTraceBuf, lockRankTraceStrings, lockRankHchan},
 	lockRankGlobalAlloc:  {lockRankProf, lockRankSpine, lockRankSpanSetSpine, lockRankMheap, lockRankMheapSpecial},
diff --git a/src/runtime/memclr_arm.s b/src/runtime/memclr_arm.s
index ea3c67a..7326b8b 100644
--- a/src/runtime/memclr_arm.s
+++ b/src/runtime/memclr_arm.s
@@ -1,5 +1,5 @@
 // Inferno's libkern/memset-arm.s
-// https://bitbucket.org/inferno-os/inferno-os/src/default/libkern/memset-arm.s
+// https://bitbucket.org/inferno-os/inferno-os/src/master/libkern/memset-arm.s
 //
 //         Copyright © 1994-1999 Lucent Technologies Inc. All rights reserved.
 //         Revisions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com).  All rights reserved.
diff --git a/src/runtime/memmove_386.s b/src/runtime/memmove_386.s
index ecadee3..d99546c 100644
--- a/src/runtime/memmove_386.s
+++ b/src/runtime/memmove_386.s
@@ -1,5 +1,5 @@
 // Inferno's libkern/memmove-386.s
-// https://bitbucket.org/inferno-os/inferno-os/src/default/libkern/memmove-386.s
+// https://bitbucket.org/inferno-os/inferno-os/src/master/libkern/memmove-386.s
 //
 //         Copyright © 1994-1999 Lucent Technologies Inc. All rights reserved.
 //         Revisions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com).  All rights reserved.
diff --git a/src/runtime/memmove_amd64.s b/src/runtime/memmove_amd64.s
index 9458351..d91641a 100644
--- a/src/runtime/memmove_amd64.s
+++ b/src/runtime/memmove_amd64.s
@@ -1,5 +1,5 @@
 // Derived from Inferno's libkern/memmove-386.s (adapted for amd64)
-// https://bitbucket.org/inferno-os/inferno-os/src/default/libkern/memmove-386.s
+// https://bitbucket.org/inferno-os/inferno-os/src/master/libkern/memmove-386.s
 //
 //         Copyright © 1994-1999 Lucent Technologies Inc. All rights reserved.
 //         Revisions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com).  All rights reserved.
diff --git a/src/runtime/memmove_arm.s b/src/runtime/memmove_arm.s
index 7bad8d2..43d53fa 100644
--- a/src/runtime/memmove_arm.s
+++ b/src/runtime/memmove_arm.s
@@ -1,5 +1,5 @@
 // Inferno's libkern/memmove-arm.s
-// https://bitbucket.org/inferno-os/inferno-os/src/default/libkern/memmove-arm.s
+// https://bitbucket.org/inferno-os/inferno-os/src/master/libkern/memmove-arm.s
 //
 //         Copyright © 1994-1999 Lucent Technologies Inc. All rights reserved.
 //         Revisions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com).  All rights reserved.
diff --git a/src/runtime/memmove_plan9_386.s b/src/runtime/memmove_plan9_386.s
index 1b2f847..cfce0e9 100644
--- a/src/runtime/memmove_plan9_386.s
+++ b/src/runtime/memmove_plan9_386.s
@@ -1,5 +1,5 @@
 // Inferno's libkern/memmove-386.s
-// https://bitbucket.org/inferno-os/inferno-os/src/default/libkern/memmove-386.s
+// https://bitbucket.org/inferno-os/inferno-os/src/master/libkern/memmove-386.s
 //
 //         Copyright © 1994-1999 Lucent Technologies Inc. All rights reserved.
 //         Revisions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com).  All rights reserved.
diff --git a/src/runtime/memmove_plan9_amd64.s b/src/runtime/memmove_plan9_amd64.s
index 68e11d5..217aa60 100644
--- a/src/runtime/memmove_plan9_amd64.s
+++ b/src/runtime/memmove_plan9_amd64.s
@@ -1,5 +1,5 @@
 // Derived from Inferno's libkern/memmove-386.s (adapted for amd64)
-// https://bitbucket.org/inferno-os/inferno-os/src/default/libkern/memmove-386.s
+// https://bitbucket.org/inferno-os/inferno-os/src/master/libkern/memmove-386.s
 //
 //         Copyright © 1994-1999 Lucent Technologies Inc. All rights reserved.
 //         Revisions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com).  All rights reserved.
diff --git a/src/runtime/proc.go b/src/runtime/proc.go
index e5823dd..2399f0a 100644
--- a/src/runtime/proc.go
+++ b/src/runtime/proc.go
@@ -2231,11 +2231,14 @@
 			// Consider stealing timers from p2.
 			// This call to checkTimers is the only place where
 			// we hold a lock on a different P's timers.
-			// Lock contention can be a problem here, so avoid
-			// grabbing the lock if p2 is running and not marked
-			// for preemption. If p2 is running and not being
-			// preempted we assume it will handle its own timers.
-			if i > 2 && shouldStealTimers(p2) {
+			// Lock contention can be a problem here, so
+			// initially avoid grabbing the lock if p2 is running
+			// and is not marked for preemption. If p2 is running
+			// and not being preempted we assume it will handle its
+			// own timers.
+			// If we're still looking for work after checking all
+			// the P's, then go ahead and steal from an active P.
+			if i > 2 || (i > 1 && shouldStealTimers(p2)) {
 				tnow, w, ran := checkTimers(p2, now)
 				now = tnow
 				if w != 0 && (pollUntil == 0 || w < pollUntil) {
@@ -2286,9 +2289,17 @@
 
 	// wasm only:
 	// If a callback returned and no other goroutine is awake,
-	// then pause execution until a callback was triggered.
-	if beforeIdle(delta) {
-		// At least one goroutine got woken.
+	// then wake event handler goroutine which pauses execution
+	// until a callback was triggered.
+	gp, otherReady := beforeIdle(delta)
+	if gp != nil {
+		casgstatus(gp, _Gwaiting, _Grunnable)
+		if trace.enabled {
+			traceGoUnpark(gp, 0)
+		}
+		return gp, false
+	}
+	if otherReady {
 		goto top
 	}
 
diff --git a/src/runtime/runtime-gdb.py b/src/runtime/runtime-gdb.py
index 6139f99..8d96dfb 100644
--- a/src/runtime/runtime-gdb.py
+++ b/src/runtime/runtime-gdb.py
@@ -18,6 +18,7 @@
 from __future__ import print_function
 import re
 import sys
+import gdb
 
 print("Loading Go Runtime support.", file=sys.stderr)
 #http://python3porting.com/differences.html
@@ -98,11 +99,11 @@
 #  Pretty Printers
 #
 
-
+# The patterns for matching types are permissive because gdb 8.2 switched to matching on (we think) typedef names instead of C syntax names.
 class StringTypePrinter:
 	"Pretty print Go strings."
 
-	pattern = re.compile(r'^struct string( \*)?$')
+	pattern = re.compile(r'^(struct string( \*)?|string)$')
 
 	def __init__(self, val):
 		self.val = val
@@ -118,7 +119,7 @@
 class SliceTypePrinter:
 	"Pretty print slices."
 
-	pattern = re.compile(r'^struct \[\]')
+	pattern = re.compile(r'^(struct \[\]|\[\])')
 
 	def __init__(self, val):
 		self.val = val
@@ -127,7 +128,10 @@
 		return 'array'
 
 	def to_string(self):
-		return str(self.val.type)[6:]  # skip 'struct '
+		t = str(self.val.type)
+		if (t.startswith("struct ")):
+			return t[len("struct "):]
+		return t
 
 	def children(self):
 		sval = SliceValue(self.val)
@@ -195,7 +199,7 @@
 	to inspect their contents with this pretty printer.
 	"""
 
-	pattern = re.compile(r'^struct hchan<.*>$')
+	pattern = re.compile(r'^chan ')
 
 	def __init__(self, val):
 		self.val = val
@@ -209,7 +213,7 @@
 	def children(self):
 		# see chan.c chanbuf(). et is the type stolen from hchan<T>::recvq->first->elem
 		et = [x.type for x in self.val['recvq']['first'].type.target().fields() if x.name == 'elem'][0]
-		ptr = (self.val.address + 1).cast(et.pointer())
+		ptr = (self.val.address["buf"]).cast(et)
 		for i in range(self.val["qcount"]):
 			j = (self.val["recvx"] + i) % self.val["dataqsiz"]
 			yield ('[{0}]'.format(i), (ptr + j).dereference())
@@ -229,8 +233,6 @@
 	return matcher
 
 goobjfile.pretty_printers.extend([makematcher(var) for var in vars().values() if hasattr(var, 'pattern')])
-
-
 #
 #  Utilities
 #
diff --git a/src/runtime/runtime-gdb_test.go b/src/runtime/runtime-gdb_test.go
index 2818ada..e52bd1c 100644
--- a/src/runtime/runtime-gdb_test.go
+++ b/src/runtime/runtime-gdb_test.go
@@ -19,6 +19,12 @@
 	"testing"
 )
 
+// NOTE: In some configurations, GDB will segfault when sent a SIGWINCH signal.
+// Some runtime tests send SIGWINCH to the entire process group, so those tests
+// must never run in parallel with GDB tests.
+//
+// See issue 39021 and https://sourceware.org/bugzilla/show_bug.cgi?id=26056.
+
 func checkGdbEnvironment(t *testing.T) {
 	testenv.MustHaveGoBuild(t)
 	switch runtime.GOOS {
@@ -109,8 +115,17 @@
 var gslice []string
 func main() {
 	mapvar := make(map[string]string, 13)
+	slicemap := make(map[string][]string,11)
+    chanint := make(chan int, 10)
+    chanstr := make(chan string, 10)
+    chanint <- 99
+	chanint <- 11
+    chanstr <- "spongepants"
+    chanstr <- "squarebob"
 	mapvar["abc"] = "def"
 	mapvar["ghi"] = "jkl"
+	slicemap["a"] = []string{"b","c","d"}
+    slicemap["e"] = []string{"f","g","h"}
 	strvar := "abc"
 	ptrvar := &strvar
 	slicevar := make([]string, 0, 16)
@@ -119,6 +134,7 @@
 	runtime.KeepAlive(ptrvar)
 	_ = ptrvar // set breakpoint here
 	gslice = slicevar
+	fmt.Printf("%v, %v, %v\n", slicemap, <-chanint, <-chanstr)
 	runtime.KeepAlive(mapvar)
 }  // END_OF_PROGRAM
 `
@@ -221,9 +237,18 @@
 		"-ex", "echo BEGIN print mapvar\n",
 		"-ex", "print mapvar",
 		"-ex", "echo END\n",
+		"-ex", "echo BEGIN print slicemap\n",
+		"-ex", "print slicemap",
+		"-ex", "echo END\n",
 		"-ex", "echo BEGIN print strvar\n",
 		"-ex", "print strvar",
 		"-ex", "echo END\n",
+		"-ex", "echo BEGIN print chanint\n",
+		"-ex", "print chanint",
+		"-ex", "echo END\n",
+		"-ex", "echo BEGIN print chanstr\n",
+		"-ex", "print chanstr",
+		"-ex", "echo END\n",
 		"-ex", "echo BEGIN info locals\n",
 		"-ex", "info locals",
 		"-ex", "echo END\n",
@@ -284,6 +309,23 @@
 		t.Fatalf("print mapvar failed: %s", bl)
 	}
 
+	// 2 orders, and possible differences in spacing.
+	sliceMapSfx1 := `map[string][]string = {["e"] = []string = {"f", "g", "h"}, ["a"] = []string = {"b", "c", "d"}}`
+	sliceMapSfx2 := `map[string][]string = {["a"] = []string = {"b", "c", "d"}, ["e"] = []string = {"f", "g", "h"}}`
+	if bl := strings.ReplaceAll(blocks["print slicemap"], "  ", " "); !strings.HasSuffix(bl, sliceMapSfx1) && !strings.HasSuffix(bl, sliceMapSfx2) {
+		t.Fatalf("print slicemap failed: %s", bl)
+	}
+
+	chanIntSfx := `chan int = {99, 11}`
+	if bl := strings.ReplaceAll(blocks["print chanint"], "  ", " "); !strings.HasSuffix(bl, chanIntSfx) {
+		t.Fatalf("print chanint failed: %s", bl)
+	}
+
+	chanStrSfx := `chan string = {"spongepants", "squarebob"}`
+	if bl := strings.ReplaceAll(blocks["print chanstr"], "  ", " "); !strings.HasSuffix(bl, chanStrSfx) {
+		t.Fatalf("print chanstr failed: %s", bl)
+	}
+
 	strVarRe := regexp.MustCompile(`^\$[0-9]+ = (0x[0-9a-f]+\s+)?"abc"$`)
 	if bl := blocks["print strvar"]; !strVarRe.MatchString(bl) {
 		t.Fatalf("print strvar failed: %s", bl)
diff --git a/src/runtime/testdata/testprogcgo/eintr.go b/src/runtime/testdata/testprogcgo/eintr.go
index 9d9435d..791ff1b 100644
--- a/src/runtime/testdata/testprogcgo/eintr.go
+++ b/src/runtime/testdata/testprogcgo/eintr.go
@@ -89,8 +89,9 @@
 func winch() {
 	ticker := time.NewTicker(100 * time.Microsecond)
 	defer ticker.Stop()
+	pid := syscall.Getpid()
 	for n := 10; n > 0; n-- {
-		syscall.Kill(0, syscall.SIGWINCH)
+		syscall.Kill(pid, syscall.SIGWINCH)
 		<-ticker.C
 	}
 }
diff --git a/src/runtime/vlop_386.s b/src/runtime/vlop_386.s
index 3387c51..b478ff8 100644
--- a/src/runtime/vlop_386.s
+++ b/src/runtime/vlop_386.s
@@ -1,5 +1,5 @@
 // Inferno's libkern/vlop-386.s
-// https://bitbucket.org/inferno-os/inferno-os/src/default/libkern/vlop-386.s
+// https://bitbucket.org/inferno-os/inferno-os/src/master/libkern/vlop-386.s
 //
 //         Copyright © 1994-1999 Lucent Technologies Inc. All rights reserved.
 //         Revisions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com).  All rights reserved.
diff --git a/src/runtime/vlop_arm.s b/src/runtime/vlop_arm.s
index 3f28f03..9e19938 100644
--- a/src/runtime/vlop_arm.s
+++ b/src/runtime/vlop_arm.s
@@ -1,5 +1,5 @@
 // Inferno's libkern/vlop-arm.s
-// https://bitbucket.org/inferno-os/inferno-os/src/default/libkern/vlop-arm.s
+// https://bitbucket.org/inferno-os/inferno-os/src/master/libkern/vlop-arm.s
 //
 //         Copyright © 1994-1999 Lucent Technologies Inc. All rights reserved.
 //         Revisions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com).  All rights reserved.
diff --git a/src/runtime/vlrt.go b/src/runtime/vlrt.go
index 87370f8..38e0b32 100644
--- a/src/runtime/vlrt.go
+++ b/src/runtime/vlrt.go
@@ -1,5 +1,5 @@
 // Inferno's libkern/vlrt-arm.c
-// https://bitbucket.org/inferno-os/inferno-os/src/default/libkern/vlrt-arm.c
+// https://bitbucket.org/inferno-os/inferno-os/src/master/libkern/vlrt-arm.c
 //
 //         Copyright © 1994-1999 Lucent Technologies Inc. All rights reserved.
 //         Revisions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com).  All rights reserved.
diff --git a/src/syscall/dll_windows.go b/src/syscall/dll_windows.go
index 75bc372..c54feec 100644
--- a/src/syscall/dll_windows.go
+++ b/src/syscall/dll_windows.go
@@ -21,6 +21,7 @@
 func (e *DLLError) Error() string { return e.Msg }
 
 // Implemented in ../runtime/syscall_windows.go.
+
 func Syscall(trap, nargs, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
 func Syscall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
 func Syscall9(trap, nargs, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno)
@@ -162,7 +163,15 @@
 // The returned error is always non-nil, constructed from the result of GetLastError.
 // Callers must inspect the primary return value to decide whether an error occurred
 // (according to the semantics of the specific function being called) before consulting
-// the error. The error will be guaranteed to contain syscall.Errno.
+// the error. The error always has type syscall.Errno.
+//
+// On amd64, Call can pass and return floating-point values. To pass
+// an argument x with C type "float", use
+// uintptr(math.Float32bits(x)). To pass an argument with C type
+// "double", use uintptr(math.Float64bits(x)). Floating-point return
+// values are returned in r2. The return value for C type "float" is
+// math.Float32frombits(uint32(r2)). For C type "double", it is
+// math.Float64frombits(uint64(r2)).
 func (p *Proc) Call(a ...uintptr) (r1, r2 uintptr, lastErr error) {
 	switch len(a) {
 	case 0:
diff --git a/src/testing/testing.go b/src/testing/testing.go
index 4a14d49..85da6bb 100644
--- a/src/testing/testing.go
+++ b/src/testing/testing.go
@@ -353,15 +353,14 @@
 }
 
 func (p *testPrinter) Fprint(w io.Writer, testName, out string) {
-	if !p.chatty || strings.HasPrefix(out, "--- PASS") || strings.HasPrefix(out, "--- FAIL") {
-		fmt.Fprint(w, out)
-		return
-	}
-
 	p.lastNameMu.Lock()
 	defer p.lastNameMu.Unlock()
 
-	if strings.HasPrefix(out, "=== CONT") || strings.HasPrefix(out, "=== RUN") {
+	if !p.chatty ||
+		strings.HasPrefix(out, "--- PASS") ||
+		strings.HasPrefix(out, "--- FAIL") ||
+		strings.HasPrefix(out, "=== CONT") ||
+		strings.HasPrefix(out, "=== RUN") {
 		p.lastName = testName
 		fmt.Fprint(w, out)
 		return
diff --git a/src/time/format.go b/src/time/format.go
index b74108f..f11fb7e 100644
--- a/src/time/format.go
+++ b/src/time/format.go
@@ -67,7 +67,7 @@
 // that insist on that format, and RFC3339 should be preferred for new protocols.
 // RFC3339, RFC822, RFC822Z, RFC1123, and RFC1123Z are useful for formatting;
 // when used with time.Parse they do not accept all the time formats
-// permitted by the RFCs.
+// permitted by the RFCs and they do accept time formats not formally defined.
 // The RFC3339Nano format removes trailing zeros from the seconds field
 // and thus may not sort correctly once formatted.
 const (
diff --git a/test/fixedbugs/issue38093.go b/test/fixedbugs/issue38093.go
new file mode 100644
index 0000000..db92664
--- /dev/null
+++ b/test/fixedbugs/issue38093.go
@@ -0,0 +1,49 @@
+// +build js
+// run
+
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Test race condition between timers and wasm calls that led to memory corruption.
+
+package main
+
+import (
+	"os"
+	"syscall/js"
+	"time"
+)
+
+func main() {
+	ch1 := make(chan struct{})
+
+	go func() {
+		for {
+			time.Sleep(5 * time.Millisecond)
+			ch1 <- struct{}{}
+		}
+	}()
+	go func() {
+		for {
+			time.Sleep(8 * time.Millisecond)
+			ch1 <- struct{}{}
+		}
+	}()
+	go func() {
+		time.Sleep(2 * time.Second)
+		os.Exit(0)
+	}()
+
+	for range ch1 {
+		ch2 := make(chan struct{}, 1)
+		f := js.FuncOf(func(this js.Value, args []js.Value) interface{} {
+			ch2 <- struct{}{}
+			return nil
+		})
+		defer f.Release()
+		fn := js.Global().Get("Function").New("cb", "cb();")
+		fn.Invoke(f)
+		<-ch2
+	}
+}
diff --git a/test/fixedbugs/issue8606.go b/test/fixedbugs/issue8606.go
new file mode 100644
index 0000000..8122b1d
--- /dev/null
+++ b/test/fixedbugs/issue8606.go
@@ -0,0 +1,50 @@
+// run
+
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Check to make sure that we compare fields in order. See issue 8606.
+
+package main
+
+import "fmt"
+
+func main() {
+	type A [2]interface{}
+	type S struct{ x, y interface{} }
+
+	for _, test := range []struct {
+		panic bool
+		a, b  interface{}
+	}{
+		{false, A{1, []byte{1}}, A{2, []byte{1}}},
+		{true, A{[]byte{1}, 1}, A{[]byte{1}, 2}},
+		{false, S{1, []byte{1}}, S{2, []byte{1}}},
+		{true, S{[]byte{1}, 1}, S{[]byte{1}, 2}},
+		{false, A{1, []byte{1}}, A{"2", []byte{1}}},
+		{true, A{[]byte{1}, 1}, A{[]byte{1}, "2"}},
+		{false, S{1, []byte{1}}, S{"2", []byte{1}}},
+		{true, S{[]byte{1}, 1}, S{[]byte{1}, "2"}},
+	} {
+		f := func() {
+			if test.a == test.b {
+				panic(fmt.Sprintf("values %#v and %#v should not be equal", test.a, test.b))
+			}
+		}
+		if test.panic {
+			shouldPanic(fmt.Sprintf("comparing %#v and %#v did not panic", test.a, test.b), f)
+		} else {
+			f() // should not panic
+		}
+	}
+}
+
+func shouldPanic(name string, f func()) {
+	defer func() {
+		if recover() == nil {
+			panic(name)
+		}
+	}()
+	f()
+}