Merge tag 'upstream-go1.23.4'

* tag 'upstream-go1.23.4': (23 commits)
  [release-branch.go1.23] go1.23.4
  [release-branch.go1.23] cmd/trace: also show end stack traces
  [release-branch.go1.23] runtime: reserve 4kB for system stack on windows-386
  [release-branch.go1.23] runtime: explicitly keep handle alive during getOrAddWeakHandle
  [release-branch.go1.23] runtime: prevent weak->strong conversions during mark termination
  [release-branch.go1.23] syscall: mark SyscallN as noescape
  [release-branch.go1.23]time: accept "+01" in TestLoadFixed on OpenBSD
  [release-branch.go1.23] cmd/compile: use a non-fragile test for "does f contain closure c?"
  [release-branch.go1.23] go1.23.3
  [release-branch.go1.23] runtime: reduce syscall.SyscallX stack usage
  [release-branch.go1.23] runtime: fix MutexProfile missing root frames
  [release-branch.go1.23] internal/poll: handle the special case of sendfile(2) sending the full chunk
  [release-branch.go1.23] internal/poll: keep copying after successful Sendfile return on BSD
  [release-branch.go1.23] cmd/link: generate Mach-O UUID when -B flag is specified
  [release-branch.go1.23] runtime: uphold goroutine profile invariants in coroswitch
  [release-branch.go1.23] runtime,time: use atomic.Int32 for isSending
  [release-branch.go1.23] runtime: don't frob isSending for tickers
  [release-branch.go1.23] runtime: fix GoroutineProfile stacks not getting null terminated
  [release-branch.go1.23] syscall: use SYS_EXIT_GROUP in CLONE_PIDFD feature check child
  [release-branch.go1.23] os: add clone(CLONE_PIDFD) check to pidfd feature check
  ...

Change-Id: Ia23a76cc6a8a7e809e2d249c6e48a39c2ce37115
diff --git a/METADATA b/METADATA
new file mode 100644
index 0000000..18ca642
--- /dev/null
+++ b/METADATA
@@ -0,0 +1,16 @@
+name: "Go"
+description: "The Go programming language"
+
+third_party {
+  url {
+    type: HOMEPAGE
+    value: "https://go.dev"
+  }
+  url {
+    type: GIT
+    value: "https://github.com/golang/go"
+  }
+  version: "go1.23.4"
+  last_upgrade_date { year: 2025 month: 1 day: 7 }
+  license_type: NOTICE
+}
diff --git a/update-prebuilts.sh b/update-prebuilts.sh
new file mode 100755
index 0000000..c7730be
--- /dev/null
+++ b/update-prebuilts.sh
@@ -0,0 +1,89 @@
+#!/bin/bash -e
+
+# Copyright 2020 Google Inc. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# A script to update the Go prebuilts from a build completed on Android CI.
+
+set -eo pipefail
+
+if [ -z $1 ]; then
+  echo "usage: $0 <build number>"
+  exit 1
+fi
+
+readonly BUILD_NUMBER=$1
+readonly GERRIT_TOPIC="update-go-${BUILD_NUMBER}"
+
+cd "$(dirname $0)"
+
+readonly tmpdir=$(mktemp -d)
+
+function finish {
+  if [ ! -z "${tmpdir}" ]; then
+    rm -rf "${tmpdir}"
+  fi
+}
+trap finish EXIT
+
+function fetch_artifact() {
+  local target=$1; shift
+  local artifact=$1; shift
+  local output=$1; shift
+  /google/data/ro/projects/android/fetch_artifact \
+    --branch aosp-build-tools-release \
+    --bid ${BUILD_NUMBER} \
+    --target ${target}\
+    "${artifact}" "${output}"
+}
+
+# Downloads the relevant go.zip and creates a CL with its contents.
+function upload_cl() {
+  # aosp-build-tools-release target
+  local target=$1; shift
+
+  # os directory name of the go prebuilts
+  local arch=$1; shift
+
+  zipfile="${tmpdir}/${arch}.zip"
+
+  echo "Downloading ${arch} go.zip from ab/${BUILD_NUMBER}.."
+  fetch_artifact "${target}" go.zip "${zipfile}"
+
+  pushd "../../prebuilts/go/${arch}" > /dev/null
+
+  echo "Uploading new ${arch} go.zip to Gerrit.."
+  repo start "${GERRIT_TOPIC}"
+
+  git rm -rf .
+  unzip -q -d "$(pwd)" "${zipfile}"
+  git add -A .
+  git commit -m "Update ${arch} Go prebuilts from ab/${BUILD_NUMBER}
+
+https://ci.android.com/builds/branches/aosp-build-tools-release/grid?head=${BUILD_NUMBER}&tail=${BUILD_NUMBER}
+
+Update script: toolchain/go/update-prebuilts.sh
+
+Test: Treehugger presubmit"
+  repo upload --cbr -t -y . -o banned-words~skip -o nokeycheck
+
+  popd
+}
+
+# upload_cl <aosp-build-tools-release target> <prebuilts dir>
+upload_cl linux linux-x86
+upload_cl darwin_mac darwin-x86
+
+echo "Uploaded CLs: https://android-review.googlesource.com/q/topic:%22${GERRIT_TOPIC}%22+status:open"
+echo "Done."