Merge tag 'go1.15.2' into HEAD

Fixed: 60341
Change-Id: I7ffd32135db1d1327514514bfadd58edb664262d
diff --git a/BUILD.gn b/BUILD.gn
new file mode 100644
index 0000000..0ccec3d
--- /dev/null
+++ b/BUILD.gn
@@ -0,0 +1,216 @@
+# Copyright 2016 The Fuchsia Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/go/go_test.gni")
+import("//build/host.gni")
+import("//src/sys/build/components.gni")
+
+if (current_toolchain == target_toolchain) {
+  _go_root = "$host_tools_dir/goroot"
+
+  compiled_action("makeroot") {
+    visibility = [ ":makefuchsia" ]
+
+    depfile = "$target_gen_dir/$target_name.d"
+    outputs = [ "$target_gen_dir/$target_name.stamp" ]
+
+    tool = "makeroot"
+    args = [
+      "-source-goroot",
+      rebase_path(".", root_build_dir),
+      "-target-goroot",
+      rebase_path(_go_root, root_build_dir),
+
+      "-depfile",
+      rebase_path(depfile, root_build_dir),
+      "-stamp-file",
+      rebase_path(outputs[0], root_build_dir),
+    ]
+  }
+
+  compiled_action("makefuchsia") {
+    visibility = [ ":go_runtime" ]
+    deps = [ ":makeroot" ]
+
+    depfile = "$target_gen_dir/$target_name.d"
+    outputs = [ "$target_gen_dir/$target_name.stamp" ]
+
+    tool = "makefuchsia"
+    args = [
+      "-bootstrap-goroot",
+      rebase_path("//prebuilt/third_party/go/${host_platform}"),
+      "-gocache",
+      gocache_dir,
+      "-goroot",
+      rebase_path(_go_root, root_build_dir),
+
+      "-depfile",
+      rebase_path(depfile, root_build_dir),
+      "-stamp-file",
+      rebase_path(outputs[0], root_build_dir),
+    ]
+  }
+}
+
+group("go_runtime") {
+  public_deps = [ ":makefuchsia(${target_toolchain})" ]
+}
+
+go_test("go_exec_test") {
+  gopackages = [ "os/exec" ]
+}
+
+go_test("go_net_test") {
+  gopackages = [ "net" ]
+}
+
+go_test("go_os_test") {
+  gopackages = [ "os" ]
+}
+
+go_test("go_pprof_test") {
+  gopackages = [ "runtime/pprof" ]
+}
+
+go_test("go_zx_test") {
+  gopackages = [ "syscall/zx" ]
+}
+
+go_test("go_zxwait_test") {
+  gopackages = [ "syscall/zx/zxwait" ]
+}
+
+fuchsia_component("go-exec-test") {
+  testonly = true
+  manifest = "meta/go_exec_test.cmx"
+  deps = [
+    ":go_exec_test",
+    "//third_party/sbase:cat",
+    "//third_party/sbase:echo",
+  ]
+}
+
+fuchsia_component("go-net-test") {
+  testonly = true
+  manifest = "meta/go_net_test.cmx"
+  deps = [ ":go_net_test" ]
+}
+
+fuchsia_component("go-os-test") {
+  testonly = true
+  manifest = "meta/go_os_test.cmx"
+  deps = [ ":go_os_test" ]
+}
+
+fuchsia_component("go-pprof-test") {
+  testonly = true
+  manifest = "meta/go_pprof_test.cmx"
+  deps = [ ":go_pprof_test" ]
+}
+
+fuchsia_component("go-zx-test") {
+  testonly = true
+  manifest = "meta/go_zx_test.cmx"
+  deps = [ ":go_zx_test" ]
+}
+
+fuchsia_component("go-zxwait-test") {
+  testonly = true
+  manifest = "meta/go_zxwait_test.cmx"
+  deps = [ ":go_zxwait_test" ]
+}
+
+fuchsia_test_package("go-stdlib-tests") {
+  test_components = [
+    ":go-exec-test",
+    ":go-net-test",
+    ":go-os-test",
+    ":go-pprof-test",
+    ":go-zx-test",
+    ":go-zxwait-test",
+  ]
+
+  deps = [ "//src/connectivity/network/netstack:component-debug" ]
+
+  test_specs = {
+    environments = [ emu_env ]
+  }
+}
+
+go_test("go_unsafevalue_test") {
+  gopackages = [ "syscall/zx/fidl/internal/unsafevalue" ]
+
+  # This runs both on target device and as a host test.
+  # In both cases, it needs to build a go toolchain rather than using a prebuilt because
+  # it is testing the fidl package, which is implemented in the toolcahin itself.
+  use_prebuilt_go = false
+}
+
+go_test("go_fidl_test") {
+  gopackages = [ "syscall/zx/fidl" ]
+}
+
+go_test("go_extended_fidl_test") {
+  # N.B. these tests are not in the fidl package to avoid having to rebuild the
+  # go toolchain while iterating on them.
+  gopackages = [ "syscall/zx/fidl/fidl_test" ]
+  # TODO(pascallouis): Currently, while we take a dependency, the output of
+  # this FIDL rule is not directly used, rather the generated bindings were
+  # copied and checked in.
+  #
+  # Not being able to depend on automated generation is due to where code is
+  # placed, and how this relates to the tree structure of the toolchain.
+  # Disabling while fidlgen table generation is pending.
+  # Use regen-fidl to generate this file.
+  # deps = [
+  #   "src/syscall/zx/fidl/internal/bindingstest($go_toolchain)",
+  # ]
+}
+
+fuchsia_component("go-unsafevalue-test") {
+  testonly = true
+  manifest = "meta/go_unsafevalue_test.cmx"
+  deps = [ ":go_unsafevalue_test" ]
+}
+
+fuchsia_component("go-fidl-test") {
+  testonly = true
+  manifest = "meta/go_fidl_test.cmx"
+  deps = [ ":go_fidl_test" ]
+}
+
+fuchsia_component("go-extended-fidl-test") {
+  testonly = true
+  manifest = "meta/go_extended_fidl_test.cmx"
+  deps = [ ":go_extended_fidl_test" ]
+}
+
+fuchsia_test_package("go-fidl-tests") {
+  test_components = [
+    ":go-unsafevalue-test",
+    ":go-extended-fidl-test",
+    ":go-fidl-test",
+  ]
+
+  test_specs = {
+    environments = [ emu_env ]
+  }
+}
+
+group("fidl-tests") {
+  testonly = true
+  deps = [
+    ":go-fidl-tests",
+    ":go_extended_fidl_test($host_toolchain)",
+    ":go_unsafevalue_test($host_toolchain)",
+  ]
+}
+
+group("tests") {
+  testonly = true
+  deps = [
+    ":fidl-tests",
+    ":go-stdlib-tests",
+  ]
+}
diff --git a/api/fuchsia.txt b/api/fuchsia.txt
new file mode 100644
index 0000000..bf69307
--- /dev/null
+++ b/api/fuchsia.txt
@@ -0,0 +1,708 @@
+pkg syscall/zx, const ChannelMaxMessageBytes = 65536
+pkg syscall/zx, const ChannelMaxMessageBytes ideal-int
+pkg syscall/zx, const ChannelMaxMessageHandles = 64
+pkg syscall/zx, const ChannelMaxMessageHandles ideal-int
+pkg syscall/zx, const ErrAccessDenied = -30
+pkg syscall/zx, const ErrAccessDenied Status
+pkg syscall/zx, const ErrAddressInUse = -72
+pkg syscall/zx, const ErrAddressInUse Status
+pkg syscall/zx, const ErrAddressUnreachable = -71
+pkg syscall/zx, const ErrAddressUnreachable Status
+pkg syscall/zx, const ErrAlreadyBound = -27
+pkg syscall/zx, const ErrAlreadyBound Status
+pkg syscall/zx, const ErrAlreadyExists = -26
+pkg syscall/zx, const ErrAlreadyExists Status
+pkg syscall/zx, const ErrBadHandle = -11
+pkg syscall/zx, const ErrBadHandle Status
+pkg syscall/zx, const ErrBadPath = -50
+pkg syscall/zx, const ErrBadPath Status
+pkg syscall/zx, const ErrBadState = -20
+pkg syscall/zx, const ErrBadState Status
+pkg syscall/zx, const ErrBadSyscall = -13
+pkg syscall/zx, const ErrBadSyscall Status
+pkg syscall/zx, const ErrBufferTooSmall = -15
+pkg syscall/zx, const ErrBufferTooSmall Status
+pkg syscall/zx, const ErrCallFailed = -5
+pkg syscall/zx, const ErrCallFailed Status
+pkg syscall/zx, const ErrCanceled = -23
+pkg syscall/zx, const ErrCanceled Status
+pkg syscall/zx, const ErrConnectionAborted = -76
+pkg syscall/zx, const ErrConnectionAborted Status
+pkg syscall/zx, const ErrConnectionRefused = -74
+pkg syscall/zx, const ErrConnectionRefused Status
+pkg syscall/zx, const ErrConnectionReset = -75
+pkg syscall/zx, const ErrConnectionReset Status
+pkg syscall/zx, const ErrFileBig = -53
+pkg syscall/zx, const ErrFileBig Status
+pkg syscall/zx, const ErrHandleClosed = -23
+pkg syscall/zx, const ErrHandleClosed Status
+pkg syscall/zx, const ErrIO = -40
+pkg syscall/zx, const ErrIO Status
+pkg syscall/zx, const ErrIODataIntegrity = -42
+pkg syscall/zx, const ErrIODataIntegrity Status
+pkg syscall/zx, const ErrIODataLoss = -43
+pkg syscall/zx, const ErrIODataLoss Status
+pkg syscall/zx, const ErrIORefused = -41
+pkg syscall/zx, const ErrIORefused Status
+pkg syscall/zx, const ErrInternal = -1
+pkg syscall/zx, const ErrInternal Status
+pkg syscall/zx, const ErrInterruptedRetry = -6
+pkg syscall/zx, const ErrInterruptedRetry Status
+pkg syscall/zx, const ErrInvalidArgs = -10
+pkg syscall/zx, const ErrInvalidArgs Status
+pkg syscall/zx, const ErrNext = -61
+pkg syscall/zx, const ErrNext Status
+pkg syscall/zx, const ErrNoMemory = -4
+pkg syscall/zx, const ErrNoMemory Status
+pkg syscall/zx, const ErrNoResources = -3
+pkg syscall/zx, const ErrNoResources Status
+pkg syscall/zx, const ErrNoSpace = -54
+pkg syscall/zx, const ErrNoSpace Status
+pkg syscall/zx, const ErrNotConnected = -73
+pkg syscall/zx, const ErrNotConnected Status
+pkg syscall/zx, const ErrNotDir = -51
+pkg syscall/zx, const ErrNotDir Status
+pkg syscall/zx, const ErrNotEmpty = -55
+pkg syscall/zx, const ErrNotEmpty Status
+pkg syscall/zx, const ErrNotFile = -52
+pkg syscall/zx, const ErrNotFile Status
+pkg syscall/zx, const ErrNotFound = -25
+pkg syscall/zx, const ErrNotFound Status
+pkg syscall/zx, const ErrNotSupported = -2
+pkg syscall/zx, const ErrNotSupported Status
+pkg syscall/zx, const ErrOk = 0
+pkg syscall/zx, const ErrOk Status
+pkg syscall/zx, const ErrOutOfRange = -14
+pkg syscall/zx, const ErrOutOfRange Status
+pkg syscall/zx, const ErrPeerClosed = -24
+pkg syscall/zx, const ErrPeerClosed Status
+pkg syscall/zx, const ErrProtocolNotSupported = -70
+pkg syscall/zx, const ErrProtocolNotSupported Status
+pkg syscall/zx, const ErrRemoteClosed = -24
+pkg syscall/zx, const ErrRemoteClosed Status
+pkg syscall/zx, const ErrShouldWait = -22
+pkg syscall/zx, const ErrShouldWait Status
+pkg syscall/zx, const ErrStop = -60
+pkg syscall/zx, const ErrStop Status
+pkg syscall/zx, const ErrTimedOut = -21
+pkg syscall/zx, const ErrTimedOut Status
+pkg syscall/zx, const ErrUnavailable = -28
+pkg syscall/zx, const ErrUnavailable Status
+pkg syscall/zx, const ErrWrongType = -12
+pkg syscall/zx, const ErrWrongType Status
+pkg syscall/zx, const HANDLE_INVALID = 0
+pkg syscall/zx, const HANDLE_INVALID Handle
+pkg syscall/zx, const HandleInvalid = 0
+pkg syscall/zx, const HandleInvalid Handle
+pkg syscall/zx, const HandleOpDuplicate = 1
+pkg syscall/zx, const HandleOpDuplicate HandleOp
+pkg syscall/zx, const HandleOpMove = 0
+pkg syscall/zx, const HandleOpMove HandleOp
+pkg syscall/zx, const HandleSize = 4
+pkg syscall/zx, const HandleSize uint64
+pkg syscall/zx, const ObjectInfoBTI = 20
+pkg syscall/zx, const ObjectInfoBTI ideal-int
+pkg syscall/zx, const ObjectInfoCpUStats = 16
+pkg syscall/zx, const ObjectInfoCpUStats ideal-int
+pkg syscall/zx, const ObjectInfoHandleBasic = 2
+pkg syscall/zx, const ObjectInfoHandleBasic ideal-int
+pkg syscall/zx, const ObjectInfoHandleCount = 19
+pkg syscall/zx, const ObjectInfoHandleCount ideal-int
+pkg syscall/zx, const ObjectInfoHandleNone = 0
+pkg syscall/zx, const ObjectInfoHandleNone ideal-int
+pkg syscall/zx, const ObjectInfoHandleValid = 1
+pkg syscall/zx, const ObjectInfoHandleValid ideal-int
+pkg syscall/zx, const ObjectInfoJobChildren = 8
+pkg syscall/zx, const ObjectInfoJobChildren ideal-int
+pkg syscall/zx, const ObjectInfoJobProcesses = 9
+pkg syscall/zx, const ObjectInfoJobProcesses ideal-int
+pkg syscall/zx, const ObjectInfoKMemStats = 17
+pkg syscall/zx, const ObjectInfoKMemStats ideal-int
+pkg syscall/zx, const ObjectInfoProcess = 3
+pkg syscall/zx, const ObjectInfoProcess ideal-int
+pkg syscall/zx, const ObjectInfoProcessHandleStats = 21
+pkg syscall/zx, const ObjectInfoProcessHandleStats ideal-int
+pkg syscall/zx, const ObjectInfoProcessMaps = 13
+pkg syscall/zx, const ObjectInfoProcessMaps ideal-int
+pkg syscall/zx, const ObjectInfoProcessThreads = 4
+pkg syscall/zx, const ObjectInfoProcessThreads ideal-int
+pkg syscall/zx, const ObjectInfoProcessVMOs = 268435470
+pkg syscall/zx, const ObjectInfoProcessVMOs ideal-int
+pkg syscall/zx, const ObjectInfoProcessVMOs_V1 = 14
+pkg syscall/zx, const ObjectInfoProcessVMOs_V1 ideal-int
+pkg syscall/zx, const ObjectInfoResource = 18
+pkg syscall/zx, const ObjectInfoResource ideal-int
+pkg syscall/zx, const ObjectInfoResourceChildren = 5
+pkg syscall/zx, const ObjectInfoResourceChildren ideal-int
+pkg syscall/zx, const ObjectInfoResourceRecords = 6
+pkg syscall/zx, const ObjectInfoResourceRecords ideal-int
+pkg syscall/zx, const ObjectInfoSocket = 22
+pkg syscall/zx, const ObjectInfoSocket ideal-int
+pkg syscall/zx, const ObjectInfoTaskStats = 12
+pkg syscall/zx, const ObjectInfoTaskStats ideal-int
+pkg syscall/zx, const ObjectInfoThread = 10
+pkg syscall/zx, const ObjectInfoThread ideal-int
+pkg syscall/zx, const ObjectInfoThreadExceptionReport = 11
+pkg syscall/zx, const ObjectInfoThreadExceptionReport ideal-int
+pkg syscall/zx, const ObjectInfoThreadStats = 15
+pkg syscall/zx, const ObjectInfoThreadStats ideal-int
+pkg syscall/zx, const ObjectInfoVMAR = 7
+pkg syscall/zx, const ObjectInfoVMAR ideal-int
+pkg syscall/zx, const ObjectInfoVMO = 268435479
+pkg syscall/zx, const ObjectInfoVMO ideal-int
+pkg syscall/zx, const ObjectInfoVMO_V1 = 23
+pkg syscall/zx, const ObjectInfoVMO_V1 ideal-int
+pkg syscall/zx, const ObjectTypeBti = 24
+pkg syscall/zx, const ObjectTypeBti ObjectType
+pkg syscall/zx, const ObjectTypeChannel = 4
+pkg syscall/zx, const ObjectTypeChannel ObjectType
+pkg syscall/zx, const ObjectTypeEvent = 5
+pkg syscall/zx, const ObjectTypeEvent ObjectType
+pkg syscall/zx, const ObjectTypeEventPair = 16
+pkg syscall/zx, const ObjectTypeEventPair ObjectType
+pkg syscall/zx, const ObjectTypeFifo = 19
+pkg syscall/zx, const ObjectTypeFifo ObjectType
+pkg syscall/zx, const ObjectTypeGuest = 20
+pkg syscall/zx, const ObjectTypeGuest ObjectType
+pkg syscall/zx, const ObjectTypeInterrupt = 9
+pkg syscall/zx, const ObjectTypeInterrupt ObjectType
+pkg syscall/zx, const ObjectTypeIommu = 23
+pkg syscall/zx, const ObjectTypeIommu ObjectType
+pkg syscall/zx, const ObjectTypeJob = 17
+pkg syscall/zx, const ObjectTypeJob ObjectType
+pkg syscall/zx, const ObjectTypeLog = 12
+pkg syscall/zx, const ObjectTypeLog ObjectType
+pkg syscall/zx, const ObjectTypeNone = 0
+pkg syscall/zx, const ObjectTypeNone ObjectType
+pkg syscall/zx, const ObjectTypePager = 28
+pkg syscall/zx, const ObjectTypePager ObjectType
+pkg syscall/zx, const ObjectTypePciDevice = 11
+pkg syscall/zx, const ObjectTypePciDevice ObjectType
+pkg syscall/zx, const ObjectTypePmt = 26
+pkg syscall/zx, const ObjectTypePmt ObjectType
+pkg syscall/zx, const ObjectTypePort = 6
+pkg syscall/zx, const ObjectTypePort ObjectType
+pkg syscall/zx, const ObjectTypeProcess = 1
+pkg syscall/zx, const ObjectTypeProcess ObjectType
+pkg syscall/zx, const ObjectTypeProfile = 25
+pkg syscall/zx, const ObjectTypeProfile ObjectType
+pkg syscall/zx, const ObjectTypeResource = 15
+pkg syscall/zx, const ObjectTypeResource ObjectType
+pkg syscall/zx, const ObjectTypeSocket = 14
+pkg syscall/zx, const ObjectTypeSocket ObjectType
+pkg syscall/zx, const ObjectTypeSuspendToken = 27
+pkg syscall/zx, const ObjectTypeSuspendToken ObjectType
+pkg syscall/zx, const ObjectTypeThread = 2
+pkg syscall/zx, const ObjectTypeThread ObjectType
+pkg syscall/zx, const ObjectTypeTimer = 22
+pkg syscall/zx, const ObjectTypeTimer ObjectType
+pkg syscall/zx, const ObjectTypeVcpu = 21
+pkg syscall/zx, const ObjectTypeVcpu ObjectType
+pkg syscall/zx, const ObjectTypeVmar = 18
+pkg syscall/zx, const ObjectTypeVmar ObjectType
+pkg syscall/zx, const ObjectTypeVmo = 3
+pkg syscall/zx, const ObjectTypeVmo ObjectType
+pkg syscall/zx, const PropJobMaxHeight = 7
+pkg syscall/zx, const PropJobMaxHeight ideal-int
+pkg syscall/zx, const PropName = 3
+pkg syscall/zx, const PropName ideal-int
+pkg syscall/zx, const PropNumStateKinds = 2
+pkg syscall/zx, const PropNumStateKinds ideal-int
+pkg syscall/zx, const PropProcessDebugAddr = 5
+pkg syscall/zx, const PropProcessDebugAddr ideal-int
+pkg syscall/zx, const PropProcessVDSOBaseAddress = 6
+pkg syscall/zx, const PropProcessVDSOBaseAddress ideal-int
+pkg syscall/zx, const PropRegisterFS = 4
+pkg syscall/zx, const PropRegisterFS ideal-int
+pkg syscall/zx, const RightApplyPolicy = 524288
+pkg syscall/zx, const RightApplyPolicy Rights
+pkg syscall/zx, const RightDestroy = 512
+pkg syscall/zx, const RightDestroy Rights
+pkg syscall/zx, const RightDuplicate = 1
+pkg syscall/zx, const RightDuplicate Rights
+pkg syscall/zx, const RightEnumerate = 256
+pkg syscall/zx, const RightEnumerate Rights
+pkg syscall/zx, const RightExecute = 16
+pkg syscall/zx, const RightExecute Rights
+pkg syscall/zx, const RightGetPolicy = 1024
+pkg syscall/zx, const RightGetPolicy Rights
+pkg syscall/zx, const RightGetProperty = 64
+pkg syscall/zx, const RightGetProperty Rights
+pkg syscall/zx, const RightInspect = 32768
+pkg syscall/zx, const RightInspect Rights
+pkg syscall/zx, const RightManageJob = 65536
+pkg syscall/zx, const RightManageJob Rights
+pkg syscall/zx, const RightManageProcess = 131072
+pkg syscall/zx, const RightManageProcess Rights
+pkg syscall/zx, const RightManageThread = 262144
+pkg syscall/zx, const RightManageThread Rights
+pkg syscall/zx, const RightMap = 32
+pkg syscall/zx, const RightMap Rights
+pkg syscall/zx, const RightNone = 0
+pkg syscall/zx, const RightNone Rights
+pkg syscall/zx, const RightRead = 4
+pkg syscall/zx, const RightRead Rights
+pkg syscall/zx, const RightSameRights = 2147483648
+pkg syscall/zx, const RightSameRights Rights
+pkg syscall/zx, const RightSetPolicy = 2048
+pkg syscall/zx, const RightSetPolicy Rights
+pkg syscall/zx, const RightSetProperty = 128
+pkg syscall/zx, const RightSetProperty Rights
+pkg syscall/zx, const RightSignal = 4096
+pkg syscall/zx, const RightSignal Rights
+pkg syscall/zx, const RightSignalPeer = 8192
+pkg syscall/zx, const RightSignalPeer Rights
+pkg syscall/zx, const RightTransfer = 2
+pkg syscall/zx, const RightTransfer Rights
+pkg syscall/zx, const RightWait = 16384
+pkg syscall/zx, const RightWait Rights
+pkg syscall/zx, const RightWrite = 8
+pkg syscall/zx, const RightWrite Rights
+pkg syscall/zx, const RightsBasic = 49155
+pkg syscall/zx, const RightsBasic Rights
+pkg syscall/zx, const RightsIO = 12
+pkg syscall/zx, const RightsIO Rights
+pkg syscall/zx, const RightsPolicy = 3072
+pkg syscall/zx, const RightsPolicy Rights
+pkg syscall/zx, const RightsProperty = 192
+pkg syscall/zx, const RightsProperty Rights
+pkg syscall/zx, const SignalChannelPeerClosed = 4
+pkg syscall/zx, const SignalChannelPeerClosed ideal-int
+pkg syscall/zx, const SignalChannelReadable = 1
+pkg syscall/zx, const SignalChannelReadable ideal-int
+pkg syscall/zx, const SignalChannelWritable = 2
+pkg syscall/zx, const SignalChannelWritable ideal-int
+pkg syscall/zx, const SignalEpairPeerClosed = 4
+pkg syscall/zx, const SignalEpairPeerClosed ideal-int
+pkg syscall/zx, const SignalEpairSignaled = 8
+pkg syscall/zx, const SignalEpairSignaled ideal-int
+pkg syscall/zx, const SignalEventMask = 248
+pkg syscall/zx, const SignalEventMask Signals
+pkg syscall/zx, const SignalEventSignaled = 8
+pkg syscall/zx, const SignalEventSignaled ideal-int
+pkg syscall/zx, const SignalFIFOPeerClosed = 4
+pkg syscall/zx, const SignalFIFOPeerClosed ideal-int
+pkg syscall/zx, const SignalFIFOReadable = 1
+pkg syscall/zx, const SignalFIFOReadable ideal-int
+pkg syscall/zx, const SignalFIFOSignalMask = 7
+pkg syscall/zx, const SignalFIFOSignalMask ideal-int
+pkg syscall/zx, const SignalFIFOWritable = 2
+pkg syscall/zx, const SignalFIFOWritable ideal-int
+pkg syscall/zx, const SignalHandleClosed = 8388608
+pkg syscall/zx, const SignalHandleClosed ideal-int
+pkg syscall/zx, const SignalJobSignaled = 8
+pkg syscall/zx, const SignalJobSignaled ideal-int
+pkg syscall/zx, const SignalNone = 0
+pkg syscall/zx, const SignalNone Signals
+pkg syscall/zx, const SignalObject0 = 1
+pkg syscall/zx, const SignalObject0 ideal-int
+pkg syscall/zx, const SignalObject1 = 2
+pkg syscall/zx, const SignalObject1 ideal-int
+pkg syscall/zx, const SignalObject10 = 1024
+pkg syscall/zx, const SignalObject10 ideal-int
+pkg syscall/zx, const SignalObject11 = 2048
+pkg syscall/zx, const SignalObject11 ideal-int
+pkg syscall/zx, const SignalObject12 = 4096
+pkg syscall/zx, const SignalObject12 ideal-int
+pkg syscall/zx, const SignalObject13 = 8192
+pkg syscall/zx, const SignalObject13 ideal-int
+pkg syscall/zx, const SignalObject14 = 16384
+pkg syscall/zx, const SignalObject14 ideal-int
+pkg syscall/zx, const SignalObject15 = 32768
+pkg syscall/zx, const SignalObject15 ideal-int
+pkg syscall/zx, const SignalObject16 = 65536
+pkg syscall/zx, const SignalObject16 ideal-int
+pkg syscall/zx, const SignalObject17 = 131072
+pkg syscall/zx, const SignalObject17 ideal-int
+pkg syscall/zx, const SignalObject18 = 262144
+pkg syscall/zx, const SignalObject18 ideal-int
+pkg syscall/zx, const SignalObject19 = 524288
+pkg syscall/zx, const SignalObject19 ideal-int
+pkg syscall/zx, const SignalObject2 = 4
+pkg syscall/zx, const SignalObject2 ideal-int
+pkg syscall/zx, const SignalObject20 = 1048576
+pkg syscall/zx, const SignalObject20 ideal-int
+pkg syscall/zx, const SignalObject21 = 2097152
+pkg syscall/zx, const SignalObject21 ideal-int
+pkg syscall/zx, const SignalObject22 = 4194304
+pkg syscall/zx, const SignalObject22 ideal-int
+pkg syscall/zx, const SignalObject23 = 8388608
+pkg syscall/zx, const SignalObject23 ideal-int
+pkg syscall/zx, const SignalObject3 = 8
+pkg syscall/zx, const SignalObject3 ideal-int
+pkg syscall/zx, const SignalObject4 = 16
+pkg syscall/zx, const SignalObject4 ideal-int
+pkg syscall/zx, const SignalObject5 = 32
+pkg syscall/zx, const SignalObject5 ideal-int
+pkg syscall/zx, const SignalObject6 = 64
+pkg syscall/zx, const SignalObject6 ideal-int
+pkg syscall/zx, const SignalObject7 = 128
+pkg syscall/zx, const SignalObject7 ideal-int
+pkg syscall/zx, const SignalObject8 = 256
+pkg syscall/zx, const SignalObject8 ideal-int
+pkg syscall/zx, const SignalObject9 = 512
+pkg syscall/zx, const SignalObject9 ideal-int
+pkg syscall/zx, const SignalObjectAll = 1048575
+pkg syscall/zx, const SignalObjectAll ideal-int
+pkg syscall/zx, const SignalPortPeerClosed = 4
+pkg syscall/zx, const SignalPortPeerClosed ideal-int
+pkg syscall/zx, const SignalPortReadable = 1
+pkg syscall/zx, const SignalPortReadable ideal-int
+pkg syscall/zx, const SignalPortSignaled = 8
+pkg syscall/zx, const SignalPortSignaled ideal-int
+pkg syscall/zx, const SignalProccessSignaled = 8
+pkg syscall/zx, const SignalProccessSignaled ideal-int
+pkg syscall/zx, const SignalResourceChildAdded = 4
+pkg syscall/zx, const SignalResourceChildAdded ideal-int
+pkg syscall/zx, const SignalResourceReadable = 1
+pkg syscall/zx, const SignalResourceReadable ideal-int
+pkg syscall/zx, const SignalResourceWritable = 2
+pkg syscall/zx, const SignalResourceWritable ideal-int
+pkg syscall/zx, const SignalSocketPeerClosed = 4
+pkg syscall/zx, const SignalSocketPeerClosed ideal-int
+pkg syscall/zx, const SignalSocketPeerWriteDisabled = 16
+pkg syscall/zx, const SignalSocketPeerWriteDisabled ideal-int
+pkg syscall/zx, const SignalSocketReadable = 1
+pkg syscall/zx, const SignalSocketReadable ideal-int
+pkg syscall/zx, const SignalSocketWritable = 2
+pkg syscall/zx, const SignalSocketWritable ideal-int
+pkg syscall/zx, const SignalSocketWriteDisabled = 32
+pkg syscall/zx, const SignalSocketWriteDisabled ideal-int
+pkg syscall/zx, const SignalTaskSignalMask = 8
+pkg syscall/zx, const SignalTaskSignalMask ideal-int
+pkg syscall/zx, const SignalTaskTerminated = 8
+pkg syscall/zx, const SignalTaskTerminated ideal-int
+pkg syscall/zx, const SignalThreadSignaled = 8
+pkg syscall/zx, const SignalThreadSignaled ideal-int
+pkg syscall/zx, const SignalUser0 = 16777216
+pkg syscall/zx, const SignalUser0 ideal-int
+pkg syscall/zx, const SignalUser1 = 33554432
+pkg syscall/zx, const SignalUser1 ideal-int
+pkg syscall/zx, const SignalUser2 = 67108864
+pkg syscall/zx, const SignalUser2 ideal-int
+pkg syscall/zx, const SignalUser3 = 134217728
+pkg syscall/zx, const SignalUser3 ideal-int
+pkg syscall/zx, const SignalUser4 = 268435456
+pkg syscall/zx, const SignalUser4 ideal-int
+pkg syscall/zx, const SignalUser5 = 536870912
+pkg syscall/zx, const SignalUser5 ideal-int
+pkg syscall/zx, const SignalUser6 = 1073741824
+pkg syscall/zx, const SignalUser6 ideal-int
+pkg syscall/zx, const SignalUser7 = 2147483648
+pkg syscall/zx, const SignalUser7 ideal-int
+pkg syscall/zx, const SignalUserAll = 240
+pkg syscall/zx, const SignalUserAll Signals
+pkg syscall/zx, const SocketDatagram = 1
+pkg syscall/zx, const SocketDatagram ideal-int
+pkg syscall/zx, const SocketShutdownRead = 2
+pkg syscall/zx, const SocketShutdownRead ideal-int
+pkg syscall/zx, const SocketShutdownWrite = 1
+pkg syscall/zx, const SocketShutdownWrite ideal-int
+pkg syscall/zx, const SocketStream = 0
+pkg syscall/zx, const SocketStream ideal-int
+pkg syscall/zx, const TimensecInfinite = 9223372036854775807
+pkg syscall/zx, const TimensecInfinite Time
+pkg syscall/zx, const VMFlagCanMapExecute = 512
+pkg syscall/zx, const VMFlagCanMapExecute VMFlag
+pkg syscall/zx, const VMFlagCanMapRead = 128
+pkg syscall/zx, const VMFlagCanMapRead VMFlag
+pkg syscall/zx, const VMFlagCanMapSpecific = 64
+pkg syscall/zx, const VMFlagCanMapSpecific VMFlag
+pkg syscall/zx, const VMFlagCanMapWrite = 256
+pkg syscall/zx, const VMFlagCanMapWrite VMFlag
+pkg syscall/zx, const VMFlagCompact = 8
+pkg syscall/zx, const VMFlagCompact VMFlag
+pkg syscall/zx, const VMFlagPermExecute = 4
+pkg syscall/zx, const VMFlagPermExecute VMFlag
+pkg syscall/zx, const VMFlagPermRead = 1
+pkg syscall/zx, const VMFlagPermRead VMFlag
+pkg syscall/zx, const VMFlagPermWrite = 2
+pkg syscall/zx, const VMFlagPermWrite VMFlag
+pkg syscall/zx, const VMFlagSpecific = 16
+pkg syscall/zx, const VMFlagSpecific VMFlag
+pkg syscall/zx, const VMFlagSpecificOverwrite = 32
+pkg syscall/zx, const VMFlagSpecificOverwrite VMFlag
+pkg syscall/zx, const VMOChildOptionCopyOnWrite = 16
+pkg syscall/zx, const VMOChildOptionCopyOnWrite ideal-int
+pkg syscall/zx, const VMOChildOptionNoWrite = 32
+pkg syscall/zx, const VMOChildOptionNoWrite ideal-int
+pkg syscall/zx, const VMOChildOptionPrivatePagerCopy = 16
+pkg syscall/zx, const VMOChildOptionPrivatePagerCopy ideal-int
+pkg syscall/zx, const VMOChildOptionResizable = 4
+pkg syscall/zx, const VMOChildOptionResizable ideal-int
+pkg syscall/zx, const VMOChildOptionSlice = 8
+pkg syscall/zx, const VMOChildOptionSlice ideal-int
+pkg syscall/zx, const VMOChildOptionSnapshot = 1
+pkg syscall/zx, const VMOChildOptionSnapshot VMOChildOption
+pkg syscall/zx, const VMOChildOptionSnapshotAtLeastOnWrite = 16
+pkg syscall/zx, const VMOChildOptionSnapshotAtLeastOnWrite ideal-int
+pkg syscall/zx, const VMOOptionResizable = 2
+pkg syscall/zx, const VMOOptionResizable VMOOption
+pkg syscall/zx, const ZX_MAX_NAME_LEN = 32
+pkg syscall/zx, const ZX_MAX_NAME_LEN ideal-int
+pkg syscall/zx, const ZX_RACT_DISABLE = 2
+pkg syscall/zx, const ZX_RACT_DISABLE ideal-int
+pkg syscall/zx, const ZX_RACT_ENABLE = 1
+pkg syscall/zx, const ZX_RACT_ENABLE ideal-int
+pkg syscall/zx, const ZX_RREC_DATA = 2
+pkg syscall/zx, const ZX_RREC_DATA ideal-int
+pkg syscall/zx, const ZX_RREC_DELETED = 0
+pkg syscall/zx, const ZX_RREC_DELETED ideal-int
+pkg syscall/zx, const ZX_RREC_IOPORT = 5
+pkg syscall/zx, const ZX_RREC_IOPORT ideal-int
+pkg syscall/zx, const ZX_RREC_IRQ = 3
+pkg syscall/zx, const ZX_RREC_IRQ ideal-int
+pkg syscall/zx, const ZX_RREC_MMIO = 4
+pkg syscall/zx, const ZX_RREC_MMIO ideal-int
+pkg syscall/zx, const ZX_RREC_SELF = 1
+pkg syscall/zx, const ZX_RREC_SELF ideal-int
+pkg syscall/zx, const ZX_RREC_SELF_GENERIC = 0
+pkg syscall/zx, const ZX_RREC_SELF_GENERIC ideal-int
+pkg syscall/zx, const ZX_RREC_SELF_ROOT = 1
+pkg syscall/zx, const ZX_RREC_SELF_ROOT ideal-int
+pkg syscall/zx, method (*Channel) Handle() *Handle
+pkg syscall/zx, method (*Event) Handle() *Handle
+pkg syscall/zx, method (*Handle) IsValid() bool
+pkg syscall/zx, method (*Log) Handle() *Handle
+pkg syscall/zx, method (*Port) Handle() *Handle
+pkg syscall/zx, method (*Rrec) Box() RrecValue
+pkg syscall/zx, method (*Socket) Handle() *Handle
+pkg syscall/zx, method (*VMO) Handle() *Handle
+pkg syscall/zx, method (Rights) StrictSubsetOf(Rights) bool
+pkg syscall/zx, method (Rights) StrictSupersetOf(Rights) bool
+pkg syscall/zx, method (Rights) SubsetOf(Rights) bool
+pkg syscall/zx, method (Rights) Subtract(Rights) Rights
+pkg syscall/zx, method (Rights) SupersetOf(Rights) bool
+pkg syscall/zx, type Channel uint32
+pkg syscall/zx, type ChannelCallArgs struct
+pkg syscall/zx, type ChannelCallArgs struct, ReadBytes unsafe.Pointer
+pkg syscall/zx, type ChannelCallArgs struct, ReadHandles *Handle
+pkg syscall/zx, type ChannelCallArgs struct, ReadNumBytes uint32
+pkg syscall/zx, type ChannelCallArgs struct, ReadNumHandles uint32
+pkg syscall/zx, type ChannelCallArgs struct, WriteBytes unsafe.Pointer
+pkg syscall/zx, type ChannelCallArgs struct, WriteHandles *Handle
+pkg syscall/zx, type ChannelCallArgs struct, WriteNumBytes uint32
+pkg syscall/zx, type ChannelCallArgs struct, WriteNumHandles uint32
+pkg syscall/zx, type Clock uint32
+pkg syscall/zx, type Duration int64
+pkg syscall/zx, type Event uint32
+pkg syscall/zx, type FIFOState struct
+pkg syscall/zx, type Handle uint32
+pkg syscall/zx, type HandleDisposition struct
+pkg syscall/zx, type HandleDisposition struct, Handle Handle
+pkg syscall/zx, type HandleDisposition struct, Operation HandleOp
+pkg syscall/zx, type HandleDisposition struct, Result Status
+pkg syscall/zx, type HandleDisposition struct, Rights Rights
+pkg syscall/zx, type HandleDisposition struct, Type ObjectType
+pkg syscall/zx, type HandleInfo struct
+pkg syscall/zx, type HandleInfo struct, Handle Handle
+pkg syscall/zx, type HandleInfo struct, Rights Rights
+pkg syscall/zx, type HandleInfo struct, Type ObjectType
+pkg syscall/zx, type HandleInfo struct, Unused uint32
+pkg syscall/zx, type HandleOp uint32
+pkg syscall/zx, type InfoHandleBasic struct
+pkg syscall/zx, type InfoHandleBasic struct, Koid uint64
+pkg syscall/zx, type InfoHandleBasic struct, Props uint32
+pkg syscall/zx, type InfoHandleBasic struct, RelatedKoid uint64
+pkg syscall/zx, type InfoHandleBasic struct, Rights Rights
+pkg syscall/zx, type InfoHandleBasic struct, Type ObjectType
+pkg syscall/zx, type InfoSocket struct
+pkg syscall/zx, type InfoSocket struct, Options uint32
+pkg syscall/zx, type InfoSocket struct, RXBufAvailable int
+pkg syscall/zx, type InfoSocket struct, RXBufMax int
+pkg syscall/zx, type InfoSocket struct, RXBufSize int
+pkg syscall/zx, type InfoSocket struct, TXBufMax int
+pkg syscall/zx, type InfoSocket struct, TXBufSize int
+pkg syscall/zx, type Log uint32
+pkg syscall/zx, type ObjectType uint32
+pkg syscall/zx, type Paddr uintptr
+pkg syscall/zx, type Port uint32
+pkg syscall/zx, type Rights uint32
+pkg syscall/zx, type Rrec struct
+pkg syscall/zx, type RrecData struct
+pkg syscall/zx, type RrecData struct, Data [56]uint8
+pkg syscall/zx, type RrecData struct, Options uint32
+pkg syscall/zx, type RrecData struct, Subtype uint16
+pkg syscall/zx, type RrecData struct, Type uint16
+pkg syscall/zx, type RrecIOPort struct
+pkg syscall/zx, type RrecIOPort struct, Options uint32
+pkg syscall/zx, type RrecIOPort struct, PortBase uint32
+pkg syscall/zx, type RrecIOPort struct, PortCount uint32
+pkg syscall/zx, type RrecIOPort struct, Subtype uint16
+pkg syscall/zx, type RrecIOPort struct, Type uint16
+pkg syscall/zx, type RrecIRQ struct
+pkg syscall/zx, type RrecIRQ struct, IRQBase uint32
+pkg syscall/zx, type RrecIRQ struct, IRQCount uint32
+pkg syscall/zx, type RrecIRQ struct, Options uint32
+pkg syscall/zx, type RrecIRQ struct, Subtype uint16
+pkg syscall/zx, type RrecIRQ struct, Type uint16
+pkg syscall/zx, type RrecMMIO struct
+pkg syscall/zx, type RrecMMIO struct, Options uint32
+pkg syscall/zx, type RrecMMIO struct, PhysBase uint64
+pkg syscall/zx, type RrecMMIO struct, PhysSize uint64
+pkg syscall/zx, type RrecMMIO struct, Subtype uint16
+pkg syscall/zx, type RrecMMIO struct, Type uint16
+pkg syscall/zx, type RrecSelf struct
+pkg syscall/zx, type RrecSelf struct, ChildCount uint32
+pkg syscall/zx, type RrecSelf struct, Koid uint64
+pkg syscall/zx, type RrecSelf struct, Name [32]uint8
+pkg syscall/zx, type RrecSelf struct, Options uint32
+pkg syscall/zx, type RrecSelf struct, RecordCount uint32
+pkg syscall/zx, type RrecSelf struct, Subtype uint16
+pkg syscall/zx, type RrecSelf struct, Type uint16
+pkg syscall/zx, type RrecValue interface, unexported methods
+pkg syscall/zx, type SMCParameters struct
+pkg syscall/zx, type SMCResult struct
+pkg syscall/zx, type Signals uint32
+pkg syscall/zx, type Socket uint32
+pkg syscall/zx, type Status int32
+pkg syscall/zx, type Time int64
+pkg syscall/zx, type VMAR uint32
+pkg syscall/zx, type VMFlag uint32
+pkg syscall/zx, type VMO uint32
+pkg syscall/zx, type VMOChildOption uint32
+pkg syscall/zx, type VMOOption int
+pkg syscall/zx, type Vaddr uintptr
+pkg syscall/zx, type WaitItem struct
+pkg syscall/zx, type WaitItem struct, Handle Handle
+pkg syscall/zx, type WaitItem struct, Pending Signals
+pkg syscall/zx, type WaitItem struct, WaitFor Signals
+pkg syscall/zx, var EOF error
+pkg syscall/zx, var EPIPE error
+pkg syscall/zx/fidl, const ErrBadHandleEncoding = 12
+pkg syscall/zx/fidl, const ErrBadHandleEncoding ErrorCode
+pkg syscall/zx/fidl, const ErrBadRefEncoding = 14
+pkg syscall/zx/fidl, const ErrBadRefEncoding ErrorCode
+pkg syscall/zx/fidl, const ErrDuplicateTxidReceived = 30
+pkg syscall/zx/fidl, const ErrDuplicateTxidReceived ErrorCode
+pkg syscall/zx/fidl, const ErrDuplicateTxidWaiting = 31
+pkg syscall/zx/fidl, const ErrDuplicateTxidWaiting ErrorCode
+pkg syscall/zx/fidl, const ErrIncorrectHandleType = 32
+pkg syscall/zx/fidl, const ErrIncorrectHandleType ErrorCode
+pkg syscall/zx/fidl, const ErrInvalidBoolValue = 9
+pkg syscall/zx/fidl, const ErrInvalidBoolValue ErrorCode
+pkg syscall/zx/fidl, const ErrInvalidEmptyStruct = 20
+pkg syscall/zx/fidl, const ErrInvalidEmptyStruct ErrorCode
+pkg syscall/zx/fidl, const ErrInvalidEnumValue = 18
+pkg syscall/zx/fidl, const ErrInvalidEnumValue ErrorCode
+pkg syscall/zx/fidl, const ErrInvalidInlineType = 2
+pkg syscall/zx/fidl, const ErrInvalidInlineType ErrorCode
+pkg syscall/zx/fidl, const ErrInvalidPointerType = 3
+pkg syscall/zx/fidl, const ErrInvalidPointerType ErrorCode
+pkg syscall/zx/fidl, const ErrInvalidUnionTag = 16
+pkg syscall/zx/fidl, const ErrInvalidUnionTag ErrorCode
+pkg syscall/zx/fidl, const ErrInvalidXUnionTag = 17
+pkg syscall/zx/fidl, const ErrInvalidXUnionTag ErrorCode
+pkg syscall/zx/fidl, const ErrMissingMarshalerContext = 28
+pkg syscall/zx/fidl, const ErrMissingMarshalerContext ErrorCode
+pkg syscall/zx/fidl, const ErrMissingRequiredHandleRights = 25
+pkg syscall/zx/fidl, const ErrMissingRequiredHandleRights ErrorCode
+pkg syscall/zx/fidl, const ErrNonZeroPadding = 13
+pkg syscall/zx/fidl, const ErrNonZeroPadding ErrorCode
+pkg syscall/zx/fidl, const ErrNotEnoughHandles = 10
+pkg syscall/zx/fidl, const ErrNotEnoughHandles ErrorCode
+pkg syscall/zx/fidl, const ErrPayloadTooSmall = 19
+pkg syscall/zx/fidl, const ErrPayloadTooSmall ErrorCode
+pkg syscall/zx/fidl, const ErrResponseWithoutRequest = 29
+pkg syscall/zx/fidl, const ErrResponseWithoutRequest ErrorCode
+pkg syscall/zx/fidl, const ErrStringNotUTF8 = 23
+pkg syscall/zx/fidl, const ErrStringNotUTF8 ErrorCode
+pkg syscall/zx/fidl, const ErrStringTooLong = 5
+pkg syscall/zx/fidl, const ErrStringTooLong ErrorCode
+pkg syscall/zx/fidl, const ErrStructIsNotPayload = 15
+pkg syscall/zx/fidl, const ErrStructIsNotPayload ErrorCode
+pkg syscall/zx/fidl, const ErrTooManyHandles = 11
+pkg syscall/zx/fidl, const ErrTooManyHandles ErrorCode
+pkg syscall/zx/fidl, const ErrUnableToReduceHandleRights = 26
+pkg syscall/zx/fidl, const ErrUnableToReduceHandleRights ErrorCode
+pkg syscall/zx/fidl, const ErrUnexpectedNullHandle = 7
+pkg syscall/zx/fidl, const ErrUnexpectedNullHandle ErrorCode
+pkg syscall/zx/fidl, const ErrUnexpectedNullRef = 8
+pkg syscall/zx/fidl, const ErrUnexpectedNullRef ErrorCode
+pkg syscall/zx/fidl, const ErrUnexpectedNumBytes = 21
+pkg syscall/zx/fidl, const ErrUnexpectedNumBytes ErrorCode
+pkg syscall/zx/fidl, const ErrUnexpectedNumHandles = 22
+pkg syscall/zx/fidl, const ErrUnexpectedNumHandles ErrorCode
+pkg syscall/zx/fidl, const ErrUnexpectedOrdinal = 6
+pkg syscall/zx/fidl, const ErrUnexpectedOrdinal ErrorCode
+pkg syscall/zx/fidl, const ErrUnknownMagic = 24
+pkg syscall/zx/fidl, const ErrUnknownMagic ErrorCode
+pkg syscall/zx/fidl, const ErrUnknownOrdinal = 1
+pkg syscall/zx/fidl, const ErrUnknownOrdinal ErrorCode
+pkg syscall/zx/fidl, const ErrUnspecifiedHandleRights = 27
+pkg syscall/zx/fidl, const ErrUnspecifiedHandleRights ErrorCode
+pkg syscall/zx/fidl, const ErrUnspecifiedHandleType = 33
+pkg syscall/zx/fidl, const ErrUnspecifiedHandleType ErrorCode
+pkg syscall/zx/fidl, const ErrVectorTooLong = 4
+pkg syscall/zx/fidl, const ErrVectorTooLong ErrorCode
+pkg syscall/zx/fidl, const FidlWireFormatMagicNumberInitial = 1
+pkg syscall/zx/fidl, const FidlWireFormatMagicNumberInitial ideal-int
+pkg syscall/zx/fidl, const Invalid = 0
+pkg syscall/zx/fidl, const Invalid ErrorCode
+pkg syscall/zx/fidl, const ProtocolRights = 61454
+pkg syscall/zx/fidl, const ProtocolRights zx.Rights
+pkg syscall/zx/fidl, func CreateLazyMarshaler(interface{}) Marshaler
+pkg syscall/zx/fidl, func CreateMarshaler(interface{}) (Marshaler, error)
+pkg syscall/zx/fidl, func GetMarshalerContext(context.Context) (MarshalerContext, bool)
+pkg syscall/zx/fidl, func Marshal(Message, []uint8, []zx.HandleDisposition) (int, int, error)
+pkg syscall/zx/fidl, func MarshalHeaderThenMessage(*MessageHeader, Message, []uint8, []zx.HandleDisposition) (int, int, error)
+pkg syscall/zx/fidl, func MarshalWithContext(MarshalerContext, Message, []uint8, []zx.HandleDisposition) (int, int, error)
+pkg syscall/zx/fidl, func MustCreateMarshaler(interface{}) Marshaler
+pkg syscall/zx/fidl, func NewInterfaceRequest() (InterfaceRequest, *ChannelProxy, error)
+pkg syscall/zx/fidl, func Unmarshal([]uint8, []zx.HandleInfo, Message) (int, int, error)
+pkg syscall/zx/fidl, func UnmarshalHeaderThenMessage([]uint8, []zx.HandleInfo, *MessageHeader, Message) error
+pkg syscall/zx/fidl, func UnmarshalWithContext(MarshalerContext, []uint8, []zx.Handle, Message) (int, int, error)
+pkg syscall/zx/fidl, func UnmarshalWithContext2(MarshalerContext, []uint8, []zx.HandleInfo, Message) (int, int, error)
+pkg syscall/zx/fidl, func WithMarshalerContext(context.Context, MarshalerContext) context.Context
+pkg syscall/zx/fidl, method (*ChannelProxy) Call(uint64, Message, Message, ...uint64) error
+pkg syscall/zx/fidl, method (*ChannelProxy) Handle() *zx.Handle
+pkg syscall/zx/fidl, method (*ChannelProxy) IsValid() bool
+pkg syscall/zx/fidl, method (*ChannelProxy) Recv(uint64, Message, ...uint64) error
+pkg syscall/zx/fidl, method (*ChannelProxy) Send(uint64, Message) error
+pkg syscall/zx/fidl, method (*InterfaceRequest) Handle() *zx.Handle
+pkg syscall/zx/fidl, method (*MessageHeader) IsSupportedVersion() bool
+pkg syscall/zx/fidl, method (*MessageHeader) Marshaler() Marshaler
+pkg syscall/zx/fidl, method (*MessageHeader) NewCtx() MarshalerContext
+pkg syscall/zx/fidl, method (ErrorCode) Code() ErrorCode
+pkg syscall/zx/fidl, method (ErrorCode) Error() string
+pkg syscall/zx/fidl, method (ErrorCode) String() string
+pkg syscall/zx/fidl, method (MarshalerContext) NewHeader() MessageHeader
+pkg syscall/zx/fidl, type ChannelProxy struct
+pkg syscall/zx/fidl, type ChannelProxy struct, embedded zx.Channel
+pkg syscall/zx/fidl, type Context interface { Done, Err, Value }
+pkg syscall/zx/fidl, type Context interface, Done() <-chan struct
+pkg syscall/zx/fidl, type Context interface, Err() error
+pkg syscall/zx/fidl, type Context interface, Value(interface{}) interface{}
+pkg syscall/zx/fidl, type DispatchArgs struct
+pkg syscall/zx/fidl, type DispatchArgs struct, Bytes []uint8
+pkg syscall/zx/fidl, type DispatchArgs struct, Ctx context.Context
+pkg syscall/zx/fidl, type DispatchArgs struct, HandleInfos []zx.HandleInfo
+pkg syscall/zx/fidl, type DispatchArgs struct, Ordinal uint64
+pkg syscall/zx/fidl, type ErrorCode uint32
+pkg syscall/zx/fidl, type InterfaceRequest struct
+pkg syscall/zx/fidl, type InterfaceRequest struct, embedded zx.Channel
+pkg syscall/zx/fidl, type Marshaler interface, unexported methods
+pkg syscall/zx/fidl, type MarshalerContext struct
+pkg syscall/zx/fidl, type Message interface { Marshaler }
+pkg syscall/zx/fidl, type Message interface, Marshaler() Marshaler
+pkg syscall/zx/fidl, type MessageHeader struct
+pkg syscall/zx/fidl, type MessageHeader struct, Flags [3]uint8
+pkg syscall/zx/fidl, type MessageHeader struct, Magic uint8
+pkg syscall/zx/fidl, type MessageHeader struct, Ordinal uint64
+pkg syscall/zx/fidl, type MessageHeader struct, Txid uint32
+pkg syscall/zx/fidl, type Proxy interface { Call, IsValid, Recv, Send }
+pkg syscall/zx/fidl, type Proxy interface, Call(uint64, Message, Message, ...uint64) error
+pkg syscall/zx/fidl, type Proxy interface, IsValid() bool
+pkg syscall/zx/fidl, type Proxy interface, Recv(uint64, Message, ...uint64) error
+pkg syscall/zx/fidl, type Proxy interface, Send(uint64, Message) error
+pkg syscall/zx/fidl, type ServiceRequest interface { Name, ToChannel }
+pkg syscall/zx/fidl, type ServiceRequest interface, Name() string
+pkg syscall/zx/fidl, type ServiceRequest interface, ToChannel() zx.Channel
+pkg syscall/zx/fidl, type Stub interface { Dispatch }
+pkg syscall/zx/fidl, type Stub interface, Dispatch(DispatchArgs) (Message, bool, error)
+pkg syscall/zx/fidl, type ValidationError interface { Code, Error }
+pkg syscall/zx/fidl, type ValidationError interface, Code() ErrorCode
+pkg syscall/zx/fidl, type ValidationError interface, Error() string
+pkg syscall/zx/fidl, var MessageHeaderSize int
+pkg syscall/zx/fidl, type Enum interface { IsUnknown }
+pkg syscall/zx/fidl, type Enum interface, IsUnknown() bool
diff --git a/makefuchsia/BUILD.gn b/makefuchsia/BUILD.gn
new file mode 100644
index 0000000..fa7d13f
--- /dev/null
+++ b/makefuchsia/BUILD.gn
@@ -0,0 +1,16 @@
+# Copyright 2019 The Fuchsia Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/go/go_binary.gni")
+import("//build/go/go_library.gni")
+
+go_library("makefuchsia_lib") {
+  name = "makefuchsia"
+}
+
+go_binary("makefuchsia") {
+  gopackage = "makefuchsia"
+
+  deps = [ ":makefuchsia_lib" ]
+}
diff --git a/makefuchsia/makefuchsia.go b/makefuchsia/makefuchsia.go
new file mode 100644
index 0000000..e1ee17e
--- /dev/null
+++ b/makefuchsia/makefuchsia.go
@@ -0,0 +1,86 @@
+// Copyright 2017 The Fuchsia Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// The makefuchsia.go script builds a GOROOT in the out/ build directory
+// using sources from third_party/go.
+package main
+
+import (
+	"bytes"
+	"flag"
+	"io/ioutil"
+	"log"
+	"os"
+	"os/exec"
+	"path/filepath"
+	"time"
+)
+
+var (
+	bootstrapGoroot = flag.String("bootstrap-goroot", "", "Path to go root used for bootstrap")
+	gocache         = flag.String("gocache", "", "Path to GOCACHE")
+	goroot          = flag.String("goroot", "", "Path to the output GOROOT")
+
+	depfilePath = flag.String("depfile", "", "depfile to write into")
+	stampPath   = flag.String("stamp-file", "", "Path of a file to create upon completion")
+)
+
+func main() {
+	log.SetFlags(log.Lshortfile)
+	flag.Parse()
+
+	src := filepath.Join(*goroot, "src")
+
+	abs, err := filepath.Abs(filepath.Join(src, "make.bash"))
+	if err != nil {
+		log.Fatal(err)
+	}
+	cmd := exec.Command(abs)
+	cmd.Dir = src
+	cmd.Env = []string{
+		"PATH=" + os.Getenv("PATH"),
+		"GOROOT_BOOTSTRAP=" + *bootstrapGoroot,
+		"GOCACHE=" + *gocache,
+	}
+	if tmp, ok := os.LookupEnv("TMPDIR"); ok {
+		cmd.Env = append(cmd.Env, "TMPDIR=" + tmp)
+	}
+	if out, err := cmd.CombinedOutput(); err != nil {
+		log.Fatalf("%s failed: %s\n%s", cmd.Args, err, out)
+	}
+
+	var buf bytes.Buffer
+	buf.WriteString(*stampPath)
+	buf.WriteByte(':')
+	if err := filepath.Walk(*goroot, func(path string, info os.FileInfo, err error) error {
+		if err != nil {
+			return err
+		}
+		if !info.IsDir() {
+			buf.WriteByte(' ')
+			buf.WriteString(path)
+		}
+		return nil
+	}); err != nil {
+		log.Fatal(err)
+	}
+
+	buf.WriteByte('\n')
+
+	if err := ioutil.WriteFile(*depfilePath, buf.Bytes(), os.ModePerm); err != nil {
+		log.Fatal(err)
+	}
+
+	f, err := os.OpenFile(*stampPath, os.O_CREATE|os.O_TRUNC, os.ModePerm)
+	if err != nil {
+		log.Fatal(err)
+	}
+	if err := f.Close(); err != nil {
+		log.Fatal(err)
+	}
+	now := time.Now()
+	if err := os.Chtimes(*stampPath, now, now); err != nil {
+		log.Fatal(err)
+	}
+}
diff --git a/makeroot/BUILD.gn b/makeroot/BUILD.gn
new file mode 100644
index 0000000..2d84989
--- /dev/null
+++ b/makeroot/BUILD.gn
@@ -0,0 +1,16 @@
+# Copyright 2019 The Fuchsia Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/go/go_binary.gni")
+import("//build/go/go_library.gni")
+
+go_library("makeroot_lib") {
+  name = "makeroot"
+}
+
+go_binary("makeroot") {
+  gopackage = "makeroot"
+
+  deps = [ ":makeroot_lib" ]
+}
diff --git a/makeroot/makeroot.go b/makeroot/makeroot.go
new file mode 100644
index 0000000..64a8ade
--- /dev/null
+++ b/makeroot/makeroot.go
@@ -0,0 +1,119 @@
+// Copyright 2018 The Fuchsia Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// The makeroot.go script copies a GOROOT. It is a precursor to makefuchsia.go,
+// used to stage a clean GOROOT into the build directory.
+// Note: this script exists because the `go` tool globs for inputs, as such, a
+// copy tool is required that will actively remove files that are not found in
+// the source.
+
+package main
+
+import (
+	"bytes"
+	"flag"
+	"io"
+	"io/ioutil"
+	"log"
+	"os"
+	"os/exec"
+	"path/filepath"
+	"time"
+)
+
+var (
+	sourceGoroot = flag.String("source-goroot", "", "GOROOT to copy from")
+	targetGoroot = flag.String("target-goroot", "", "GOROOT to copy into")
+	depfilePath  = flag.String("depfile", "", "depfile to write into")
+	stampPath    = flag.String("stamp-file", "", "Path of a file to create upon completion")
+)
+
+func main() {
+	log.SetFlags(log.Lshortfile)
+	flag.Parse()
+
+	if err := os.RemoveAll(*targetGoroot); err != nil {
+		log.Fatal(err)
+	}
+
+	var buf bytes.Buffer
+	buf.WriteString(*stampPath)
+	buf.WriteByte(':')
+
+	cmd := exec.Command("git", "ls-files", "--cached", "--others", "--exclude-standard", "-z")
+	cmd.Dir = *sourceGoroot
+	cmd.Env = []string{
+		"PATH=" + os.Getenv("PATH"),
+	}
+	out, err := cmd.Output()
+	if err != nil {
+		log.Fatal(err)
+	}
+	for _, path := range bytes.Split(out, []byte{0}) {
+		if len(path) == 0 {
+			continue
+		}
+		path := string(path)
+		src := filepath.Join(*sourceGoroot, path)
+		dst := filepath.Join(*targetGoroot, path)
+		srcFile, err := os.Open(src)
+		if err != nil {
+			// Renaming or deleting files will cause git ls-files to return the old (or deleted)
+			// paths unless the change is staged, so ignore these errors.
+			if os.IsNotExist(err) {
+				log.Print("could not open file: ", src)
+				continue
+			}
+			log.Fatal(err)
+		}
+		dstDir := filepath.Dir(dst)
+		if _, err := os.Stat(dstDir); os.IsNotExist(err) {
+			info, err := os.Stat(filepath.Dir(src))
+			if err != nil {
+				log.Fatal(err)
+			}
+			if err := os.MkdirAll(dstDir, info.Mode()); err != nil {
+				log.Fatal(err)
+			}
+		} else if err != nil {
+			log.Fatal(err)
+		}
+		info, err := srcFile.Stat()
+		if err != nil {
+			log.Fatal(err)
+		}
+		dstFile, err := os.OpenFile(dst, os.O_WRONLY|os.O_CREATE|os.O_EXCL, info.Mode())
+		if err != nil {
+			log.Fatal(err)
+		}
+		if _, err := io.Copy(dstFile, srcFile); err != nil {
+			log.Fatal(err)
+		}
+		if err := dstFile.Close(); err != nil {
+			log.Fatal(err)
+		}
+		if err := srcFile.Close(); err != nil {
+			log.Fatal(err)
+		}
+		buf.WriteByte(' ')
+		buf.WriteString(src)
+	}
+	buf.WriteByte('\n')
+
+	if err := ioutil.WriteFile(*depfilePath, buf.Bytes(), os.ModePerm); err != nil {
+		log.Fatal(err)
+	}
+
+	f, err := os.OpenFile(*stampPath, os.O_CREATE|os.O_TRUNC, os.ModePerm)
+	if err != nil {
+		log.Fatal(err)
+	}
+	if err := f.Close(); err != nil {
+		log.Fatal(err)
+	}
+	now := time.Now()
+	if err := os.Chtimes(*stampPath, now, now); err != nil {
+		log.Fatal(err)
+	}
+}
diff --git a/meta/go_exec_test.cmx b/meta/go_exec_test.cmx
new file mode 100644
index 0000000..7fd9ba2
--- /dev/null
+++ b/meta/go_exec_test.cmx
@@ -0,0 +1,24 @@
+{
+    "program": {
+        "args": [
+            "--test.timeout",
+            "2m"
+        ],
+        "binary": "test/go_exec_test"
+    },
+    "sandbox": {
+        "boot": [
+            "bin",
+            "lib"
+        ],
+        "dev": [
+            "null"
+        ],
+        "features": [
+            "isolated-temp"
+        ],
+        "services": [
+            "fuchsia.process.Launcher"
+        ]
+    }
+}
diff --git a/meta/go_extended_fidl_test.cmx b/meta/go_extended_fidl_test.cmx
new file mode 100644
index 0000000..c780119
--- /dev/null
+++ b/meta/go_extended_fidl_test.cmx
@@ -0,0 +1,14 @@
+{
+    "program": {
+        "args": [
+            "--test.timeout",
+            "2m"
+        ],
+        "binary": "test/go_extended_fidl_test"
+    },
+    "sandbox": {
+        "features": [
+            "isolated-persistent-storage"
+        ]
+    }
+}
diff --git a/meta/go_fidl_test.cmx b/meta/go_fidl_test.cmx
new file mode 100644
index 0000000..84c9944
--- /dev/null
+++ b/meta/go_fidl_test.cmx
@@ -0,0 +1,14 @@
+{
+    "program": {
+        "args": [
+            "--test.timeout",
+            "2m"
+        ],
+        "binary": "test/go_fidl_test"
+    },
+    "sandbox": {
+        "features": [
+            "isolated-persistent-storage"
+        ]
+    }
+}
diff --git a/meta/go_net_test.cmx b/meta/go_net_test.cmx
new file mode 100644
index 0000000..ba9803f
--- /dev/null
+++ b/meta/go_net_test.cmx
@@ -0,0 +1,26 @@
+{
+    "facets": {
+        "fuchsia.test": {
+            "injected-services": {
+                "fuchsia.net.stack.Stack": "fuchsia-pkg://fuchsia.com/go-stdlib-tests#meta/netstack-debug.cmx",
+                "fuchsia.posix.socket.Provider": "fuchsia-pkg://fuchsia.com/go-stdlib-tests#meta/netstack-debug.cmx"
+            }
+        }
+    },
+    "program": {
+        "args": [
+            "--test.timeout",
+            "2m"
+        ],
+        "binary": "test/go_net_test"
+    },
+    "sandbox": {
+        "features": [
+            "isolated-temp"
+        ],
+        "services": [
+            "fuchsia.net.stack.Stack",
+            "fuchsia.posix.socket.Provider"
+        ]
+    }
+}
diff --git a/meta/go_os_test.cmx b/meta/go_os_test.cmx
new file mode 100644
index 0000000..2d7be35
--- /dev/null
+++ b/meta/go_os_test.cmx
@@ -0,0 +1,24 @@
+{
+    "program": {
+        "args": [
+            "--test.timeout",
+            "2m"
+        ],
+        "binary": "test/go_os_test"
+    },
+    "sandbox": {
+        "boot": [
+            "bin",
+            "lib"
+        ],
+        "dev": [
+            "null"
+        ],
+        "features": [
+            "isolated-temp"
+        ],
+        "services": [
+            "fuchsia.process.Launcher"
+        ]
+    }
+}
diff --git a/meta/go_pprof_test.cmx b/meta/go_pprof_test.cmx
new file mode 100644
index 0000000..f616f0b
--- /dev/null
+++ b/meta/go_pprof_test.cmx
@@ -0,0 +1,18 @@
+{
+    "program": {
+        "args": [
+            "--test.v",
+            "--test.timeout",
+            "2m"
+        ],
+        "binary": "test/go_pprof_test"
+    },
+    "sandbox": {
+        "features": [
+            "isolated-temp"
+        ],
+        "services": [
+            "fuchsia.process.Launcher"
+        ]
+    }
+}
diff --git a/meta/go_unsafevalue_test.cmx b/meta/go_unsafevalue_test.cmx
new file mode 100644
index 0000000..5255783
--- /dev/null
+++ b/meta/go_unsafevalue_test.cmx
@@ -0,0 +1,9 @@
+{
+    "program": {
+        "args": [
+            "--test.timeout",
+            "2m"
+        ],
+        "binary": "test/go_unsafevalue_test"
+    }
+}
diff --git a/meta/go_zx_test.cmx b/meta/go_zx_test.cmx
new file mode 100644
index 0000000..c2581e8
--- /dev/null
+++ b/meta/go_zx_test.cmx
@@ -0,0 +1,9 @@
+{
+    "program": {
+        "args": [
+            "--test.timeout",
+            "2m"
+        ],
+        "binary": "test/go_zx_test"
+    }
+}
diff --git a/meta/go_zxwait_test.cmx b/meta/go_zxwait_test.cmx
new file mode 100644
index 0000000..d8330fc
--- /dev/null
+++ b/meta/go_zxwait_test.cmx
@@ -0,0 +1,9 @@
+{
+    "program": {
+        "args": [
+            "--test.timeout",
+            "2m"
+        ],
+        "binary": "test/go_zxwait_test"
+    }
+}
diff --git a/misc/fuchsia/README.md b/misc/fuchsia/README.md
new file mode 100644
index 0000000..e26e84b
--- /dev/null
+++ b/misc/fuchsia/README.md
@@ -0,0 +1,47 @@
+Go on Fuchsia
+=========
+
+To build a toolchain on Linux for Fuchsia, first follow the
+instructions on
+
+  https://fuchsia.googlesource.com/manifest/
+
+Then,
+* Set the SDK environment variable to the location of the Fuchsia SDK:
+  If you downloaded fuchsia to your ${HOME} directory:
+  ```
+  export SDK=${HOME}/fuchsia/buildtools
+  ```
+
+* Identify where a host version of go exists, with:
+  ```
+  export GOROOT_BOOTSTRAP=`path to directory containing go`
+  ```
+  On my machine, `which go` returned /usr/lib/golang/bin/go, so I set
+  GOROOT_BOOTSTRAP=/usr/lib/golang/
+
+* Build Go in `fuchsia/third_party/go/src` using
+  ```
+  GOOS=fuchsia CC_FOR_TARGET=../misc/fuchsia/clangwrap.sh ./make.bash
+  ```
+
+* To build a program, junk.go in go/src, use:
+  ```
+  GOOS=fuchsia ../bin/go build junk.go
+  ```
+  This program can be put in a bootfs and run on qemu with:
+  ```
+  echo bin/junk=junk > junk.manifest
+  fuchsia/buildtools/mkbootfs -o junk.bootfs junk.manifest
+  ./scripts/run-zircon-x64 -x path/to/fuchsia/third_party/go/src/junk.bootfs
+  ```
+  A cgo variant can be build by adding CGO_ENABLED=1 to both
+  the make.bash command and the go build command.
+
+* To build a program using just the zircon prebuild toolchain
+  (useful for debugging if the fuchsia sysroot is out of sync
+  with your zircon) set the environment variable ZIRCON to
+  the location of your zircon and build with the gccwrap.sh
+  script:
+  ```
+  ZIRCON=$HOME/zircon CGO_ENABLED=1 CC_FOR_TARGET=$(pwd)/../misc/fuchsia/gccwrap.sh GOOS=fuchsia ./make.bash
diff --git a/misc/fuchsia/clangwrap.sh b/misc/fuchsia/clangwrap.sh
new file mode 100755
index 0000000..3339260
--- /dev/null
+++ b/misc/fuchsia/clangwrap.sh
@@ -0,0 +1,33 @@
+#!/bin/bash
+set -eu
+
+clangbin="clang"
+if [[ -n ${CLANG_PREFIX} ]]; then
+  clangbin="${CLANG_PREFIX}/${clangbin}"
+fi
+
+if [[ ${GOOS} != "fuchsia" ]]; then
+  exec "${clangbin}" "$@"
+fi
+
+case "${GOARCH}" in
+arm64)
+  CLANG_TRIPLE="aarch64-fuchsia"
+  ;;
+amd64)
+  CLANG_TRIPLE="x86_64-fuchsia"
+  ;;
+*)
+  echo >&2 "Unsupported architecture: ${GOARCH}"
+  exit 1
+  ;;
+esac
+
+declare -a extra_args
+# -Qunused-arguments is used to avoid issues with intermediate builds that don't directly link fdio.
+extra_args+=(-Qunused-arguments)
+extra_args+=("--sysroot=${ZIRCON_SYSROOT}")
+extra_args+=("-I${FDIO_INCLUDE}")
+extra_args+=("-L${FUCHSIA_SHARED_LIBS}")
+
+exec "${clangbin}" --target="${CLANG_TRIPLE}" "${extra_args[@]}" "$@"
diff --git a/misc/fuchsia/gccwrap.sh b/misc/fuchsia/gccwrap.sh
new file mode 100755
index 0000000..93c86cd
--- /dev/null
+++ b/misc/fuchsia/gccwrap.sh
@@ -0,0 +1,66 @@
+#!/bin/bash
+# This uses the zircon prebuild C++ toolchain
+
+if [ -z "${ZIRCON}" ]; then
+	echo "gccwrap.sh: missing ZIRCON env variable" >&2
+	exit 1
+fi
+
+zirconsysroot="${ZIRCON_SYSROOT}"
+if [ -z "${zirconsysroot}" ]; then
+	echo "gccwrap.sh: missing ZIRCON_SYSROOT env variable" >&2
+	exit 1
+fi
+
+if [ -z "${FUCHSIA_ROOT_OUT_DIR}" ]; then
+	echo "gccwrap.sh: missing FUCHSIA_ROOT_OUT_DIR env variable" >&2
+	exit 1
+fi
+
+if [ "$GOARCH" == "amd64" ]; then
+	libdir="x64-shared"
+	gccbin="$ZIRCON/prebuilt/downloads/gcc/bin/x86_64-elf-gcc"
+elif [ "$GOARCH" == "arm64" ]; then
+	libdir="arm64-shared"
+	gccbin="$ZIRCON/prebuilt/downloads/gcc/bin/aarch64-elf-gcc"
+else
+	echo "gccwrap.sh: unsupported GOARCH: $GOARCH" >&2
+	exit 1
+fi
+
+compiler=false
+extra_args=""
+
+for var in "$@"
+do
+	if [[ "$var" == "-r" || "$var" == "-c" ]]; then
+		compiler=true
+	fi
+done
+
+if ! $compiler; then
+	extra_args="-lc $zirconsysroot/lib/Scrt1.o $zirconsysroot/lib/libzircon.so -lfdio"
+fi
+
+exec $gccbin \
+	--sysroot=$zirconsysroot \
+	-I$zirconsysroot/include \
+	-I${ZIRCON}/system/ulib/fdio/include \
+	-L$zirconsysroot/lib \
+	-L${FUCHSIA_ROOT_OUT_DIR}/${libdir} \
+	-nostdlib \
+	-fuse-ld=gold \
+	-fno-use-linker-plugin \
+	-Wl,-nostdlib \
+	-Wl,--build-id \
+	-Wl,-z,max-page-size=4096 \
+	-Wl,-z,combreloc \
+	-Wl,-z,relro \
+	-Wl,-z,now \
+	-Wl,-z,text \
+	-Wl,-z,noexecstack \
+	-Wl,--hash-style=gnu \
+	-Wl,--eh-frame-hdr \
+	-Wl,-dynamic-linker=ld.so.1 \
+	$extra_args \
+	"$@"
diff --git a/misc/fuchsia/go_stdlib_tests.json b/misc/fuchsia/go_stdlib_tests.json
new file mode 100644
index 0000000..e52c708
--- /dev/null
+++ b/misc/fuchsia/go_stdlib_tests.json
@@ -0,0 +1,8 @@
+{
+  "tests":[
+    {
+      "name":"go_os_test",
+      "exec":"/system/bin/report_result /system/test/go_os_test"
+    }
+  ]
+}
diff --git a/regen-fidl b/regen-fidl
new file mode 100755
index 0000000..d52ef44
--- /dev/null
+++ b/regen-fidl
@@ -0,0 +1,121 @@
+#!/usr/bin/env bash
+
+# TODO(pascallouis): better automate this.
+
+set -euxo pipefail
+
+if [ ! -x "${FUCHSIA_DIR}" ]; then
+  echo "error: did you fx exec? missing \$FUCHSIA_DIR" 1>&2
+  exit 1
+fi
+
+if [ ! -x "${FUCHSIA_BUILD_DIR}" ]; then
+  echo "error: did you fx exec? missing \$FUCHSIA_BUILD_DIR" 1>&2
+  exit 1
+fi
+
+pushd "$FUCHSIA_DIR"
+
+FIDLC=host_x64/fidlc
+FIDLGEN_GO=host_x64/fidlgen_go
+
+fx build zircon/tools
+fx ninja -C "${FUCHSIA_BUILD_DIR}" $FIDLC $FIDLGEN_GO
+
+tmpout=$(mktemp -d 2>/dev/null || mktemp -d -t 'tmpout')
+ir_file="${tmpout}/out.json"
+
+trap 'rm -rf -- "${tmpout}" && popd > /dev/null' EXIT
+
+# Parameters:
+# $1 = directory where fidl file is found.
+# $2 =  output of subdirectory of syscall/zx
+# $3..n = additional arguments needed to generate this target.
+function generate_file {
+  local source_dir=$1
+  shift
+  local package_dir=$1
+  shift
+  out_file=third_party/go/src/syscall/zx/"${package_dir}"/impl.go
+  copyright_line=$(grep -E "^// Copyright [0-9]+" "${out_file}" || \
+    echo "// Copyright $(date +%Y) The Fuchsia Authors. All rights reserved.")
+  "${FUCHSIA_BUILD_DIR}"/$FIDLC \
+    --json "${ir_file}" \
+    "$@" \
+    --files "${source_dir}"/*.fidl
+  "${FUCHSIA_BUILD_DIR}"/$FIDLGEN_GO \
+    -json "${ir_file}" \
+    -output-impl "${tmpout}/impl.go"
+
+  tmpfile=$(mktemp "${tmpout}/tmp.XXXXXXXX")
+  echo "${copyright_line}" > "${tmpfile}"
+  cat << EOF >> "${tmpfile}"
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// Code generated by third_party/go/regen-fidl; DO NOT EDIT.
+
+// +build fuchsia
+EOF
+  cat "${tmpout}"/impl.go >> "${tmpfile}"
+  perl -pi -e 's|^// Code generated by fidlgen; DO NOT EDIT.\n$||' "${tmpfile}"
+  perl -pi -e 's|fidl/fuchsia/|syscall/zx/|' "${tmpfile}"
+  ./prebuilt/third_party/go/linux-x64/bin/gofmt -s -w "${tmpfile}"
+  mv -- "${tmpfile}" "${out_file}"
+}
+
+generate_file {third_party/go/src/syscall/zx/,}fidl/internal/bindingstest \
+  --experimental enable_handle_rights \
+  --files zircon/vdso/zx_common.fidl
+
+generate_file sdk/fidl/fuchsia.mem mem \
+  --files zircon/vdso/zx_common.fidl
+
+generate_file sdk/fidl/fuchsia.io io \
+  --files zircon/vdso/zx_common.fidl \
+  --files sdk/fidl/fuchsia.mem/*.fidl
+
+generate_file sdk/fidl/fuchsia.posix posix
+
+generate_file sdk/fidl/fuchsia.posix.socket posix/socket \
+  --files zircon/vdso/zx_common.fidl \
+  --files sdk/fidl/fuchsia.posix/*.fidl \
+  --files sdk/fidl/fuchsia.net/*.fidl \
+  --files sdk/fidl/fuchsia.mem/*.fidl \
+  --files sdk/fidl/fuchsia.io/*.fidl
+
+generate_file sdk/fidl/fuchsia.hardware.ethernet hardware/ethernet \
+  --files zircon/vdso/zx_common.fidl
+
+generate_file sdk/fidl/fuchsia.hardware.network hardware/network \
+  --files zircon/vdso/zx_common.fidl \
+  --files sdk/fidl/fuchsia.net/*.fidl
+
+generate_file sdk/fidl/fuchsia.net.name net/name \
+  --files zircon/vdso/zx_common.fidl \
+  --files sdk/fidl/fuchsia.net/*.fidl
+
+generate_file sdk/fidl/fuchsia.net net
+
+generate_file sdk/fidl/fuchsia.diagnostics diagnostics \
+  --files zircon/vdso/zx_common.fidl \
+  --files sdk/fidl/fuchsia.mem/*.fidl
+
+generate_file sdk/fidl/fuchsia.logger logger \
+  --files zircon/vdso/zx_common.fidl \
+  --files sdk/fidl/fuchsia.mem/*.fidl \
+  --files sdk/fidl/fuchsia.diagnostics/*.fidl
+
+generate_file sdk/fidl/fuchsia.net.stack net/stack \
+  --files zircon/vdso/zx_common.fidl \
+  --files sdk/fidl/fuchsia.mem/*.fidl \
+  --files sdk/fidl/fuchsia.io/*.fidl \
+  --files sdk/fidl/fuchsia.diagnostics/*.fidl \
+  --files sdk/fidl/fuchsia.logger/*.fidl \
+  --files sdk/fidl/fuchsia.net/*.fidl \
+  --files sdk/fidl/fuchsia.net.name/*.fidl \
+  --files sdk/fidl/fuchsia.hardware.ethernet/*.fidl \
+  --files sdk/fidl/fuchsia.hardware.network/*.fidl \
+  --files sdk/fidl/fuchsia.posix/*.fidl \
+  --files sdk/fidl/fuchsia.posix.socket/*.fidl
+
diff --git a/regen-syscalls b/regen-syscalls
new file mode 100755
index 0000000..7d1c60b
--- /dev/null
+++ b/regen-syscalls
@@ -0,0 +1,25 @@
+#!/usr/bin/env bash
+
+set -euo pipefail
+
+../../scripts/fx ninja -C ../../out/default.zircon \
+  host-x64-linux-clang/obj/tools/fidl/fidlc \
+  host-x64-linux-clang/obj/tools/kazoo/kazoo.debug
+
+../../out/default.zircon/host-x64-linux-clang/obj/tools/fidl/fidlc \
+      --json /tmp/syscalls.json \
+      --files ../../zircon/vdso/*.fidl
+
+readonly syscall_stubs=src/syscall/zx/syscalls_fuchsia.go
+readonly vdso_keys=src/runtime/vdso_keys_fuchsia.go
+
+../../out/default.zircon/host-x64-linux-clang/obj/tools/kazoo/kazoo.debug \
+      --go-syscall-arm64-asm=src/syscall/zx/syscalls_fuchsia_arm64.s \
+      --go-syscall-stubs=$syscall_stubs \
+      --go-syscall-x86-asm=src/syscall/zx/syscalls_fuchsia_amd64.s \
+      --go-vdso-arm64-calls=src/runtime/vdsocalls_fuchsia_arm64.s \
+      --go-vdso-keys=$vdso_keys \
+      --go-vdso-x86-calls=src/runtime/vdsocalls_fuchsia_amd64.s \
+      /tmp/syscalls.json
+
+gofmt -s -w $syscall_stubs $vdso_keys
diff --git a/src/cmd/api/run.go b/src/cmd/api/run.go
index a36f117..bbb9ce4 100644
--- a/src/cmd/api/run.go
+++ b/src/cmd/api/run.go
@@ -64,7 +64,7 @@
 	}
 	var apiFiles []string
 	for _, fn := range fs {
-		if strings.HasPrefix(fn, "go1") {
+		if strings.HasPrefix(fn, "go1") || strings.HasPrefix(fn, "fuchsia") {
 			apiFiles = append(apiFiles, filepath.Join(apiDir, fn))
 		}
 	}
diff --git a/src/cmd/dist/build.go b/src/cmd/dist/build.go
index 9e2b4f3..17f5eb4 100644
--- a/src/cmd/dist/build.go
+++ b/src/cmd/dist/build.go
@@ -85,6 +85,7 @@
 	"android",
 	"solaris",
 	"freebsd",
+	"fuchsia",
 	"nacl", // keep;
 	"netbsd",
 	"openbsd",
@@ -1522,6 +1523,8 @@
 	"freebsd/amd64":   true,
 	"freebsd/arm":     true,
 	"freebsd/arm64":   true,
+	"fuchsia/amd64":   true,
+	"fuchsia/arm64":   true,
 	"illumos/amd64":   true,
 	"linux/386":       true,
 	"linux/amd64":     true,
diff --git a/src/cmd/go/internal/base/signal_notunix.go b/src/cmd/go/internal/base/signal_notunix.go
index 9e869b0..a8e5a34 100644
--- a/src/cmd/go/internal/base/signal_notunix.go
+++ b/src/cmd/go/internal/base/signal_notunix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build plan9 windows
+// +build plan9 fuchsia windows
 
 package base
 
diff --git a/src/cmd/go/internal/load/pkg.go b/src/cmd/go/internal/load/pkg.go
index 2b5fbb1..76c5660 100644
--- a/src/cmd/go/internal/load/pkg.go
+++ b/src/cmd/go/internal/load/pkg.go
@@ -1927,6 +1927,11 @@
 
 // LinkerDeps returns the list of linker-induced dependencies for main package p.
 func LinkerDeps(p *Package) []string {
+	// Don't add deps to Fuchsia internal syscall stuff.
+	if p != nil && p.ImportPath == "syscall/zx" {
+		return nil
+	}
+
 	// Everything links runtime.
 	deps := []string{"runtime"}
 
@@ -1963,6 +1968,8 @@
 		if cfg.BuildContext.GOARCH == "arm64" {
 			return true
 		}
+	case "fuchsia":
+		return true
 	}
 
 	if !cfg.BuildContext.CgoEnabled {
diff --git a/src/cmd/go/internal/work/exec.go b/src/cmd/go/internal/work/exec.go
index 071c9d2..bf04655 100644
--- a/src/cmd/go/internal/work/exec.go
+++ b/src/cmd/go/internal/work/exec.go
@@ -2361,6 +2361,7 @@
 		switch cfg.Goos {
 		case "windows":
 			a = append(a, "-mthreads")
+		case "fuchsia":
 		default:
 			a = append(a, "-pthread")
 		}
diff --git a/src/cmd/go/internal/work/gccgo.go b/src/cmd/go/internal/work/gccgo.go
index 4c1f36d..6ce5b34 100644
--- a/src/cmd/go/internal/work/gccgo.go
+++ b/src/cmd/go/internal/work/gccgo.go
@@ -453,7 +453,12 @@
 		// split-stack and non-split-stack code in a single -r
 		// link, and libgo picks up non-split-stack code from
 		// libffi.
-		ldflags = append(ldflags, "-Wl,-r", "-nostdlib")
+		if cfg.Goos == "fuchsia" {
+			ldflags = append(ldflags, "-r")
+		} else {
+			ldflags = append(ldflags, "-Wl,-r")
+		}
+		ldflags = append(ldflags, "-nostdlib")
 		ldflags = append(ldflags, goLibBegin...)
 
 		if nopie := b.gccNoPie([]string{tools.linker()}); nopie != "" {
diff --git a/src/cmd/go/internal/work/init.go b/src/cmd/go/internal/work/init.go
index dad3b10..bfbe626 100644
--- a/src/cmd/go/internal/work/init.go
+++ b/src/cmd/go/internal/work/init.go
@@ -127,7 +127,7 @@
 					codegenArg = "-shared"
 				}
 
-			case "dragonfly", "freebsd", "illumos", "linux", "netbsd", "openbsd", "solaris":
+			case "dragonfly", "freebsd", "fuchsia", "illumos", "linux", "netbsd", "openbsd", "solaris":
 				// Use -shared so that the result is
 				// suitable for inclusion in a PIE or
 				// shared library.
@@ -152,7 +152,7 @@
 		ldBuildmode = "c-shared"
 	case "default":
 		switch cfg.Goos {
-		case "android":
+		case "android", "fuchsia":
 			codegenArg = "-shared"
 			ldBuildmode = "pie"
 		case "windows":
diff --git a/src/cmd/internal/obj/x86/asm6.go b/src/cmd/internal/obj/x86/asm6.go
index 82a2e6a..dbc2856 100644
--- a/src/cmd/internal/obj/x86/asm6.go
+++ b/src/cmd/internal/obj/x86/asm6.go
@@ -2526,6 +2526,9 @@
 					return 0x64 // FS
 				}
 
+			case objabi.Hfuchsia:
+				log.Fatalf("unknown TLS base register, fuchsia requires PIC code")
+
 			case objabi.Hdragonfly,
 				objabi.Hfreebsd,
 				objabi.Hnetbsd,
@@ -5148,7 +5151,7 @@
 					default:
 						log.Fatalf("unknown TLS base location for %v", ctxt.Headtype)
 
-					case objabi.Hlinux, objabi.Hfreebsd:
+					case objabi.Hlinux, objabi.Hfreebsd, objabi.Hfuchsia:
 						if !ctxt.Flag_shared {
 							log.Fatalf("unknown TLS base location for linux/freebsd without -shared")
 						}
diff --git a/src/cmd/internal/obj/x86/obj6.go b/src/cmd/internal/obj/x86/obj6.go
index c1e5bea..505febb 100644
--- a/src/cmd/internal/obj/x86/obj6.go
+++ b/src/cmd/internal/obj/x86/obj6.go
@@ -61,6 +61,8 @@
 		return false
 	case objabi.Hlinux, objabi.Hfreebsd:
 		return !ctxt.Flag_shared
+	case objabi.Hfuchsia:
+		return false
 	}
 
 	return true
diff --git a/src/cmd/internal/objabi/head.go b/src/cmd/internal/objabi/head.go
index 95b8db3..c04f9ae 100644
--- a/src/cmd/internal/objabi/head.go
+++ b/src/cmd/internal/objabi/head.go
@@ -40,6 +40,7 @@
 	Hdarwin
 	Hdragonfly
 	Hfreebsd
+	Hfuchsia
 	Hjs
 	Hlinux
 	Hnetbsd
@@ -60,6 +61,8 @@
 		*h = Hdragonfly
 	case "freebsd":
 		*h = Hfreebsd
+	case "fuchsia":
+		*h = Hfuchsia
 	case "js":
 		*h = Hjs
 	case "linux", "android":
@@ -90,6 +93,8 @@
 		return "dragonfly"
 	case Hfreebsd:
 		return "freebsd"
+	case Hfuchsia:
+		return "fuchsia"
 	case Hjs:
 		return "js"
 	case Hlinux:
diff --git a/src/cmd/link/internal/amd64/asm.go b/src/cmd/link/internal/amd64/asm.go
index b8dc0fc..52dde3b 100644
--- a/src/cmd/link/internal/amd64/asm.go
+++ b/src/cmd/link/internal/amd64/asm.go
@@ -38,6 +38,7 @@
 	"cmd/link/internal/sym"
 	"debug/elf"
 	"log"
+	"strings"
 	"sync"
 )
 
@@ -440,6 +441,8 @@
 		if siz == 4 {
 			if xsym.Type == sym.SDYNIMPORT && xsym.ElfType() == elf.STT_FUNC {
 				ctxt.Out.Write64(uint64(elf.R_X86_64_PLT32) | uint64(elfsym)<<32)
+			} else if xsym.Type == sym.SDYNIMPORT && ctxt.HeadType == objabi.Hfuchsia && strings.HasPrefix(xsym.Name, "vdso_") {
+				ctxt.Out.Write64(uint64(elf.R_X86_64_GOTPCREL) | uint64(elfsym)<<32)
 			} else {
 				ctxt.Out.Write64(uint64(elf.R_X86_64_PC32) | uint64(elfsym)<<32)
 			}
@@ -739,6 +742,7 @@
 
 	case objabi.Hlinux,
 		objabi.Hfreebsd,
+		objabi.Hfuchsia,
 		objabi.Hnetbsd,
 		objabi.Hopenbsd,
 		objabi.Hdragonfly,
@@ -765,6 +769,7 @@
 
 		case objabi.Hlinux,
 			objabi.Hfreebsd,
+			objabi.Hfuchsia,
 			objabi.Hnetbsd,
 			objabi.Hopenbsd,
 			objabi.Hdragonfly,
@@ -832,6 +837,7 @@
 
 	case objabi.Hlinux,
 		objabi.Hfreebsd,
+		objabi.Hfuchsia,
 		objabi.Hnetbsd,
 		objabi.Hopenbsd,
 		objabi.Hdragonfly,
diff --git a/src/cmd/link/internal/amd64/obj.go b/src/cmd/link/internal/amd64/obj.go
index 705827d..f7f7dca 100644
--- a/src/cmd/link/internal/amd64/obj.go
+++ b/src/cmd/link/internal/amd64/obj.go
@@ -101,6 +101,7 @@
 
 	case objabi.Hlinux, /* elf64 executable */
 		objabi.Hfreebsd,   /* freebsd */
+		objabi.Hfuchsia,   /* fuchsia */
 		objabi.Hnetbsd,    /* netbsd */
 		objabi.Hopenbsd,   /* openbsd */
 		objabi.Hdragonfly, /* dragonfly */
diff --git a/src/cmd/link/internal/arm64/asm.go b/src/cmd/link/internal/arm64/asm.go
index 417e4b1..23db0dd 100644
--- a/src/cmd/link/internal/arm64/asm.go
+++ b/src/cmd/link/internal/arm64/asm.go
@@ -929,6 +929,7 @@
 
 	case objabi.Hlinux,
 		objabi.Hfreebsd,
+		objabi.Hfuchsia,
 		objabi.Hnetbsd,
 		objabi.Hopenbsd:
 		ld.Asmbelf(ctxt, int64(symo))
diff --git a/src/cmd/link/internal/arm64/obj.go b/src/cmd/link/internal/arm64/obj.go
index 20426c5..7899667 100644
--- a/src/cmd/link/internal/arm64/obj.go
+++ b/src/cmd/link/internal/arm64/obj.go
@@ -87,6 +87,7 @@
 
 	case objabi.Hlinux, /* arm64 elf */
 		objabi.Hfreebsd,
+		objabi.Hfuchsia,
 		objabi.Hnetbsd,
 		objabi.Hopenbsd:
 		ld.Elfinit(ctxt)
diff --git a/src/cmd/link/internal/ld/config.go b/src/cmd/link/internal/ld/config.go
index 2373b50..ebc644e 100644
--- a/src/cmd/link/internal/ld/config.go
+++ b/src/cmd/link/internal/ld/config.go
@@ -35,10 +35,13 @@
 	default:
 		return fmt.Errorf("invalid buildmode: %q", s)
 	case "exe":
+		if objabi.GOOS == "fuchsia" {
+			return badmode()
+		}
 		*mode = BuildModeExe
 	case "pie":
 		switch objabi.GOOS {
-		case "aix", "android", "linux", "windows":
+		case "aix", "android", "linux", "fuchsia", "windows":
 		case "darwin", "freebsd":
 			switch objabi.GOARCH {
 			case "amd64":
@@ -51,7 +54,7 @@
 		*mode = BuildModePIE
 	case "c-archive":
 		switch objabi.GOOS {
-		case "aix", "darwin", "linux":
+		case "aix", "darwin", "linux", "fuchsia":
 		case "freebsd":
 			switch objabi.GOARCH {
 			case "amd64":
diff --git a/src/cmd/link/internal/ld/data.go b/src/cmd/link/internal/ld/data.go
index d3f308c..99bbf36 100644
--- a/src/cmd/link/internal/ld/data.go
+++ b/src/cmd/link/internal/ld/data.go
@@ -211,8 +211,8 @@
 		}
 
 		// We need to be able to reference dynimport symbols when linking against
-		// shared libraries, and Solaris, Darwin and AIX need it always
-		if !target.IsSolaris() && !target.IsDarwin() && !target.IsAIX() && rs != 0 && rst == sym.SDYNIMPORT && !target.IsDynlinkingGo() && !ldr.AttrSubSymbol(rs) {
+		// shared libraries, and Solaris, Darwin, AIX, and Fuchsia need it always
+		if !target.IsSolaris() && !target.IsDarwin() && !target.IsAIX() && !target.IsFuchsia() && rs != 0 && rst == sym.SDYNIMPORT && !target.IsDynlinkingGo() && !ldr.AttrSubSymbol(rs) {
 			if !(target.IsPPC64() && target.IsExternal() && ldr.SymName(rs) == ".TOC.") {
 				st.err.Errorf(s, "unhandled relocation for %s (type %d (%s) rtype %d (%s))", ldr.SymName(rs), rst, rst, rt, sym.RelocName(target.Arch, rt))
 			}
diff --git a/src/cmd/link/internal/ld/data2.go b/src/cmd/link/internal/ld/data2.go
index d4503a4..f685b4b 100644
--- a/src/cmd/link/internal/ld/data2.go
+++ b/src/cmd/link/internal/ld/data2.go
@@ -102,8 +102,8 @@
 		}
 
 		// We need to be able to reference dynimport symbols when linking against
-		// shared libraries, and Solaris, Darwin and AIX need it always
-		if !target.IsSolaris() && !target.IsDarwin() && !target.IsAIX() && r.Sym != nil && r.Sym.Type == sym.SDYNIMPORT && !target.IsDynlinkingGo() && !r.Sym.Attr.SubSymbol() {
+		// shared libraries, and Solaris, Darwin, AIX, and Fuchsia need it always
+		if !target.IsSolaris() && !target.IsDarwin() && !target.IsAIX() && !target.IsFuchsia() && r.Sym != nil && r.Sym.Type == sym.SDYNIMPORT && !target.IsDynlinkingGo() && !r.Sym.Attr.SubSymbol() {
 			if !(target.IsPPC64() && target.IsExternal() && r.Sym.Name == ".TOC.") {
 				Errorf(s, "unhandled relocation for %s (type %d (%s) rtype %d (%s))", r.Sym.Name, r.Sym.Type, r.Sym.Type, r.Type, sym.RelocName(target.Arch, r.Type))
 			}
diff --git a/src/cmd/link/internal/ld/elf.go b/src/cmd/link/internal/ld/elf.go
index 78298be..a4d8f78 100644
--- a/src/cmd/link/internal/ld/elf.go
+++ b/src/cmd/link/internal/ld/elf.go
@@ -1939,6 +1939,9 @@
 			case objabi.Hfreebsd:
 				interpreter = thearch.Freebsddynld
 
+			case objabi.Hfuchsia:
+				interpreter = "lib/ld.so.1"
+
 			case objabi.Hnetbsd:
 				interpreter = thearch.Netbsddynld
 
@@ -2185,7 +2188,7 @@
 		}
 	}
 
-	if ctxt.HeadType == objabi.Hlinux {
+	if ctxt.HeadType == objabi.Hlinux || ctxt.HeadType == objabi.Hfuchsia {
 		ph := newElfPhdr()
 		ph.type_ = PT_GNU_STACK
 		ph.flags = PF_W + PF_R
diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go
index 0366bc7..40be715 100644
--- a/src/cmd/link/internal/ld/lib.go
+++ b/src/cmd/link/internal/ld/lib.go
@@ -1545,7 +1545,10 @@
 	}
 
 	// Force global symbols to be exported for dlopen, etc.
-	if ctxt.IsELF {
+	if ctxt.HeadType == objabi.Hfuchsia && !strings.Contains(argv[0], "clang") {
+		// Find libgcc
+		argv = append(argv, ctxt.findLibPathCmd("--print-libgcc-file-name", "libgcc"))
+	} else if ctxt.IsELF {
 		argv = append(argv, "-rdynamic")
 	}
 	if ctxt.HeadType == objabi.Haix {
@@ -1669,6 +1672,9 @@
 		argv = append(argv, "-Wl,--start-group", "-lmingwex", "-lmingw32", "-Wl,--end-group")
 		argv = append(argv, peimporteddlls()...)
 	}
+	if ctxt.HeadType == objabi.Hfuchsia && strings.Contains(argv[0], "clang") {
+		argv = append(argv, "-lzircon", "-lfdio")
+	}
 
 	if ctxt.Debugvlog != 0 {
 		ctxt.Logf("host link:")
diff --git a/src/cmd/link/internal/ld/sym.go b/src/cmd/link/internal/ld/sym.go
index 1b7d9d5..a5acf5c 100644
--- a/src/cmd/link/internal/ld/sym.go
+++ b/src/cmd/link/internal/ld/sym.go
@@ -78,6 +78,7 @@
 
 	case objabi.Hlinux,
 		objabi.Hfreebsd,
+		objabi.Hfuchsia,
 		objabi.Hnetbsd,
 		objabi.Hopenbsd,
 		objabi.Hdragonfly,
diff --git a/src/cmd/link/internal/ld/target.go b/src/cmd/link/internal/ld/target.go
index 102b6c5..247354b 100644
--- a/src/cmd/link/internal/ld/target.go
+++ b/src/cmd/link/internal/ld/target.go
@@ -138,6 +138,11 @@
 	return t.HeadType == objabi.Hdarwin
 }
 
+func (t *Target) IsFuchsia() bool {
+	t.mustSetHeadType()
+	return t.HeadType == objabi.Hfuchsia
+}
+
 func (t *Target) IsWindows() bool {
 	t.mustSetHeadType()
 	return t.HeadType == objabi.Hwindows
diff --git a/src/cmd/oldlink/internal/ld/data.go b/src/cmd/oldlink/internal/ld/data.go
index 02230cb..0c60073 100644
--- a/src/cmd/oldlink/internal/ld/data.go
+++ b/src/cmd/oldlink/internal/ld/data.go
@@ -179,8 +179,8 @@
 		}
 
 		// We need to be able to reference dynimport symbols when linking against
-		// shared libraries, and Solaris, Darwin and AIX need it always
-		if ctxt.HeadType != objabi.Hsolaris && ctxt.HeadType != objabi.Hdarwin && ctxt.HeadType != objabi.Haix && r.Sym != nil && r.Sym.Type == sym.SDYNIMPORT && !ctxt.DynlinkingGo() && !r.Sym.Attr.SubSymbol() {
+		// shared libraries, and Solaris, Darwin, AIX, and Fuchsia need it always
+		if ctxt.HeadType != objabi.Hsolaris && ctxt.HeadType != objabi.Hdarwin && ctxt.HeadType != objabi.Haix && ctxt.HeadType != objabi.Hfuchsia && r.Sym != nil && r.Sym.Type == sym.SDYNIMPORT && !ctxt.DynlinkingGo() && !r.Sym.Attr.SubSymbol() {
 			if !(ctxt.Arch.Family == sys.PPC64 && ctxt.LinkMode == LinkExternal && r.Sym.Name == ".TOC.") {
 				Errorf(s, "unhandled relocation for %s (type %d (%s) rtype %d (%s))", r.Sym.Name, r.Sym.Type, r.Sym.Type, r.Type, sym.RelocName(ctxt.Arch, r.Type))
 			}
diff --git a/src/crypto/rand/rand_fuchsia.go b/src/crypto/rand/rand_fuchsia.go
new file mode 100644
index 0000000..40be276
--- /dev/null
+++ b/src/crypto/rand/rand_fuchsia.go
@@ -0,0 +1,25 @@
+// Copyright 2016 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.
+
+// +build fuchsia
+
+package rand
+
+import "syscall/zx"
+
+func init() {
+	Reader = new(cprngReader)
+}
+
+// cprngReader uses the PRNG exposed by zircon syscall.
+//
+// TODO(crawshaw): does it perform as well as /dev/urandom?
+// If not, borrow newReader from rand_unix.go and use this
+// as the entropy source.
+type cprngReader struct{}
+
+func (r *cprngReader) Read(b []byte) (n int, err error) {
+	zx.RandRead(b)
+	return len(b), nil
+}
diff --git a/src/crypto/x509/root_fuchsia.go b/src/crypto/x509/root_fuchsia.go
new file mode 100644
index 0000000..baa0677
--- /dev/null
+++ b/src/crypto/x509/root_fuchsia.go
@@ -0,0 +1,8 @@
+// Copyright 2016 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 x509
+
+// Possible certificate files; stop after finding one.
+var certFiles = []string{"/config/ssl/cert.pem"}
diff --git a/src/crypto/x509/root_unix.go b/src/crypto/x509/root_unix.go
index b48e618..7341b0a 100644
--- a/src/crypto/x509/root_unix.go
+++ b/src/crypto/x509/root_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix dragonfly freebsd js,wasm linux netbsd openbsd solaris
+// +build aix dragonfly freebsd fuchsia js,wasm linux netbsd openbsd solaris
 
 package x509
 
diff --git a/src/go/build/deps_test.go b/src/go/build/deps_test.go
index fa8ecf1..e0aef41 100644
--- a/src/go/build/deps_test.go
+++ b/src/go/build/deps_test.go
@@ -522,6 +522,7 @@
 		// provide access to every source file.
 		t.Skipf("skipping on %s/%s, missing full GOROOT", runtime.GOOS, runtime.GOARCH)
 	}
+	t.Skip("fuchsia dependencies need reworking")
 
 	ctxt := Default
 	all, err := listStdPkgs(ctxt.GOROOT)
diff --git a/src/go/build/syslist.go b/src/go/build/syslist.go
index fbfe4c4..2a70a1d 100644
--- a/src/go/build/syslist.go
+++ b/src/go/build/syslist.go
@@ -7,5 +7,5 @@
 // List of past, present, and future known GOOS and GOARCH values.
 // Do not remove from this list, as these are used for go/build filename matching.
 
-const goosList = "aix android darwin dragonfly freebsd hurd illumos js linux nacl netbsd openbsd plan9 solaris windows zos "
+const goosList = "aix android darwin dragonfly freebsd fuchsia hurd illumos js linux nacl netbsd openbsd plan9 solaris windows zos "
 const goarchList = "386 amd64 amd64p32 arm armbe arm64 arm64be ppc64 ppc64le mips mipsle mips64 mips64le mips64p32 mips64p32le ppc riscv riscv64 s390 s390x sparc sparc64 wasm "
diff --git a/src/internal/poll/fd_fsync_posix.go b/src/internal/poll/fd_fsync_posix.go
index 6935829..1bcd160 100644
--- a/src/internal/poll/fd_fsync_posix.go
+++ b/src/internal/poll/fd_fsync_posix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix dragonfly freebsd js,wasm linux netbsd openbsd solaris
+// +build aix dragonfly freebsd fuchsia js,wasm linux netbsd openbsd solaris
 
 package poll
 
diff --git a/src/internal/poll/fd_fuchsia.go b/src/internal/poll/fd_fuchsia.go
new file mode 100644
index 0000000..47f16bc
--- /dev/null
+++ b/src/internal/poll/fd_fuchsia.go
@@ -0,0 +1,334 @@
+// Copyright 2017 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.
+
+// +build fuchsia
+
+package poll
+
+import (
+	"io"
+	"sync/atomic"
+	"syscall"
+	"syscall/zx"
+	"syscall/zx/zxsocket"
+	"unsafe"
+)
+
+// FD is a file descriptor. The net and os packages embed this type in
+// a larger type representing a network connection or OS file.
+type FD struct {
+	// Lock sysfd and serialize access to Read and Write methods.
+	fdmu fdMutex
+
+	// System file descriptor. Immutable until Close.
+	Sysfd int
+
+	// I/O poller.
+	pd pollDesc
+
+	// Whether this is a streaming descriptor, as opposed to a
+	// packet-based descriptor like a UDP socket.
+	IsStream bool
+
+	// Whether a zero byte read indicates EOF. This is false for a
+	// message based socket connection.
+	ZeroReadIsEOF bool
+
+	// Whether this is a normal file.
+	isFile bool
+
+	// Whether in blocking mode
+	isBlocking uint32
+}
+
+// Init initializes the FD. The Sysfd field should already be set.
+// This can be called multiple times on a single FD.
+// The net argument is a network name from the net package (e.g., "tcp"),
+// or "file".
+// Set pollable to true if fd should be managed by runtime netpoll.
+func (fd *FD) Init(net string, pollable bool) error {
+	// We don't actually care about the various network types.
+	if net == "file" {
+		fd.isFile = true
+	}
+	if !pollable {
+		fd.isBlocking = 1
+		return nil
+	}
+	err := fd.pd.init(fd)
+	if err != nil {
+		fd.isBlocking = 1
+	}
+	return err
+}
+
+// see fd.Close() for reasoning.
+func close(fd *FD) error {
+	sysfd := atomic.SwapInt64((*int64)(unsafe.Pointer(&fd.Sysfd)), -1)
+	if sysfd != -1 {
+		return syscall.Close(int(sysfd))
+	}
+	return nil
+}
+
+// Destroy closes the file descriptor. This is called when there are
+// no remaining references.
+func (fd *FD) destroy() error {
+	// Poller may want to unregister fd in readiness notification mechanism,
+	// so this must be executed before closing the fd.
+	fd.pd.close()
+
+	return close(fd)
+}
+
+// Close closes the FD. The underlying file descriptor is closed by the
+// destroy method when there are no remaining references.
+func (fd *FD) Close() error {
+	if !fd.fdmu.increfAndClose() {
+		return errClosing(fd.isFile)
+	}
+
+	fd.pd.evict()
+	// Note: On other implementations, evict will unblock sibling refs, however,
+	// that can't be done yet here. Instead, we have to forcefully close the
+	// connection, sadly ahead of destroy, in order to unblock others.
+	err := close(fd)
+
+	fd.decref()
+
+	return err
+}
+
+func (fd *FD) Read(p []byte) (int, error) {
+	if err := fd.readLock(); err != nil {
+		return 0, err
+	}
+	defer fd.readUnlock()
+	if len(p) == 0 {
+		// If the caller wanted a zero byte read, return immediately
+		// without trying (but after acquiring the readLock).
+		return 0, nil
+	}
+	if err := fd.pd.prepareRead(fd.isFile); err != nil {
+		return 0, err
+	}
+	// TODO: pollable() read
+	n, err := syscall.Read(fd.Sysfd, p)
+	err = fd.eofError(n, err)
+	return n, err
+}
+
+// Pread wraps the pread system call.
+func (fd *FD) Pread(p []byte, off int64) (int, error) {
+	// Call incref, not readLock, because since pread specifies the
+	// offset it is independent from other reads.
+	// Similarly, using the poller doesn't make sense for pread.
+	if err := fd.incref(); err != nil {
+		return 0, err
+	}
+	n, err := syscall.Pread(fd.Sysfd, p, off)
+	if err != nil {
+		n = 0
+	}
+	fd.decref()
+	err = fd.eofError(n, err)
+	return n, err
+}
+
+// Write implements io.Writer.
+func (fd *FD) Write(p []byte) (int, error) {
+	if err := fd.writeLock(); err != nil {
+		return 0, err
+	}
+	defer fd.writeUnlock()
+	if err := fd.pd.prepareWrite(fd.isFile); err != nil {
+		return 0, err
+	}
+	var nn int
+	for {
+		n, err := syscall.Write(fd.Sysfd, p[nn:])
+		if n > 0 {
+			nn += n
+		}
+		if nn == len(p) {
+			return nn, err
+		}
+		if err != nil {
+			return nn, err
+		}
+		if n == 0 {
+			return nn, io.ErrUnexpectedEOF
+		}
+	}
+}
+
+// Pwrite wraps the pwrite system call.
+func (fd *FD) Pwrite(p []byte, off int64) (int, error) {
+	// Call incref, not writeLock, because since pwrite specifies the
+	// offset it is independent from other writes.
+	// Similarly, using the poller doesn't make sense for pwrite.
+	if err := fd.incref(); err != nil {
+		return 0, err
+	}
+	defer fd.decref()
+	var nn int
+	for {
+		n, err := syscall.Pwrite(fd.Sysfd, p[nn:], off+int64(nn))
+		if n > 0 {
+			nn += n
+		}
+		if nn == len(p) {
+			return nn, err
+		}
+		if err != nil {
+			return nn, err
+		}
+		if n == 0 {
+			return nn, io.ErrUnexpectedEOF
+		}
+	}
+}
+
+// Accept wraps the accept network call.
+func (fd *FD) Accept() (zxsocket.Socket, error) {
+	if err := fd.readLock(); err != nil {
+		return nil, err
+	}
+	defer fd.readUnlock()
+
+	if err := fd.pd.prepareRead(fd.isFile); err != nil {
+		return nil, err
+	}
+
+	s, ok := syscall.FDIOForFD(fd.Sysfd).(*zxsocket.StreamSocket)
+	if !ok {
+		return nil, syscall.EBADF
+	}
+	var newS zxsocket.Socket
+	var err error
+	for i := 0; i < 2; i++ {
+		newS, err = s.Accept(0)
+		if err != syscall.EAGAIN {
+			if err, ok := err.(*zx.Error); ok {
+				switch err.Status {
+				case zx.ErrPeerClosed, zx.ErrBadHandle:
+					return nil, errClosing(fd.isFile)
+				}
+			}
+			break
+		}
+		// TODO: non-blocking support, pass this to the poller
+		obs, err := s.Wait(zxsocket.SignalIncoming|zx.SignalSocketPeerClosed, zx.TimensecInfinite)
+		if err != nil {
+			if err, ok := err.(*zx.Error); ok {
+				switch err.Status {
+				case zx.ErrCanceled, zx.ErrBadHandle:
+					return nil, errClosing(fd.isFile)
+				}
+			}
+			return nil, err
+		}
+		if obs&zx.SignalSocketPeerClosed != 0 {
+			return nil, errClosing(fd.isFile)
+		}
+		if obs&zxsocket.SignalIncoming != 0 {
+			continue
+		}
+		panic("unreachable")
+	}
+	return newS, err
+}
+
+// Seek wraps syscall.Seek.
+func (fd *FD) Seek(offset int64, whence int) (int64, error) {
+	if err := fd.incref(); err != nil {
+		return 0, err
+	}
+	defer fd.decref()
+	return syscall.Seek(fd.Sysfd, offset, whence)
+}
+
+// ReadDirent wraps syscall.ReadDirent.
+// We treat this like an ordinary system call rather than a call
+// that tries to fill the buffer.
+func (fd *FD) ReadDirent(buf []byte) (int, error) {
+	if err := fd.incref(); err != nil {
+		return 0, err
+	}
+	defer fd.decref()
+	return syscall.ReadDirent(fd.Sysfd, buf)
+}
+
+// Fchdir wraps syscall.Fchdir.
+func (fd *FD) Fchdir() error {
+	if err := fd.incref(); err != nil {
+		return err
+	}
+	defer fd.decref()
+	return syscall.Fchdir(fd.Sysfd)
+}
+
+// Fstat wraps syscall.Fstat
+func (fd *FD) Fstat(s *syscall.Stat_t) error {
+	if err := fd.incref(); err != nil {
+		return err
+	}
+	defer fd.decref()
+	return syscall.Fstat(fd.Sysfd, s)
+}
+
+func IsPollDescriptor(fd uintptr) bool {
+	return false
+}
+
+// RawRead invokes the user-defined function f for a read operation.
+func (fd *FD) RawRead(f func(uintptr) bool) error {
+	if err := fd.readLock(); err != nil {
+		return err
+	}
+	defer fd.readUnlock()
+	if err := fd.pd.prepareRead(fd.isFile); err != nil {
+		return err
+	}
+	for {
+		if f(uintptr(fd.Sysfd)) {
+			return nil
+		}
+		if err := fd.pd.waitRead(fd.isFile); err != nil {
+			return err
+		}
+	}
+}
+
+// RawWrite invokes the user-defined function f for a write operation.
+func (fd *FD) RawWrite(f func(uintptr) bool) error {
+	if err := fd.writeLock(); err != nil {
+		return err
+	}
+	defer fd.writeUnlock()
+	if err := fd.pd.prepareWrite(fd.isFile); err != nil {
+		return err
+	}
+	for {
+		if f(uintptr(fd.Sysfd)) {
+			return nil
+		}
+		if err := fd.pd.waitWrite(fd.isFile); err != nil {
+			return err
+		}
+	}
+}
+
+// SetBlocking puts the file into blocking mode.
+func (fd *FD) SetBlocking() error {
+	if err := fd.incref(); err != nil {
+		return err
+	}
+	defer fd.decref()
+	// Atomic store so that concurrent calls to SetBlocking
+	// do not cause a race condition. isBlocking only ever goes
+	// from 0 to 1 so there is no real race here.
+	atomic.StoreUint32(&fd.isBlocking, 1)
+	return syscall.SetNonblock(fd.Sysfd, false)
+}
diff --git a/src/internal/poll/fd_poll_fuchsia.go b/src/internal/poll/fd_poll_fuchsia.go
new file mode 100644
index 0000000..94188b7
--- /dev/null
+++ b/src/internal/poll/fd_poll_fuchsia.go
@@ -0,0 +1,75 @@
+// Copyright 2013 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.
+
+// TODO: use fd_poll_runtime.go for fuchsia
+
+package poll
+
+import (
+	"time"
+)
+
+type pollDesc struct {
+	fd      *FD
+	closing bool
+}
+
+func (pd *pollDesc) init(fd *FD) error { pd.fd = fd; return nil }
+
+func (pd *pollDesc) close() {}
+
+func (pd *pollDesc) evict() {
+	pd.closing = true
+}
+
+func (pd *pollDesc) prepare(mode int, isFile bool) error {
+	if pd.closing {
+		return errClosing(isFile)
+	}
+	return nil
+}
+
+func (pd *pollDesc) prepareRead(isFile bool) error { return pd.prepare('r', isFile) }
+
+func (pd *pollDesc) prepareWrite(isFile bool) error { return pd.prepare('w', isFile) }
+
+func (pd *pollDesc) wait(mode int, isFile bool) error {
+	if pd.closing {
+		return errClosing(isFile)
+	}
+	return ErrDeadlineExceeded
+}
+
+func (pd *pollDesc) waitRead(isFile bool) error { return pd.wait('r', isFile) }
+
+func (pd *pollDesc) waitWrite(isFile bool) error { return pd.wait('w', isFile) }
+
+func (pd *pollDesc) waitCanceled(mode int) {}
+
+func (pd *pollDesc) pollable() bool { return true }
+
+// SetDeadline sets the read and write deadlines associated with fd.
+func (fd *FD) SetDeadline(t time.Time) error {
+	return setDeadlineImpl(fd, t, 'r'+'w')
+}
+
+// SetReadDeadline sets the read deadline associated with fd.
+func (fd *FD) SetReadDeadline(t time.Time) error {
+	return setDeadlineImpl(fd, t, 'r')
+}
+
+// SetWriteDeadline sets the write deadline associated with fd.
+func (fd *FD) SetWriteDeadline(t time.Time) error {
+	return setDeadlineImpl(fd, t, 'w')
+}
+
+func setDeadlineImpl(fd *FD, t time.Time, mode int) error {
+	return ErrNoDeadline // TODO set deadline
+}
+
+// PollDescriptor returns the descriptor being used by the poller,
+// or ^uintptr(0) if there isn't one. This is only used for testing.
+func PollDescriptor() uintptr {
+	return ^uintptr(0)
+}
diff --git a/src/internal/poll/fd_posix.go b/src/internal/poll/fd_posix.go
index 54747b4..001a064 100644
--- a/src/internal/poll/fd_posix.go
+++ b/src/internal/poll/fd_posix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris windows
+// +build aix darwin dragonfly freebsd fuchsia js,wasm linux netbsd openbsd solaris windows
 
 package poll
 
diff --git a/src/internal/syscall/unix/nonblocking_fuchsia.go b/src/internal/syscall/unix/nonblocking_fuchsia.go
new file mode 100644
index 0000000..ff67c75
--- /dev/null
+++ b/src/internal/syscall/unix/nonblocking_fuchsia.go
@@ -0,0 +1,9 @@
+// Copyright 2018 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 unix
+
+func IsNonblock(fd int) (nonblocking bool, err error) {
+	return false, nil
+}
diff --git a/src/internal/testenv/testenv.go b/src/internal/testenv/testenv.go
index 309b270..dbd184f 100644
--- a/src/internal/testenv/testenv.go
+++ b/src/internal/testenv/testenv.go
@@ -43,7 +43,7 @@
 		return false
 	}
 	switch runtime.GOOS {
-	case "android", "js":
+	case "android", "fuchsia", "js":
 		return false
 	case "darwin":
 		if runtime.GOARCH == "arm64" {
@@ -173,14 +173,14 @@
 // HasExternalNetwork reports whether the current system can use
 // external (non-localhost) networks.
 func HasExternalNetwork() bool {
-	return !testing.Short() && runtime.GOOS != "js"
+	return !testing.Short() && runtime.GOOS != "js" && runtime.GOOS != "fuchsia"
 }
 
 // MustHaveExternalNetwork checks that the current system can use
 // external (non-localhost) networks.
 // If not, MustHaveExternalNetwork calls t.Skip with an explanation.
 func MustHaveExternalNetwork(t testing.TB) {
-	if runtime.GOOS == "js" {
+	if runtime.GOOS == "js" || runtime.GOOS == "fuchsia" {
 		t.Skipf("skipping test: no external network on %s", runtime.GOOS)
 	}
 	if testing.Short() {
diff --git a/src/internal/testenv/testenv_notwin.go b/src/internal/testenv/testenv_notwin.go
index ccb5d55..443c058 100644
--- a/src/internal/testenv/testenv_notwin.go
+++ b/src/internal/testenv/testenv_notwin.go
@@ -12,7 +12,7 @@
 
 func hasSymlink() (ok bool, reason string) {
 	switch runtime.GOOS {
-	case "android", "plan9":
+	case "android", "fuchsia", "plan9":
 		return false, ""
 	}
 
diff --git a/src/io/io_fuchsia.go b/src/io/io_fuchsia.go
new file mode 100644
index 0000000..ac81e67
--- /dev/null
+++ b/src/io/io_fuchsia.go
@@ -0,0 +1,15 @@
+// Copyright 2016 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.
+
+// +build fuchsia
+
+package io
+
+import (
+	"syscall/zx"
+)
+
+func init() {
+	zx.EOF = EOF
+}
diff --git a/src/mime/type_fuchsia.go b/src/mime/type_fuchsia.go
new file mode 100644
index 0000000..986c0bb
--- /dev/null
+++ b/src/mime/type_fuchsia.go
@@ -0,0 +1,15 @@
+// Copyright 2017 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.
+
+// +build fuchsia
+
+package mime
+
+func init() {
+	osInitMime = initMimeFuchsia
+}
+
+func initMimeFuchsia() {
+	// TODO: find an equivalent to /etc/mime.types.
+}
diff --git a/src/net/addrselect.go b/src/net/addrselect.go
index 7c0dfe2..3e7091e 100644
--- a/src/net/addrselect.go
+++ b/src/net/addrselect.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd fuchsia linux netbsd openbsd solaris
 
 // Minimal RFC 6724 address selection.
 
diff --git a/src/net/cgo_stub.go b/src/net/cgo_stub.go
index 041f8af..5f19ef4 100644
--- a/src/net/cgo_stub.go
+++ b/src/net/cgo_stub.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build !cgo netgo
+// +build !cgo netgo fuchsia
 
 package net
 
diff --git a/src/net/conf.go b/src/net/conf.go
index 971b1a3..e4c2c8e 100644
--- a/src/net/conf.go
+++ b/src/net/conf.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd fuchsia linux netbsd openbsd solaris
 
 package net
 
diff --git a/src/net/dial_test.go b/src/net/dial_test.go
index 0158248..d1ebf95 100644
--- a/src/net/dial_test.go
+++ b/src/net/dial_test.go
@@ -435,10 +435,17 @@
 	}
 }
 
+func requireSetDeadline(t *testing.T) {
+	if runtime.GOOS == "fuchsia" {
+		t.Skip("fuchsia does not yet implement deadlines")
+	}
+}
+
 func TestDialParallelSpuriousConnection(t *testing.T) {
 	if !supportsIPv4() || !supportsIPv6() {
 		t.Skip("both IPv4 and IPv6 are required")
 	}
+	requireSetDeadline(t)
 
 	var readDeadline time.Time
 	if td, ok := t.Deadline(); ok {
@@ -836,6 +843,7 @@
 }
 
 func TestCancelAfterDial(t *testing.T) {
+	requireSetDeadline(t)
 	if testing.Short() {
 		t.Skip("avoiding time.Sleep")
 	}
diff --git a/src/net/dnsclient_unix.go b/src/net/dnsclient_unix.go
index 8dd32cc..b94f9c1 100644
--- a/src/net/dnsclient_unix.go
+++ b/src/net/dnsclient_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd fuchsia linux netbsd openbsd solaris
 
 // DNS client: see RFC 1035.
 // Has to be linked into package net for Dial.
diff --git a/src/net/dnsconfig_fuchsia.go b/src/net/dnsconfig_fuchsia.go
new file mode 100644
index 0000000..9d4ca46
--- /dev/null
+++ b/src/net/dnsconfig_fuchsia.go
@@ -0,0 +1,11 @@
+// Copyright 2017 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.
+
+// TODO: replace with fuchsia.net.NameLookup.
+
+package net
+
+func init() {
+	defaultNS = []string{"8.8.8.8:53"}
+}
diff --git a/src/net/dnsconfig_unix.go b/src/net/dnsconfig_unix.go
index 877e77c..40c10c1 100644
--- a/src/net/dnsconfig_unix.go
+++ b/src/net/dnsconfig_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd fuchsia linux netbsd openbsd solaris
 
 // Read system DNS config from /etc/resolv.conf
 
diff --git a/src/net/error_fuchsia.go b/src/net/error_fuchsia.go
new file mode 100644
index 0000000..caad133
--- /dev/null
+++ b/src/net/error_fuchsia.go
@@ -0,0 +1,9 @@
+// Copyright 2018 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 net
+
+func isConnError(err error) bool {
+	return false
+}
diff --git a/src/net/error_fuchsia_test.go b/src/net/error_fuchsia_test.go
new file mode 100644
index 0000000..2ab6ff6
--- /dev/null
+++ b/src/net/error_fuchsia_test.go
@@ -0,0 +1,35 @@
+// Copyright 2018 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.
+
+// +build fuchsia !plan9,!windows,!unix
+
+package net
+
+import (
+	"os"
+	"syscall"
+	"syscall/zx"
+)
+
+var (
+	errTimedout       = syscall.ETIMEDOUT
+	errOpNotSupported = syscall.EOPNOTSUPP
+
+	abortedConnRequestErrors = []error{syscall.ECONNABORTED} // see accept in fd_unix.go
+)
+
+func isPlatformError(err error) bool {
+	_, ok := err.(*zx.Error)
+	return ok
+}
+
+func samePlatformError(err, want error) bool {
+	if op, ok := err.(*OpError); ok {
+		err = op.Err
+	}
+	if sys, ok := err.(*os.SyscallError); ok {
+		err = sys.Err
+	}
+	return err == want
+}
diff --git a/src/net/error_posix.go b/src/net/error_posix.go
index d709a27..a90f6ae 100644
--- a/src/net/error_posix.go
+++ b/src/net/error_posix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris windows
+// +build aix darwin dragonfly freebsd fuchsia js,wasm linux netbsd openbsd solaris windows
 
 package net
 
diff --git a/src/net/error_posix_test.go b/src/net/error_posix_test.go
index b411a37..78ed19c 100644
--- a/src/net/error_posix_test.go
+++ b/src/net/error_posix_test.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build !plan9
+// +build !fuchsia,!plan9
 
 package net
 
diff --git a/src/net/error_test.go b/src/net/error_test.go
index 8d4a7ff..8e194e0 100644
--- a/src/net/error_test.go
+++ b/src/net/error_test.go
@@ -138,6 +138,8 @@
 
 func TestDialError(t *testing.T) {
 	switch runtime.GOOS {
+	case "fuchsia":
+		t.Skip("fuchsia does not comply; uses EFUCHSIA")
 	case "plan9":
 		t.Skipf("%s does not have full support of socktest", runtime.GOOS)
 	}
@@ -185,6 +187,8 @@
 
 func TestProtocolDialError(t *testing.T) {
 	switch runtime.GOOS {
+	case "fuchsia":
+		t.Skip("fuchsia does not comply; uses EFUCHSIA")
 	case "solaris", "illumos":
 		t.Skipf("not supported on %s", runtime.GOOS)
 	}
@@ -287,6 +291,8 @@
 
 func TestListenError(t *testing.T) {
 	switch runtime.GOOS {
+	case "fuchsia":
+		t.Skip("fuchsia does not comply; uses EFUCHSIA")
 	case "plan9":
 		t.Skipf("%s does not have full support of socktest", runtime.GOOS)
 	}
@@ -376,6 +382,8 @@
 
 func TestProtocolListenError(t *testing.T) {
 	switch runtime.GOOS {
+	case "fuchsia":
+		t.Skip("fuchsia does not comply; uses EFUCHSIA")
 	case "plan9":
 		t.Skipf("not supported on %s", runtime.GOOS)
 	}
@@ -548,6 +556,9 @@
 }
 
 func TestCloseError(t *testing.T) {
+	if runtime.GOOS == "fuchsia" {
+		t.Skip("fuchsia does not comply; uses EFUCHSIA")
+	}
 	ln, err := newLocalListener("tcp")
 	if err != nil {
 		t.Fatal(err)
@@ -720,6 +731,8 @@
 
 func TestFileError(t *testing.T) {
 	switch runtime.GOOS {
+	case "fuchsia":
+		t.Skip("fuchsia does not comply; uses EFUCHSIA")
 	case "windows":
 		t.Skipf("not supported on %s", runtime.GOOS)
 	}
diff --git a/src/net/error_unix_test.go b/src/net/error_unix_test.go
index 9ce9e12..8fcd1ee 100644
--- a/src/net/error_unix_test.go
+++ b/src/net/error_unix_test.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build !plan9,!windows
+// +build !fuchsia,!plan9,!windows
 
 package net
 
diff --git a/src/net/fd_fuchsia.go b/src/net/fd_fuchsia.go
new file mode 100644
index 0000000..6018f75
--- /dev/null
+++ b/src/net/fd_fuchsia.go
@@ -0,0 +1,198 @@
+// Copyright 2016 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.
+
+//+build fuchsia
+
+// TODO: move to using fd_unix for fuchsia?
+
+package net
+
+import (
+	"errors"
+	"fmt"
+	"internal/poll"
+	"os"
+	"runtime"
+	"syscall"
+	"syscall/zx/net"
+	"syscall/zx/posix/socket"
+	"syscall/zx/zxsocket"
+	"time"
+)
+
+// Network file descriptor.
+type netFD struct {
+	pfd poll.FD
+
+	// immutable until Close
+	sock        zxsocket.Socket
+	net         string
+	family      int
+	isConnected bool
+	laddr       Addr
+	raddr       Addr
+}
+
+func domainToFamily(domain socket.Domain) int {
+	switch domain {
+	case socket.DomainIpv4:
+		return syscall.AF_INET
+	case socket.DomainIpv6:
+		return syscall.AF_INET6
+	default:
+		panic(fmt.Sprintf("unrecognized socket domain %s(%d)", domain, domain))
+	}
+}
+
+func familyToDomain(family int) socket.Domain {
+	switch family {
+	case syscall.AF_INET:
+		return socket.DomainIpv4
+	case syscall.AF_INET6:
+		return socket.DomainIpv6
+	default:
+		panic(fmt.Sprintf("unrecognized socket family %d", family))
+	}
+}
+
+func newFD(sock zxsocket.Socket, domain socket.Domain, net string) *netFD {
+	return &netFD{
+		pfd: poll.FD{
+			Sysfd: syscall.OpenFDIO(sock),
+		},
+		sock:   sock,
+		family: domainToFamily(domain),
+		net:    net,
+	}
+}
+
+func (fd *netFD) init() error {
+	// TODO: flip to true after implementing netpoller for real
+	return fd.pfd.Init(fd.net, false)
+}
+
+func (fd *netFD) isTCP() bool {
+	return len(fd.net) >= 3 && fd.net[:3] == "tcp"
+}
+
+func (fd *netFD) Read(b []byte) (n int, err error) {
+	n, err = fd.pfd.Read(b)
+	runtime.KeepAlive(fd)
+	return n, err
+}
+
+func (fd *netFD) Write(b []byte) (n int, err error) {
+	n, err = fd.pfd.Write(b)
+	runtime.KeepAlive(fd)
+	return n, err
+}
+
+func (fd *netFD) readMsg(b []byte) (n, flags int, addr net.SocketAddress, err error) {
+	// TODO: move call to pfd
+	data, addr, err := fd.sock.(*zxsocket.DatagramSocket).RecvMsg(len(b))
+	runtime.KeepAlive(fd)
+	n = copy(b, data)
+	return n, 0, addr, err
+}
+
+func (fd *netFD) sendMsg(b []byte, addr net.SocketAddress) (n int, err error) {
+	// TODO: move call to pfd
+	n, err = fd.sock.(*zxsocket.DatagramSocket).SendMsg(b, addr)
+	runtime.KeepAlive(fd)
+	return n, err
+}
+
+func (fd *netFD) closeRead() error {
+	return errors.New("net: closeRead not implemented on fuchsia")
+}
+
+func (fd *netFD) closeWrite() error {
+	return errors.New("net: closeWrite not implemented on fuchsia")
+}
+
+func (fd *netFD) Close() error {
+	return fd.pfd.Close()
+}
+
+func (fd *netFD) dup() (*os.File, error) {
+	fdio, err := fd.sock.Clone()
+	if err != nil {
+		return nil, err
+	}
+	return os.NewFile(uintptr(syscall.OpenFDIO(fdio)), fd.name()), nil
+}
+
+func (fd *netFD) accept() (*netFD, error) {
+	newm, err := fd.pfd.Accept()
+	if err != nil {
+		return nil, err
+	}
+	netfd := newFD(newm, familyToDomain(fd.family), fd.net)
+	if err := netfd.init(); err != nil {
+		fd.Close()
+		return nil, err
+	}
+	netfd.setAddr()
+	return netfd, nil
+}
+
+func socketAddrToIpPort(addr net.SocketAddress) (IP, int) {
+	switch addr.Which() {
+	case net.SocketAddressIpv4:
+		return addr.Ipv4.Address.Addr[:], int(addr.Ipv4.Port)
+	case net.SocketAddressIpv6:
+		return addr.Ipv6.Address.Addr[:], int(addr.Ipv6.Port)
+	default:
+		panic(fmt.Sprintf("unrecognized SocketAddress variant %d", addr.Which()))
+	}
+}
+
+func (fd *netFD) asAddr(addr net.SocketAddress, err error) sockaddr {
+	if err != nil {
+		return nil
+	}
+
+	ip, port := socketAddrToIpPort(addr)
+	if isZeros(ip) && port == 0 {
+		return nil
+	}
+
+	switch fd.sock.(type) {
+	case *zxsocket.DatagramSocket:
+		return &UDPAddr{IP: ip, Port: port}
+	case *zxsocket.StreamSocket:
+		return &TCPAddr{IP: ip, Port: port}
+	default:
+		panic(fmt.Sprintf("unrecognized socket type %T", fd.sock))
+	}
+}
+
+func (fd *netFD) setAddr() {
+	fd.laddr = fd.asAddr(fd.sock.GetSockName())
+	fd.raddr = fd.asAddr(fd.sock.GetPeerName())
+	runtime.SetFinalizer(fd, (*netFD).Close)
+}
+
+func (fd *netFD) name() string {
+	var ls, rs string
+	if fd.laddr != nil {
+		ls = fd.laddr.String()
+	}
+	if fd.raddr != nil {
+		rs = fd.raddr.String()
+	}
+	return fd.net + ":" + ls + "->" + rs
+}
+
+func (fd *netFD) SetDeadline(t time.Time) error {
+	return fd.pfd.SetDeadline(t)
+}
+
+func (fd *netFD) SetReadDeadline(t time.Time) error {
+	return fd.pfd.SetReadDeadline(t)
+}
+
+func (fd *netFD) SetWriteDeadline(t time.Time) error {
+	return fd.pfd.SetWriteDeadline(t)
+}
diff --git a/src/net/file_stub.go b/src/net/file_stub.go
index bfb8100..466ef27 100644
--- a/src/net/file_stub.go
+++ b/src/net/file_stub.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build js,wasm
+// +build fuchsia js,wasm
 
 package net
 
diff --git a/src/net/file_test.go b/src/net/file_test.go
index 8c09c0d..34537ac 100644
--- a/src/net/file_test.go
+++ b/src/net/file_test.go
@@ -31,7 +31,7 @@
 
 func TestFileConn(t *testing.T) {
 	switch runtime.GOOS {
-	case "plan9", "windows":
+	case "fuchsia", "plan9", "windows":
 		t.Skipf("not supported on %s", runtime.GOOS)
 	}
 
@@ -138,7 +138,7 @@
 
 func TestFileListener(t *testing.T) {
 	switch runtime.GOOS {
-	case "plan9", "windows":
+	case "fuchsia", "plan9", "windows":
 		t.Skipf("not supported on %s", runtime.GOOS)
 	}
 
@@ -230,7 +230,7 @@
 
 func TestFilePacketConn(t *testing.T) {
 	switch runtime.GOOS {
-	case "plan9", "windows":
+	case "fuchsia", "plan9", "windows":
 		t.Skipf("not supported on %s", runtime.GOOS)
 	}
 
@@ -297,7 +297,7 @@
 // Issue 24483.
 func TestFileCloseRace(t *testing.T) {
 	switch runtime.GOOS {
-	case "plan9", "windows":
+	case "fuchsia", "plan9", "windows":
 		t.Skipf("not supported on %s", runtime.GOOS)
 	}
 	if !testableNetwork("tcp") {
diff --git a/src/net/hook_fuchsia.go b/src/net/hook_fuchsia.go
new file mode 100644
index 0000000..e445c1a
--- /dev/null
+++ b/src/net/hook_fuchsia.go
@@ -0,0 +1,17 @@
+// Copyright 2017 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.
+
+// +build fuchsia
+
+package net
+
+import "syscall"
+
+var (
+	testHookDialChannel  = func() {} // for golang.org/issue/5349
+	testHookCanceledDial = func() {} // for golang.org/issue/16523
+
+	// Placeholders for socket system calls.
+	closeFunc func(int) error = syscall.Close
+)
diff --git a/src/net/hosts_test.go b/src/net/hosts_test.go
index f850e2f..eaefd32 100644
--- a/src/net/hosts_test.go
+++ b/src/net/hosts_test.go
@@ -6,6 +6,7 @@
 
 import (
 	"reflect"
+	"runtime"
 	"strings"
 	"testing"
 )
@@ -58,7 +59,14 @@
 	},
 }
 
+func requireTestData(t *testing.T) {
+	if runtime.GOOS == "fuchsia" {
+		t.Skip("fuchsia cannot expose testdata; directories can't be resources")
+	}
+}
+
 func TestLookupStaticHost(t *testing.T) {
+	requireTestData(t)
 	defer func(orig string) { testHookHostsPath = orig }(testHookHostsPath)
 
 	for _, tt := range lookupStaticHostTests {
@@ -128,6 +136,7 @@
 }
 
 func TestLookupStaticAddr(t *testing.T) {
+	requireTestData(t)
 	defer func(orig string) { testHookHostsPath = orig }(testHookHostsPath)
 
 	for _, tt := range lookupStaticAddrTests {
@@ -149,6 +158,7 @@
 }
 
 func TestHostCacheModification(t *testing.T) {
+	requireTestData(t)
 	// Ensure that programs can't modify the internals of the host cache.
 	// See https://golang.org/issues/14212.
 	defer func(orig string) { testHookHostsPath = orig }(testHookHostsPath)
diff --git a/src/net/interface_fuchsia.go b/src/net/interface_fuchsia.go
new file mode 100644
index 0000000..5862afce
--- /dev/null
+++ b/src/net/interface_fuchsia.go
@@ -0,0 +1,76 @@
+// 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.
+
+// +build fuchsia
+
+package net
+
+import (
+	"context"
+	"sync"
+	"syscall/zx"
+	"syscall/zx/fdio"
+	"syscall/zx/net/stack"
+)
+
+var stackHandle struct {
+	mu struct {
+		sync.Mutex
+		h zx.Handle
+	}
+}
+
+func stackClient() (stack.StackWithCtxInterface, error) {
+	stackHandle.mu.Lock()
+	defer stackHandle.mu.Unlock()
+
+	if stackHandle.mu.h == zx.HandleInvalid {
+		local, remote, err := zx.NewChannel(0)
+		if err != nil {
+			return stack.StackWithCtxInterface{}, err
+		}
+		if err := fdio.ServiceConnect("/svc/"+stack.StackName, zx.Handle(remote)); err != nil {
+			return stack.StackWithCtxInterface{}, err
+		}
+		stackHandle.mu.h = zx.Handle(local)
+	}
+	return stack.StackWithCtxInterface{Channel: zx.Channel(stackHandle.mu.h)}, nil
+}
+
+// If the ifindex is zero, interfaceTable returns mappings of all
+// network interfaces. Otherwise it returns a mapping of a specific interface.
+func interfaceTable(ifindex int) ([]Interface, error) {
+	c, err := stackClient()
+	if err != nil {
+		return nil, err
+	}
+	ifInfos, err := c.ListInterfaces(context.Background())
+	if err != nil {
+		return nil, err
+	}
+	ifs := make([]Interface, 0, len(ifInfos))
+	for _, info := range ifInfos {
+		ifs = append(ifs, Interface{
+			// TODO(jayzhuang): fill `Flags` when they are all available in stack.InterfaceInfo.
+			Index:        int(info.Id),
+			MTU:          int(info.Properties.Mtu),
+			Name:         info.Properties.Name,
+			HardwareAddr: info.Properties.Mac.Octets[:],
+		})
+	}
+	return ifs, nil
+}
+
+// If the ifi is nil, interfaceAddrTable returns addresses for all
+// network interfaces. Otherwise it returns addresses for a specific interface.
+func interfaceAddrTable(ifi *Interface) ([]Addr, error) {
+	// TODO(44532): implement
+	return nil, nil
+}
+
+// interfaceMulticastAddrTable returns addresses for a specific interface.
+func interfaceMulticastAddrTable(ifi *Interface) ([]Addr, error) {
+	// TODO(44532): implement
+	return nil, nil
+}
diff --git a/src/net/internal/socktest/switch_posix.go b/src/net/internal/socktest/switch_posix.go
index 863edef..708025e 100644
--- a/src/net/internal/socktest/switch_posix.go
+++ b/src/net/internal/socktest/switch_posix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build !plan9
+// +build !fuchsia,!plan9
 
 package socktest
 
diff --git a/src/net/internal/socktest/switch_stub.go b/src/net/internal/socktest/switch_stub.go
index 28ce72c..382b73b 100644
--- a/src/net/internal/socktest/switch_stub.go
+++ b/src/net/internal/socktest/switch_stub.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build plan9
+// +build fuchsia plan9
 
 package socktest
 
diff --git a/src/net/ip_test.go b/src/net/ip_test.go
index a5fc5e6..2076a56 100644
--- a/src/net/ip_test.go
+++ b/src/net/ip_test.go
@@ -61,6 +61,7 @@
 }
 
 func TestLookupWithIP(t *testing.T) {
+	requireSetDeadline(t)
 	_, err := LookupIP("")
 	if err == nil {
 		t.Errorf(`LookupIP("") succeeded, should fail`)
diff --git a/src/net/iprawsock_fuchsia.go b/src/net/iprawsock_fuchsia.go
new file mode 100644
index 0000000..0bfd133
--- /dev/null
+++ b/src/net/iprawsock_fuchsia.go
@@ -0,0 +1,34 @@
+// Copyright 2016 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 net
+
+import (
+	"context"
+	"syscall"
+)
+
+func (c *IPConn) readFrom(b []byte) (int, *IPAddr, error) {
+	return 0, nil, syscall.EFUCHSIA
+}
+
+func (c *IPConn) readMsg(b, oob []byte) (n, oobn, flags int, addr *IPAddr, err error) {
+	return 0, 0, 0, nil, syscall.EFUCHSIA
+}
+
+func (c *IPConn) writeTo(b []byte, addr *IPAddr) (int, error) {
+	return 0, syscall.EFUCHSIA
+}
+
+func (c *IPConn) writeMsg(b, oob []byte, addr *IPAddr) (n, oobn int, err error) {
+	return 0, 0, syscall.EFUCHSIA
+}
+
+func (sd *sysDialer) dialIP(ctx context.Context, laddr, raddr *IPAddr) (*IPConn, error) {
+	return nil, syscall.EFUCHSIA
+}
+
+func (sl *sysListener) listenIP(ctx context.Context, laddr *IPAddr) (*IPConn, error) {
+	return nil, syscall.EFUCHSIA
+}
diff --git a/src/net/ipsock_fuchsia.go b/src/net/ipsock_fuchsia.go
new file mode 100644
index 0000000..38bf15f
--- /dev/null
+++ b/src/net/ipsock_fuchsia.go
@@ -0,0 +1,226 @@
+// Copyright 2016 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.
+
+//+build fuchsia
+
+package net
+
+import (
+	"context"
+	"fmt"
+	"sync"
+	"syscall"
+	"syscall/zx"
+	"syscall/zx/fdio"
+	"syscall/zx/net"
+	"syscall/zx/posix/socket"
+	"syscall/zx/zxsocket"
+)
+
+func (p *ipStackCapabilities) probe() {
+	p.ipv4Enabled = true
+	p.ipv6Enabled = true
+	p.ipv4MappedIPv6Enabled = true
+}
+
+// A sockaddr represents a TCP, UDP, IP or Unix network endpoint
+// address that can be converted into an fdio sockaddr message.
+type sockaddr interface {
+	Addr
+
+	family() int
+	domain() socket.Domain
+	isWildcard() bool
+	sockaddr(domain socket.Domain) (addr net.SocketAddress, err error)
+}
+
+func favoriteAddrDomain(net string, laddr, raddr sockaddr, mode string) socket.Domain {
+	switch net[len(net)-1] {
+	case '4':
+		return socket.DomainIpv4
+	case '6':
+		return socket.DomainIpv6
+	}
+
+	if mode == "listen" && (laddr == nil || laddr.isWildcard()) {
+		if supportsIPv4map() || !supportsIPv4() {
+			return socket.DomainIpv6
+		}
+		if laddr == nil {
+			return socket.DomainIpv4
+		}
+		return laddr.domain()
+	}
+
+	if (laddr == nil || laddr.domain() == socket.DomainIpv4) &&
+		(raddr == nil || raddr.domain() == socket.DomainIpv4) {
+		return socket.DomainIpv4
+	}
+	return socket.DomainIpv6
+}
+
+var socketProvider struct {
+	once     sync.Once
+	provider socket.ProviderWithCtxInterface
+	err      error
+}
+
+func getProvider() (*socket.ProviderWithCtxInterface, error) {
+	socketProvider.once.Do(func() {
+		socketProvider.err = func() error {
+			c0, c1, err := zx.NewChannel(0)
+			if err != nil {
+				return err
+			}
+			if err := fdio.ServiceConnect("/svc/"+socket.ProviderName, zx.Handle(c0)); err != nil {
+				_ = c1.Close()
+				return err
+			}
+			socketProvider.provider.Channel = c1
+			return nil
+		}()
+	})
+	return &socketProvider.provider, socketProvider.err
+}
+
+func dialFuchsia(_ context.Context, netName string, laddr, raddr sockaddr) (*netFD, error) {
+	domain := favoriteAddrDomain(netName, laddr, raddr, "dial")
+
+	provider, err := getProvider()
+	if err != nil {
+		return nil, err
+	}
+
+	var base *socket.BaseSocketWithCtxInterface
+	if stringsHasPrefix(netName, "udp") {
+		result, err := provider.DatagramSocket(context.Background(), domain, socket.DatagramSocketProtocolUdp)
+		if err != nil {
+			return nil, err
+		}
+		switch result.Which() {
+		case socket.ProviderDatagramSocketResultErr:
+			return nil, syscall.Errno(result.Err)
+		case socket.ProviderDatagramSocketResultResponse:
+			base = &socket.BaseSocketWithCtxInterface{Channel: result.Response.S.Channel}
+		default:
+			panic(fmt.Sprintf("unrecognized fuchsia.posix.socket/Provider.DatagramSocket result %d", result.Which()))
+		}
+	} else {
+		result, err := provider.StreamSocket(context.Background(), domain, socket.StreamSocketProtocolTcp)
+		if err != nil {
+			return nil, err
+		}
+		switch result.Which() {
+		case socket.ProviderStreamSocketResultErr:
+			return nil, syscall.Errno(result.Err)
+		case socket.ProviderStreamSocketResultResponse:
+			base = &socket.BaseSocketWithCtxInterface{Channel: result.Response.S.Channel}
+		default:
+			panic(fmt.Sprintf("unrecognized fuchsia.posix.socket/Provider.StreamSocket result %d", result.Which()))
+		}
+	}
+
+	sock, err := zxsocket.NewSocket(base)
+	if err != nil {
+		return nil, err
+	}
+	fd := newFD(sock, domain, netName)
+	if laddr != nil {
+		addr, err := laddr.sockaddr(domain)
+		if err != nil {
+			return nil, err
+		}
+		var port uint16
+		isSet := false
+		switch addr.Which() {
+		case net.SocketAddressIpv4:
+			port = addr.Ipv4.Port
+			isSet = true
+		case net.SocketAddressIpv6:
+			port = addr.Ipv6.Port
+			isSet = true
+		}
+		if isSet || port != 0 {
+			if err := fd.sock.Bind(addr); err != nil {
+				return nil, err
+			}
+		}
+		if raddr == nil {
+			switch s := fd.sock.(type) {
+			case *zxsocket.DatagramSocket:
+			case *zxsocket.StreamSocket:
+				if err := s.Listen(int16(listenerBacklog())); err != nil {
+					return nil, err
+				}
+			default:
+				panic(fmt.Sprintf("unrecognized socket type %T", fd.sock))
+			}
+		}
+	}
+	if raddr != nil {
+		addr, err := raddr.sockaddr(domain)
+		if err != nil {
+			return nil, err
+		}
+		for i := 0; i < 2; i++ {
+			err = fd.sock.Connect(addr)
+			if sock, ok := fd.sock.(*zxsocket.StreamSocket); ok && err == syscall.EINPROGRESS {
+				obs, err := sock.Wait(zxsocket.SignalOutgoing|zx.SignalSocketPeerClosed, zx.TimensecInfinite)
+				if err != nil {
+					return nil, err
+				}
+				switch {
+				case obs&zx.SignalSocketPeerClosed != 0:
+					return nil, &zx.Error{Status: zx.ErrPeerClosed, Text: "zxsocket"}
+				case obs&zxsocket.SignalOutgoing != 0:
+					// Call connect again to learn the result.
+					continue
+				default:
+					panic(fmt.Sprintf("unexpected observed signals %08X", obs))
+				}
+			}
+			break
+		}
+		if err != nil {
+			return nil, err
+		}
+		fd.isConnected = true
+	}
+	fd.setAddr()
+
+	return fd, nil
+}
+
+func ipToSockaddr(domain socket.Domain, ip IP, port int, zone_str string) (address net.SocketAddress, err error) {
+	switch domain {
+	case socket.DomainIpv4:
+		if len(ip) == 0 {
+			ip = IPv4zero
+		}
+		ip4 := ip.To4()
+		if ip4 == nil {
+			return net.SocketAddress{}, &AddrError{Err: "non-IPv4 address", Addr: ip.String()}
+		}
+		addr := net.SocketAddressWithIpv4(net.Ipv4SocketAddress{
+			Port: uint16(port),
+		})
+		copy(addr.Ipv4.Address.Addr[:], ip4)
+		return addr, nil
+	case socket.DomainIpv6:
+		if len(ip) == 0 || ip.Equal(IPv4zero) {
+			ip = IPv6zero
+		}
+		ip6 := ip.To16()
+		if ip6 == nil {
+			return net.SocketAddress{}, &AddrError{Err: "non-IPv6 address", Addr: ip.String()}
+		}
+		addr := net.SocketAddressWithIpv6(net.Ipv6SocketAddress{
+			Port:      uint16(port),
+			ZoneIndex: uint64(zoneCache.index(zone_str)),
+		})
+		copy(addr.Ipv6.Address.Addr[:], ip6)
+		return addr, nil
+	}
+	return net.SocketAddress{}, &AddrError{Err: "invalid address family", Addr: ip.String()}
+}
diff --git a/src/net/ipsock_fuchsia_test.go b/src/net/ipsock_fuchsia_test.go
new file mode 100644
index 0000000..5f5f486
--- /dev/null
+++ b/src/net/ipsock_fuchsia_test.go
@@ -0,0 +1,103 @@
+// Copyright 2019 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.
+
+// +build fuchsia
+
+package net
+
+import (
+	"syscall/zx/net"
+	"syscall/zx/posix/socket"
+	"testing"
+)
+
+func TestIPToSockaddr(t *testing.T) {
+	type inArgs struct {
+		domain socket.Domain
+		ip     IP
+		port   int
+		zone   string
+	}
+
+	type want struct {
+		addr net.SocketAddress
+		err  bool
+	}
+
+	makeIpv4 := func(addr [4]byte, port uint16) net.SocketAddress {
+		return net.SocketAddressWithIpv4(net.Ipv4SocketAddress{
+			Address: net.Ipv4Address{
+				Addr: addr,
+			},
+			Port: port,
+		})
+	}
+	makeIpv6 := func(addr [16]byte, port uint16, zone uint64) net.SocketAddress {
+		return net.SocketAddressWithIpv6(net.Ipv6SocketAddress{
+			Address: net.Ipv6Address{
+				Addr: addr,
+			},
+			Port:      port,
+			ZoneIndex: zone,
+		})
+	}
+
+	tests := []struct {
+		name string
+		in   inArgs
+		want want
+	}{
+		{
+			"v4 non-numeric string zone ignored",
+			inArgs{socket.DomainIpv4, ParseIP("1.2.3.4"), 6667, "zone"},
+			want{makeIpv4([4]byte{1, 2, 3, 4}, 6667), false},
+		},
+		{
+			"v4 numeric string zone ignored",
+			inArgs{socket.DomainIpv4, ParseIP("1.2.3.4"), 6697, "17"},
+			want{makeIpv4([4]byte{1, 2, 3, 4}, 6697), false},
+		},
+		{
+			"v4 invalid IP returns error",
+			inArgs{socket.DomainIpv4, IP([]byte{1}), 6697, ""},
+			want{net.SocketAddress{}, true},
+		},
+		{
+			"v6 with known non-numeric zone converted",
+			// This test runs in a sandbox with interface 'lo' on index 1.
+			inArgs{socket.DomainIpv6, ParseIP("fe80::1"), 443, "lo"},
+			want{makeIpv6([16]byte{0xfe, 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, 443, 1), false},
+		},
+		{
+			"v6 with unknown non-numeric zone ignored",
+			inArgs{socket.DomainIpv6, ParseIP("fe80::1"), 443, "unknownif"},
+			want{makeIpv6([16]byte{0xfe, 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, 443, 0), false},
+		},
+		{
+			"v6 with numeric zone handled properly",
+			inArgs{socket.DomainIpv6, ParseIP("fe80::1"), 80, "42"},
+			want{makeIpv6([16]byte{0xfe, 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, 80, 42), false},
+		},
+		{
+			"v6 invalid IP returns error",
+			inArgs{socket.DomainIpv6, IP([]byte{1}), 1, ""},
+			want{net.SocketAddress{}, true},
+		},
+	}
+
+	for _, test := range tests {
+		addr, err := ipToSockaddr(test.in.domain, test.in.ip, test.in.port, test.in.zone)
+		if test.want.err && err == nil {
+			t.Errorf("test %q returned no error, but an error was expected", test.name)
+			continue
+		} else if !test.want.err && err != nil {
+			t.Errorf("test %q got error %v; no error was expected", test.name, err)
+			continue
+		}
+
+		if addr != test.want.addr {
+			t.Errorf("test %q got addr %v, wanted %v", test.name, addr, test.want.addr)
+		}
+	}
+}
diff --git a/src/net/lookup_unix.go b/src/net/lookup_unix.go
index 9055826..050d487 100644
--- a/src/net/lookup_unix.go
+++ b/src/net/lookup_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd fuchsia linux netbsd openbsd solaris
 
 package net
 
@@ -10,7 +10,6 @@
 	"context"
 	"internal/bytealg"
 	"sync"
-	"syscall"
 
 	"golang.org/x/net/dns/dnsmessage"
 )
@@ -327,27 +326,3 @@
 	}
 	return r.goLookupPTR(ctx, addr)
 }
-
-// concurrentThreadsLimit returns the number of threads we permit to
-// run concurrently doing DNS lookups via cgo. A DNS lookup may use a
-// file descriptor so we limit this to less than the number of
-// permitted open files. On some systems, notably Darwin, if
-// getaddrinfo is unable to open a file descriptor it simply returns
-// EAI_NONAME rather than a useful error. Limiting the number of
-// concurrent getaddrinfo calls to less than the permitted number of
-// file descriptors makes that error less likely. We don't bother to
-// apply the same limit to DNS lookups run directly from Go, because
-// there we will return a meaningful "too many open files" error.
-func concurrentThreadsLimit() int {
-	var rlim syscall.Rlimit
-	if err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, &rlim); err != nil {
-		return 500
-	}
-	r := int(rlim.Cur)
-	if r > 500 {
-		r = 500
-	} else if r > 30 {
-		r -= 30
-	}
-	return r
-}
diff --git a/src/net/main_fuchsia_test.go b/src/net/main_fuchsia_test.go
new file mode 100644
index 0000000..b266361
--- /dev/null
+++ b/src/net/main_fuchsia_test.go
@@ -0,0 +1,20 @@
+// Copyright 2017 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.
+
+// +build fuchsia
+
+package net
+
+func installTestHooks() {
+}
+
+func uninstallTestHooks() {
+}
+
+// forceCloseSockets must be called only from TestMain.
+func forceCloseSockets() {
+	for s := range sw.Sockets() {
+		closeFunc(s)
+	}
+}
diff --git a/src/net/net_test.go b/src/net/net_test.go
index 409e140..1878248 100644
--- a/src/net/net_test.go
+++ b/src/net/net_test.go
@@ -20,7 +20,7 @@
 
 func TestCloseRead(t *testing.T) {
 	switch runtime.GOOS {
-	case "plan9":
+	case "fuchsia", "plan9":
 		t.Skipf("not supported on %s", runtime.GOOS)
 	}
 	t.Parallel()
@@ -76,7 +76,7 @@
 
 func TestCloseWrite(t *testing.T) {
 	switch runtime.GOOS {
-	case "plan9":
+	case "fuchsia", "plan9":
 		t.Skipf("not supported on %s", runtime.GOOS)
 	}
 
@@ -345,6 +345,8 @@
 // See golang.org/issue/6163, golang.org/issue/6987.
 func TestAcceptIgnoreAbortedConnRequest(t *testing.T) {
 	switch runtime.GOOS {
+	case "fuchsia":
+		t.Skip("hangs on fuchsia")
 	case "plan9":
 		t.Skipf("%s does not have full support of socktest", runtime.GOOS)
 	}
@@ -495,6 +497,7 @@
 // See golang.org/cl/30164 which documented this. The net/http package
 // depends on this.
 func TestReadTimeoutUnblocksRead(t *testing.T) {
+	requireSetDeadline(t)
 	serverDone := make(chan struct{})
 	server := func(cs *TCPConn) error {
 		defer close(serverDone)
@@ -538,6 +541,9 @@
 
 // Issue 17695: verify that a blocked Read is woken up by a Close.
 func TestCloseUnblocksRead(t *testing.T) {
+	if runtime.GOOS == "fuchsia" {
+		t.Skip("hangs on fuchsia")
+	}
 	t.Parallel()
 	server := func(cs *TCPConn) error {
 		// Give the client time to get stuck in a Read:
@@ -563,6 +569,9 @@
 	if runtime.GOOS == "aix" {
 		testenv.SkipFlaky(t, 29685)
 	}
+	if runtime.GOOS == "fuchsia" {
+		t.Skip("hangs on fuchsia")
+	}
 	t.Parallel()
 	server := func(cs *TCPConn) error {
 		cs.SetLinger(0)
diff --git a/src/net/nss.go b/src/net/nss.go
index 96b9cdd..29caa46 100644
--- a/src/net/nss.go
+++ b/src/net/nss.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd fuchsia linux netbsd openbsd solaris
 
 package net
 
diff --git a/src/net/parse_test.go b/src/net/parse_test.go
index c5f8bfd..ffe4d12 100644
--- a/src/net/parse_test.go
+++ b/src/net/parse_test.go
@@ -14,7 +14,7 @@
 func TestReadLine(t *testing.T) {
 	// /etc/services file does not exist on android, plan9, windows.
 	switch runtime.GOOS {
-	case "android", "plan9", "windows":
+	case "android", "plan9", "windows", "fuchsia":
 		t.Skipf("not supported on %s", runtime.GOOS)
 	}
 	filename := "/etc/services" // a nice big file
diff --git a/src/net/platform_test.go b/src/net/platform_test.go
index d3bb918..50516e3 100644
--- a/src/net/platform_test.go
+++ b/src/net/platform_test.go
@@ -39,7 +39,7 @@
 	case "ip+nopriv":
 	case "ip", "ip4", "ip6":
 		switch runtime.GOOS {
-		case "plan9":
+		case "fuchsia", "plan9":
 			return false
 		default:
 			if os.Getuid() != 0 {
@@ -48,7 +48,7 @@
 		}
 	case "unix", "unixgram":
 		switch runtime.GOOS {
-		case "android", "plan9", "windows":
+		case "android", "fuchsia", "plan9", "windows":
 			return false
 		case "aix":
 			return unixEnabledOnAIX
@@ -59,7 +59,7 @@
 		}
 	case "unixpacket":
 		switch runtime.GOOS {
-		case "aix", "android", "darwin", "plan9", "windows":
+		case "aix", "android", "darwin", "fuchsia", "plan9", "windows":
 			return false
 		case "netbsd":
 			// It passes on amd64 at least. 386 fails (Issue 22927). arm is unknown.
diff --git a/src/net/port_unix.go b/src/net/port_unix.go
index 4fdd9a3..31dc7fa 100644
--- a/src/net/port_unix.go
+++ b/src/net/port_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd fuchsia js,wasm linux netbsd openbsd solaris
 
 // Read system port mappings from /etc/services
 
diff --git a/src/net/protoconn_test.go b/src/net/protoconn_test.go
index 9f6772c..d7bc7c9 100644
--- a/src/net/protoconn_test.go
+++ b/src/net/protoconn_test.go
@@ -23,6 +23,7 @@
 //	golang.org/x/net/icmp
 
 func TestTCPListenerSpecificMethods(t *testing.T) {
+	requireSetDeadline(t)
 	switch runtime.GOOS {
 	case "plan9":
 		t.Skipf("not supported on %s", runtime.GOOS)
@@ -164,6 +165,9 @@
 }
 
 func TestIPConnSpecificMethods(t *testing.T) {
+	if runtime.GOOS == "fuchsia" {
+		t.Skip("iprawsock is unsupported on fuchsia")
+	}
 	if os.Getuid() != 0 {
 		t.Skip("must be root")
 	}
diff --git a/src/net/rawconn_stub_test.go b/src/net/rawconn_stub_test.go
index cec977f..4ee181e 100644
--- a/src/net/rawconn_stub_test.go
+++ b/src/net/rawconn_stub_test.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build js,wasm plan9
+// +build js,wasm plan9 fuchsia
 
 package net
 
diff --git a/src/net/rawconn_test.go b/src/net/rawconn_test.go
index a08ff89..ee6c204 100644
--- a/src/net/rawconn_test.go
+++ b/src/net/rawconn_test.go
@@ -15,7 +15,7 @@
 
 func TestRawConnReadWrite(t *testing.T) {
 	switch runtime.GOOS {
-	case "plan9":
+	case "fuchsia", "plan9":
 		t.Skipf("not supported on %s", runtime.GOOS)
 	}
 
@@ -175,7 +175,7 @@
 
 func TestRawConnControl(t *testing.T) {
 	switch runtime.GOOS {
-	case "plan9":
+	case "fuchsia", "plan9":
 		t.Skipf("not supported on %s", runtime.GOOS)
 	}
 
diff --git a/src/net/rlimit_fuchsia.go b/src/net/rlimit_fuchsia.go
new file mode 100644
index 0000000..7a5a113
--- /dev/null
+++ b/src/net/rlimit_fuchsia.go
@@ -0,0 +1,11 @@
+// Copyright 2011 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 net
+
+// concurrentThreadsLimit returns the number of threads we permit to
+// run concurrently doing DNS lookups via cgo.
+func concurrentThreadsLimit() int {
+	return 500
+}
diff --git a/src/net/rlimit_unix.go b/src/net/rlimit_unix.go
new file mode 100644
index 0000000..ff5902f
--- /dev/null
+++ b/src/net/rlimit_unix.go
@@ -0,0 +1,35 @@
+// Copyright 2011 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.
+
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+
+package net
+
+import (
+	"syscall"
+)
+
+// concurrentThreadsLimit returns the number of threads we permit to
+// run concurrently doing DNS lookups via cgo. A DNS lookup may use a
+// file descriptor so we limit this to less than the number of
+// permitted open files. On some systems, notably Darwin, if
+// getaddrinfo is unable to open a file descriptor it simply returns
+// EAI_NONAME rather than a useful error. Limiting the number of
+// concurrent getaddrinfo calls to less than the permitted number of
+// file descriptors makes that error less likely. We don't bother to
+// apply the same limit to DNS lookups run directly from Go, because
+// there we will return a meaningful "too many open files" error.
+func concurrentThreadsLimit() int {
+	var rlim syscall.Rlimit
+	if err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, &rlim); err != nil {
+		return 500
+	}
+	r := int(rlim.Cur)
+	if r > 500 {
+		r = 500
+	} else if r > 30 {
+		r -= 30
+	}
+	return r
+}
diff --git a/src/net/sendfile_test.go b/src/net/sendfile_test.go
index 13842a1..f115962 100644
--- a/src/net/sendfile_test.go
+++ b/src/net/sendfile_test.go
@@ -27,6 +27,9 @@
 )
 
 func TestSendfile(t *testing.T) {
+	if runtime.GOOS == "fuchsia" {
+		t.Skip("hangs on fuchsia")
+	}
 	ln, err := newLocalListener("tcp")
 	if err != nil {
 		t.Fatal(err)
@@ -97,6 +100,9 @@
 }
 
 func TestSendfileParts(t *testing.T) {
+	if runtime.GOOS == "fuchsia" {
+		t.Skip("hangs on fuchsia")
+	}
 	ln, err := newLocalListener("tcp")
 	if err != nil {
 		t.Fatal(err)
@@ -155,6 +161,9 @@
 }
 
 func TestSendfileSeeked(t *testing.T) {
+	if runtime.GOOS == "fuchsia" {
+		t.Skip("hangs on fuchsia")
+	}
 	ln, err := newLocalListener("tcp")
 	if err != nil {
 		t.Fatal(err)
@@ -218,6 +227,8 @@
 // Test that sendfile doesn't put a pipe into blocking mode.
 func TestSendfilePipe(t *testing.T) {
 	switch runtime.GOOS {
+	case "fuchsia":
+		t.Skip("hangs on fuchsia")
 	case "plan9", "windows":
 		// These systems don't support deadlines on pipes.
 		t.Skipf("skipping on %s", runtime.GOOS)
diff --git a/src/net/sock_stub.go b/src/net/sock_stub.go
index c9f86af..50d92a3 100644
--- a/src/net/sock_stub.go
+++ b/src/net/sock_stub.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix js,wasm solaris
+// +build aix fuchsia js,wasm solaris
 
 package net
 
diff --git a/src/net/sockopt_fuchsia.go b/src/net/sockopt_fuchsia.go
new file mode 100644
index 0000000..4722e67
--- /dev/null
+++ b/src/net/sockopt_fuchsia.go
@@ -0,0 +1,45 @@
+// Copyright 2019 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 net
+
+import (
+	"os"
+	"runtime"
+	"syscall"
+)
+
+func setDefaultSockopts(s, family, sotype int, ipv6only bool) error {
+	return nil
+}
+
+func setDefaultListenerSockopts(s int) error {
+	return nil
+}
+
+func setDefaultMulticastSockopts(s int) error {
+	return nil
+}
+
+func setReadBuffer(fd *netFD, bytes int) error {
+	return syscall.ENOPROTOOPT
+}
+
+func setWriteBuffer(fd *netFD, bytes int) error {
+	return syscall.ENOPROTOOPT
+}
+
+func setKeepAlive(fd *netFD, keepalive bool) error {
+	b := make([]byte, 4)
+	if keepalive {
+		b[0] = 1
+	}
+	err := fd.sock.SetSockOpt(syscall.SOL_SOCKET, syscall.SO_KEEPALIVE, b)
+	runtime.KeepAlive(fd)
+	return os.NewSyscallError("setsockopt", err)
+}
+
+func setLinger(fd *netFD, sec int) error {
+	return syscall.ENOPROTOOPT
+}
diff --git a/src/net/tcpsock_fuchsia.go b/src/net/tcpsock_fuchsia.go
new file mode 100644
index 0000000..eb5d2ef
--- /dev/null
+++ b/src/net/tcpsock_fuchsia.go
@@ -0,0 +1,85 @@
+// Copyright 2016 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.
+
+//+build fuchsia
+
+package net
+
+import (
+	"context"
+	"io"
+	"os"
+	"syscall/zx/net"
+	"syscall/zx/posix/socket"
+)
+
+func (a *TCPAddr) domain() socket.Domain {
+	if a == nil || len(a.IP) <= IPv4len {
+		return socket.DomainIpv4
+	}
+	if a.IP.To4() != nil {
+		return socket.DomainIpv4
+	}
+	return socket.DomainIpv6
+}
+
+func (a *TCPAddr) family() int {
+	return domainToFamily(a.domain())
+}
+
+func (a *TCPAddr) sockaddr(domain socket.Domain) (address net.SocketAddress, err error) {
+	if a == nil {
+		return net.SocketAddressWithIpv4(net.Ipv4SocketAddress{}), nil
+	}
+	return ipToSockaddr(domain, a.IP, a.Port, a.Zone)
+}
+
+func (c *TCPConn) readFrom(r io.Reader) (int64, error) {
+	return genericReadFrom(c, r)
+}
+
+func (sd *sysDialer) dialTCP(ctx context.Context, laddr, raddr *TCPAddr) (*TCPConn, error) {
+	if testHookDialTCP != nil {
+		return testHookDialTCP(ctx, sd.network, laddr, raddr)
+	}
+	return sd.doDialTCP(ctx, laddr, raddr)
+}
+
+func (sd *sysDialer) doDialTCP(ctx context.Context, laddr, raddr *TCPAddr) (*TCPConn, error) {
+	switch sd.network {
+	case "tcp", "tcp4", "tcp6":
+	default:
+		return nil, UnknownNetworkError(sd.network)
+	}
+	if raddr == nil {
+		return nil, errMissingAddress
+	}
+	fd, err := dialFuchsia(ctx, sd.network, laddr, raddr)
+	if err != nil {
+		return nil, err
+	}
+	return newTCPConn(fd), nil
+}
+
+func (ln *TCPListener) ok() bool { return ln != nil && ln.fd != nil }
+
+func (ln *TCPListener) accept() (*TCPConn, error) {
+	fd, err := ln.fd.accept()
+	if err != nil {
+		return nil, err
+	}
+	return newTCPConn(fd), nil
+}
+
+func (ln *TCPListener) close() error { return ln.fd.Close() }
+
+func (ln *TCPListener) file() (*os.File, error) { return ln.fd.dup() }
+
+func (sl *sysListener) listenTCP(ctx context.Context, laddr *TCPAddr) (*TCPListener, error) {
+	fd, err := dialFuchsia(ctx, sl.network, laddr, nil)
+	if err != nil {
+		return nil, err
+	}
+	return &TCPListener{fd: fd, lc: sl.ListenConfig}, nil
+}
diff --git a/src/net/tcpsock_test.go b/src/net/tcpsock_test.go
index 8a70496..980b6c3 100644
--- a/src/net/tcpsock_test.go
+++ b/src/net/tcpsock_test.go
@@ -8,6 +8,7 @@
 
 import (
 	"fmt"
+	"internal/poll"
 	"internal/testenv"
 	"io"
 	"os"
@@ -441,9 +442,16 @@
 			for {
 				c, err := ln.Accept()
 				if err != nil {
+					if err, ok := err.(*OpError); ok {
+						if err.Err != poll.ErrNetClosing {
+							t.Error(err)
+						}
+					}
 					break
 				}
-				c.Close()
+				if err := c.Close(); err != nil {
+					t.Error(err)
+				}
 			}
 			wg.Done()
 		}()
@@ -452,20 +460,27 @@
 	fails := 0
 	d := &Dialer{Timeout: 200 * time.Millisecond}
 	for i := 0; i < attempts; i++ {
+		if t.Failed() {
+			break
+		}
 		c, err := d.Dial("tcp", ln.Addr().String())
 		if err != nil {
 			fails++
 		} else {
-			c.Close()
+			if err := c.Close(); err != nil {
+				t.Error(err)
+			}
 		}
 	}
-	ln.Close()
+	if err := ln.Close(); err != nil {
+		t.Error(err)
+	}
 	wg.Wait()
 	if fails > attempts/9 { // see issues 7400 and 7541
-		t.Fatalf("too many Dial failed: %v", fails)
+		t.Fatalf("too many Dial failed: %d", fails)
 	}
 	if fails > 0 {
-		t.Logf("# of failed Dials: %v", fails)
+		t.Logf("# of failed Dials: %d", fails)
 	}
 }
 
@@ -500,6 +515,12 @@
 	}
 	defer server.Close()
 
+	var want float64
+	// TODO(tamird/dhobsd): reduce allocations.
+	if runtime.GOOS == "fuchsia" {
+		want = 4
+	}
+
 	var buf [128]byte
 	allocs := testing.AllocsPerRun(1000, func() {
 		_, err := server.Write(buf[:])
@@ -511,8 +532,8 @@
 			t.Fatal(err)
 		}
 	})
-	if allocs > 0 {
-		t.Fatalf("got %v; want 0", allocs)
+	if allocs > want {
+		t.Fatalf("got %v; want %v", allocs, want)
 	}
 
 	var bufwrt [128]byte
@@ -533,8 +554,8 @@
 			t.Fatal(err)
 		}
 	})
-	if allocs > 0 {
-		t.Fatalf("got %v; want 0", allocs)
+	if allocs > want {
+		t.Fatalf("got %v; want %v", allocs, want)
 	}
 }
 
@@ -647,7 +668,7 @@
 		n = 1000
 	}
 	switch runtime.GOOS {
-	case "darwin", "dragonfly", "freebsd", "netbsd", "openbsd", "plan9", "illumos", "solaris", "windows":
+	case "darwin", "dragonfly", "freebsd", "fuchsia", "netbsd", "openbsd", "plan9", "illumos", "solaris", "windows":
 		// Non-Linux systems take a long time to figure
 		// out that there is nothing listening on localhost.
 		n = 100
@@ -723,6 +744,9 @@
 }
 
 func TestCopyPipeIntoTCP(t *testing.T) {
+	if runtime.GOOS == "fuchsia" {
+		t.Skip("hangs on fuchsia")
+	}
 	ln, err := newLocalListener("tcp")
 	if err != nil {
 		t.Fatal(err)
diff --git a/src/net/tcpsock_unix_test.go b/src/net/tcpsock_unix_test.go
index 2bd591b..65d0a96 100644
--- a/src/net/tcpsock_unix_test.go
+++ b/src/net/tcpsock_unix_test.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build !js,!plan9,!windows
+// +build !fuchsia,!js,!plan9,!windows
 
 package net
 
diff --git a/src/net/tcpsockopt_fuchsia.go b/src/net/tcpsockopt_fuchsia.go
new file mode 100644
index 0000000..948c348
--- /dev/null
+++ b/src/net/tcpsockopt_fuchsia.go
@@ -0,0 +1,44 @@
+// Copyright 2019 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 net
+
+import (
+	"runtime"
+	"syscall"
+	"time"
+)
+
+func setNoDelay(fd *netFD, noDelay bool) error {
+	b := make([]byte, 4)
+	if noDelay {
+		b[0] = 1
+	}
+	err := fd.sock.SetSockOpt(syscall.SOL_TCP, syscall.TCP_NODELAY, b)
+	runtime.KeepAlive(fd)
+	return err
+}
+
+func setKeepAlivePeriod(fd *netFD, d time.Duration) error {
+	// The socket option expects seconds so round to next highest second.
+	secs := uint32((d + time.Second - 1) / time.Second)
+
+	b := make([]byte, 4)
+	putUint32(b, secs)
+
+	if err := fd.sock.SetSockOpt(syscall.SOL_TCP, syscall.TCP_KEEPINTVL, b); err != nil {
+		return wrapSyscallError("setsockopt", err)
+	}
+	err := fd.sock.SetSockOpt(syscall.SOL_TCP, syscall.TCP_KEEPIDLE, b)
+	runtime.KeepAlive(fd)
+	return wrapSyscallError("setsockopt", err)
+}
+
+func putUint32(b []byte, v uint32) {
+	_ = b[3] // early bounds check to guarantee safety of writes below
+	b[0] = byte(v)
+	b[1] = byte(v >> 8)
+	b[2] = byte(v >> 16)
+	b[3] = byte(v >> 24)
+}
diff --git a/src/net/timeout_test.go b/src/net/timeout_test.go
index ad14cd7..eb32307 100644
--- a/src/net/timeout_test.go
+++ b/src/net/timeout_test.go
@@ -40,6 +40,9 @@
 }
 
 func TestDialTimeout(t *testing.T) {
+	if runtime.GOOS == "fuchsia" {
+		t.Skip("dial tcp 127.0.0.1:0: ErrPeerClosed: zxsocket")
+	}
 	// Cannot use t.Parallel - modifies global hooks.
 	origTestHookDialChannel := testHookDialChannel
 	defer func() { testHookDialChannel = origTestHookDialChannel }()
@@ -212,6 +215,9 @@
 }
 
 func TestAcceptTimeoutMustReturn(t *testing.T) {
+	if runtime.GOOS == "fuchsia" {
+		t.Skip("zxsocket does not implement deadlines")
+	}
 	t.Parallel()
 
 	switch runtime.GOOS {
@@ -258,6 +264,9 @@
 }
 
 func TestAcceptTimeoutMustNotReturn(t *testing.T) {
+	if runtime.GOOS == "fuchsia" {
+		t.Skip("zxsocket does not implement deadlines")
+	}
 	t.Parallel()
 
 	switch runtime.GOOS {
@@ -309,6 +318,9 @@
 }
 
 func TestReadTimeout(t *testing.T) {
+	if runtime.GOOS == "fuchsia" {
+		t.Skip("set tcp 127.0.0.1:45785: file type does not support deadline")
+	}
 	handler := func(ls *localServer, ln Listener) {
 		c, err := ln.Accept()
 		if err != nil {
@@ -363,6 +375,9 @@
 }
 
 func TestReadTimeoutMustNotReturn(t *testing.T) {
+	if runtime.GOOS == "fuchsia" {
+		t.Skip("zxsocket does not implement deadlines")
+	}
 	t.Parallel()
 
 	switch runtime.GOOS {
@@ -430,6 +445,9 @@
 }
 
 func TestReadFromTimeout(t *testing.T) {
+	if runtime.GOOS == "fuchsia" {
+		t.Skip("set udp 127.0.0.1:40297: file type does not support deadline")
+	}
 	ch := make(chan Addr)
 	defer close(ch)
 	handler := func(ls *localPacketServer, c PacketConn) {
@@ -498,6 +516,9 @@
 }
 
 func TestWriteTimeout(t *testing.T) {
+	if runtime.GOOS == "fuchsia" {
+		t.Skip("zxsocket does not implement deadlines")
+	}
 	t.Parallel()
 
 	ln, err := newLocalListener("tcp")
@@ -541,6 +562,9 @@
 }
 
 func TestWriteTimeoutMustNotReturn(t *testing.T) {
+	if runtime.GOOS == "fuchsia" {
+		t.Skip("zxsocket does not implement deadlines")
+	}
 	t.Parallel()
 
 	switch runtime.GOOS {
@@ -612,6 +636,9 @@
 }
 
 func TestWriteToTimeout(t *testing.T) {
+	if runtime.GOOS == "fuchsia" {
+		t.Skip("zxsocket does not implement deadlines")
+	}
 	t.Parallel()
 
 	c1, err := newLocalPacketListener("udp")
@@ -660,6 +687,9 @@
 }
 
 func TestReadTimeoutFluctuation(t *testing.T) {
+	if runtime.GOOS == "fuchsia" {
+		t.Skip("zxsocket does not implement deadlines")
+	}
 	t.Parallel()
 
 	ln, err := newLocalListener("tcp")
@@ -693,6 +723,9 @@
 }
 
 func TestReadFromTimeoutFluctuation(t *testing.T) {
+	if runtime.GOOS == "fuchsia" {
+		t.Skip("zxsocket does not implement deadlines")
+	}
 	t.Parallel()
 
 	c1, err := newLocalPacketListener("udp")
@@ -726,6 +759,9 @@
 }
 
 func TestWriteTimeoutFluctuation(t *testing.T) {
+	if runtime.GOOS == "fuchsia" {
+		t.Skip("zxsocket does not implement deadlines")
+	}
 	t.Parallel()
 
 	switch runtime.GOOS {
@@ -803,6 +839,9 @@
 	if runtime.GOOS == "plan9" {
 		t.Skip("skipping test on plan9; see golang.org/issue/26945")
 	}
+	if runtime.GOOS == "fuchsia" {
+		t.Skip("zxsocket does not implement deadlines")
+	}
 	type result struct {
 		n   int64
 		err error
@@ -897,6 +936,9 @@
 // TestReadWriteProlongedTimeout tests concurrent deadline
 // modification. Known to cause data races in the past.
 func TestReadWriteProlongedTimeout(t *testing.T) {
+	if runtime.GOOS == "fuchsia" {
+		t.Skip("zxsocket does not implement deadlines")
+	}
 	t.Parallel()
 
 	switch runtime.GOOS {
@@ -977,6 +1019,9 @@
 }
 
 func TestReadWriteDeadlineRace(t *testing.T) {
+	if runtime.GOOS == "fuchsia" {
+		t.Skip("zxsocket does not implement deadlines")
+	}
 	t.Parallel()
 
 	N := 1000
diff --git a/src/net/udpsock_fuchsia.go b/src/net/udpsock_fuchsia.go
new file mode 100644
index 0000000..831f2a3
--- /dev/null
+++ b/src/net/udpsock_fuchsia.go
@@ -0,0 +1,118 @@
+// Copyright 2016 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.
+
+//+build fuchsia
+
+package net
+
+import (
+	"context"
+	"syscall"
+	"syscall/zx/net"
+	"syscall/zx/posix/socket"
+)
+
+func (a *UDPAddr) domain() socket.Domain {
+	if a == nil || len(a.IP) <= IPv4len {
+		return socket.DomainIpv4
+	}
+	if a.IP.To4() != nil {
+		return socket.DomainIpv4
+	}
+	return socket.DomainIpv6
+}
+
+func (a *UDPAddr) family() int {
+	return domainToFamily(a.domain())
+}
+
+func (a *UDPAddr) sockaddr(domain socket.Domain) (addr net.SocketAddress, err error) {
+	if a == nil {
+		return net.SocketAddressWithIpv4(net.Ipv4SocketAddress{}), nil
+	}
+	return ipToSockaddr(domain, a.IP, a.Port, a.Zone)
+}
+
+func (c *UDPConn) readFrom(b []byte) (n int, addr *UDPAddr, err error) {
+	n, _, _, addr, err = c.readMsg(b, nil)
+	return n, addr, err
+}
+
+func (c *UDPConn) readMsg(b, oob []byte) (n, oobn, flags int, addr *UDPAddr, err error) {
+	n, flags, address, err := c.fd.readMsg(b)
+	if err != nil {
+		return 0, 0, 0, nil, err
+	}
+	ip, port := socketAddrToIpPort(address)
+	addr = &UDPAddr{
+		IP:   ip,
+		Port: port,
+	}
+	return n, 0, flags, addr, nil
+}
+
+func (c *UDPConn) writeTo(b []byte, addr *UDPAddr) (int, error) {
+	n, _, err := c.writeMsg(b, nil, addr)
+	return n, err
+}
+
+func (c *UDPConn) writeMsg(b, oob []byte, addr *UDPAddr) (n, oobn int, err error) {
+	if c.fd.isConnected && addr != nil {
+		return 0, 0, ErrWriteToConnected
+	}
+	if !c.fd.isConnected && addr == nil {
+		return 0, 0, errMissingAddress
+	}
+	if len(oob) > 0 {
+		return 0, 0, syscall.EFUCHSIA
+	}
+	if addr == nil {
+		n, err = c.fd.Write(b)
+		return n, 0, err
+	}
+	{
+		addr, err := addr.sockaddr(familyToDomain(c.fd.family))
+		if err != nil {
+			return 0, 0, err
+		}
+		n, err = c.fd.sendMsg(b, addr)
+		return n, 0, err
+	}
+}
+
+func (sd *sysDialer) dialUDP(ctx context.Context, laddr, raddr *UDPAddr) (*UDPConn, error) {
+	switch sd.network {
+	case "udp", "udp4", "udp6":
+	default:
+		return nil, UnknownNetworkError(sd.network)
+	}
+	if raddr == nil {
+		return nil, errMissingAddress
+	}
+	var laddrif sockaddr
+	if laddr != nil {
+		laddrif = laddr
+	}
+	fd, err := dialFuchsia(ctx, sd.network, laddrif, raddr)
+	if err != nil {
+		return nil, err
+	}
+	return newUDPConn(fd), nil
+}
+
+func (sl *sysListener) listenUDP(ctx context.Context, laddr *UDPAddr) (*UDPConn, error) {
+	var laddrif sockaddr
+	if laddr != nil {
+		laddrif = laddr
+	}
+	fd, err := dialFuchsia(ctx, sl.network, laddrif, nil)
+	if err != nil {
+		return nil, err
+	}
+	return newUDPConn(fd), nil
+}
+
+func (sl *sysListener) listenMulticastUDP(ctx context.Context, ifi *Interface, gaddr *UDPAddr) (*UDPConn, error) {
+	return nil, syscall.EFUCHSIA
+}
diff --git a/src/net/unixsock_fuchsia.go b/src/net/unixsock_fuchsia.go
new file mode 100644
index 0000000..1ed9304
--- /dev/null
+++ b/src/net/unixsock_fuchsia.go
@@ -0,0 +1,51 @@
+// Copyright 2016 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 net
+
+import (
+	"context"
+	"os"
+	"syscall"
+)
+
+func (c *UnixConn) readFrom(b []byte) (int, *UnixAddr, error) {
+	return 0, nil, syscall.EFUCHSIA
+}
+
+func (c *UnixConn) readMsg(b, oob []byte) (n, oobn, flags int, addr *UnixAddr, err error) {
+	return 0, 0, 0, nil, syscall.EFUCHSIA
+}
+
+func (c *UnixConn) writeTo(b []byte, addr *UnixAddr) (int, error) {
+	return 0, syscall.EFUCHSIA
+}
+
+func (c *UnixConn) writeMsg(b, oob []byte, addr *UnixAddr) (n, oobn int, err error) {
+	return 0, 0, syscall.EFUCHSIA
+}
+
+func (sd *sysDialer) dialUnix(ctx context.Context, laddr, raddr *UnixAddr) (*UnixConn, error) {
+	return nil, syscall.EFUCHSIA
+}
+
+func (ln *UnixListener) accept() (*UnixConn, error) {
+	return nil, syscall.EFUCHSIA
+}
+
+func (ln *UnixListener) close() error {
+	return syscall.EFUCHSIA
+}
+
+func (ln *UnixListener) file() (*os.File, error) {
+	return nil, syscall.EFUCHSIA
+}
+
+func (sl *sysListener) listenUnix(ctx context.Context, laddr *UnixAddr) (*UnixListener, error) {
+	return nil, syscall.EFUCHSIA
+}
+
+func (sl *sysListener) listenUnixgram(ctx context.Context, laddr *UnixAddr) (*UnixConn, error) {
+	return nil, syscall.EFUCHSIA
+}
diff --git a/src/net/unixsock_test.go b/src/net/unixsock_test.go
index 4b2cfc4..b85e9ce 100644
--- a/src/net/unixsock_test.go
+++ b/src/net/unixsock_test.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build !js,!plan9,!windows
+// +build !fuchsia,!js,!plan9,!windows
 
 package net
 
diff --git a/src/net/writev_test.go b/src/net/writev_test.go
index c43be84..f349b17 100644
--- a/src/net/writev_test.go
+++ b/src/net/writev_test.go
@@ -102,6 +102,13 @@
 }
 
 func testBuffer_writeTo(t *testing.T, chunks int, useCopy bool) {
+	if runtime.GOOS == "fuchsia" {
+		if useCopy {
+			t.Skip("TODO(26919): fails on Fuchsia with ErrBadState")
+		} else {
+			t.Skip("TODO(26919): hangs on Fuchsia")
+		}
+	}
 	oldHook := poll.TestHookDidWritev
 	defer func() { poll.TestHookDidWritev = oldHook }()
 	var writeLog struct {
diff --git a/src/os/dir_unix.go b/src/os/dir_unix.go
index e0c4989..7f6d990 100644
--- a/src/os/dir_unix.go
+++ b/src/os/dir_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix dragonfly freebsd js,wasm linux netbsd openbsd solaris
+// +build aix dragonfly freebsd fuchsia js,wasm linux netbsd openbsd solaris
 
 package os
 
diff --git a/src/os/error_errno.go b/src/os/error_errno.go
index 31ae05a..7f5909c 100644
--- a/src/os/error_errno.go
+++ b/src/os/error_errno.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build !plan9
+// +build !fuchsia,!plan9
 
 package os
 
diff --git a/src/os/error_fuchsia.go b/src/os/error_fuchsia.go
new file mode 100644
index 0000000..bb56b2f
--- /dev/null
+++ b/src/os/error_fuchsia.go
@@ -0,0 +1,24 @@
+// Copyright 2009 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.
+
+// +build fuchsia
+
+package os
+
+import (
+	"syscall/zx"
+)
+
+type syscallErrorType = *zx.Error
+
+func wrapSyscallError(name string, err error) error {
+	if err, ok := err.(*zx.Error); ok {
+		text := name
+		if err.Text != "" {
+			text += ": " + err.Text
+		}
+		return &zx.Error{Status: err.Status, Text: text}
+	}
+	return err
+}
diff --git a/src/os/exec/exec_test.go b/src/os/exec/exec_test.go
index dafbc64..4f57421 100644
--- a/src/os/exec/exec_test.go
+++ b/src/os/exec/exec_test.go
@@ -43,6 +43,9 @@
 	if os.Getenv("GO_WANT_HELPER_PROCESS") == "1" {
 		return
 	}
+	if runtime.GOOS == "fuchsia" {
+		return
+	}
 	if runtime.GOOS == "windows" {
 		return
 	}
@@ -99,6 +102,9 @@
 
 func TestCommandRelativeName(t *testing.T) {
 	testenv.MustHaveExec(t)
+	if runtime.GOOS == "fuchsia" {
+		t.Skip("fdio_spawn_etc: -25: failed to load executable from test/go_exec_test: Could not open file")
+	}
 
 	// Run our own binary as a relative path
 	// (e.g. "_test/exec.test") our parent directory.
@@ -162,6 +168,9 @@
 }
 
 func TestCatGoodAndBadFile(t *testing.T) {
+	if runtime.GOOS == "fuchsia" {
+		t.Skip("tests don't have access to their own sources on fuchsia")
+	}
 	// Testing combined output and error values.
 	bs, err := helperCommand(t, "cat", "/bogus/file.foo", "exec_test.go").CombinedOutput()
 	if _, ok := err.(*exec.ExitError); !ok {
@@ -605,6 +614,9 @@
 	testenv.MustHaveExec(t)
 	testenv.MustHaveGoBuild(t)
 
+	if runtime.GOOS == "fuchsia" {
+		t.Skip("FileListener is not supported on fuchsia")
+	}
 	if runtime.GOOS == "windows" {
 		t.Skipf("skipping test on %q", runtime.GOOS)
 	}
@@ -697,6 +709,9 @@
 }
 
 func TestExtraFilesRace(t *testing.T) {
+	if runtime.GOOS == "fuchsia" {
+		t.Skip("FileListener is not supported on fuchsia")
+	}
 	if runtime.GOOS == "windows" {
 		t.Skip("no operating system support; skipping")
 	}
diff --git a/src/os/exec/lp_unix.go b/src/os/exec/lp_unix.go
index 93793e0..95d63dd 100644
--- a/src/os/exec/lp_unix.go
+++ b/src/os/exec/lp_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd fuchsia linux netbsd openbsd solaris
 
 package exec
 
diff --git a/src/os/exec_fuchsia.go b/src/os/exec_fuchsia.go
new file mode 100644
index 0000000..f8ab19f
--- /dev/null
+++ b/src/os/exec_fuchsia.go
@@ -0,0 +1,101 @@
+// Copyright 2016 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.
+
+// +build fuchsia
+
+package os
+
+import (
+	"errors"
+	"runtime"
+	"sync/atomic"
+	"syscall/zx"
+	"time"
+)
+
+type ProcessState struct {
+	retCode int
+}
+
+func (p *ProcessState) exited() bool {
+	panic("TODO os.Exited")
+}
+
+func (p *ProcessState) Pid() int {
+	panic("TODO os.Pid")
+}
+
+func (p *ProcessState) String() string {
+	if p == nil {
+		return "<nil>"
+	}
+	return "exit status " + itoa(p.retCode)
+}
+
+func (p *ProcessState) ExitCode() int {
+	// return -1 if the process hasn't started.
+	if p == nil {
+		return -1
+	}
+	return p.retCode
+}
+
+func (p *ProcessState) success() bool {
+	return p.retCode == 0
+}
+
+func (p *ProcessState) sys() interface{} {
+	panic("TODO os.sys")
+}
+
+func (p *ProcessState) sysUsage() interface{} {
+	panic("TODO os.sysUsage")
+}
+
+func (p *ProcessState) systemTime() time.Duration {
+	panic("TODO os.systemTime")
+}
+
+func (p *ProcessState) userTime() time.Duration {
+	panic("TODO os.userTime")
+}
+
+func (p *Process) release() error {
+	h := atomic.SwapUintptr(&p.handle, uintptr(zx.HandleInvalid))
+	procHandle := zx.Handle(h)
+	if err := procHandle.Close(); err != nil {
+		return err
+	}
+	// no need for a finalizer anymore
+	runtime.SetFinalizer(p, nil)
+	return nil
+}
+
+func (p *Process) signal(sig Signal) error {
+	panic("TODO os.Process.signal")
+}
+
+func findProcess(pid int) (p *Process, err error) {
+	panic("TODO os.findProcess")
+}
+
+func startProcess(name string, argv []string, attr *ProcAttr) (p *Process, err error) {
+	h, err := fdioStartProcess(name, argv, attr)
+	if err != nil {
+		return nil, err
+	}
+	pid := 1 // TODO: what does this even mean for us?
+	return newProcess(pid, uintptr(h)), nil
+}
+
+func hostname() (name string, err error) {
+	return "", errors.New("os.hostname unimplemented")
+}
+
+type signal string
+
+func (s signal) String() string { return string(s) }
+func (s signal) Signal()        {}
+
+var Interrupt = signal("signal_interrupt")
diff --git a/src/os/exec_fuchsia_cgo.go b/src/os/exec_fuchsia_cgo.go
new file mode 100644
index 0000000..7c8c40c
--- /dev/null
+++ b/src/os/exec_fuchsia_cgo.go
@@ -0,0 +1,188 @@
+// Copyright 2017 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.
+
+// +build fuchsia
+
+package os
+
+// #cgo fuchsia CFLAGS: -I${SRCDIR}/../../../../../zircon/system/ulib/fdio/include
+// #cgo fuchsia LDFLAGS: -lfdio
+//
+// #include <lib/fdio/fd.h>
+// #include <lib/fdio/spawn.h>
+// #include <stdlib.h>
+// #include <unistd.h>
+// #include <zircon/syscalls/object.h>
+// #include <zircon/types.h>
+//
+// static int fsa_get_local_fd(fdio_spawn_action_t *fsa) { return fsa->fd.local_fd; }
+// static int fsa_get_target_fd(fdio_spawn_action_t *fsa) { return fsa->fd.target_fd; }
+//
+// static void fsa_set_local_fd(fdio_spawn_action_t *fsa, int fd) { fsa->fd.local_fd = fd; }
+// static void fsa_set_target_fd(fdio_spawn_action_t *fsa, int fd) { fsa->fd.target_fd = fd; }
+import "C"
+
+import (
+	"errors"
+	"syscall"
+	"syscall/zx"
+	"syscall/zx/zxwait"
+	"unsafe"
+)
+
+func makeCStringArray(s []string) []*C.char {
+	ret := make([]*C.char, len(s)+1)
+	for i, s := range s {
+		ret[i] = (*C.char)(C.CString(s))
+	}
+	ret[len(ret)-1] = nil
+	return ret
+}
+
+func freeCStringArray(a []*C.char) {
+	for i := range a {
+		if a[i] != nil {
+			C.free(unsafe.Pointer(a[i]))
+		}
+	}
+}
+
+// asLibfdioFD returns a File as a libfdio file descriptor.
+func asLibfdioFD(f *File) (int, error) {
+	m := syscall.FDIOForFD(int(f.Fd()))
+	if m == nil {
+		return -1, ErrInvalid
+	}
+
+	mCopy, err := m.Clone()
+	if err != nil {
+		return -1, err
+	}
+	handles := mCopy.Handles()
+
+	var fd C.int
+	status := zx.Status(C.fdio_fd_create(C.zx_handle_t(handles[0]), &fd))
+	if status != zx.ErrOk {
+		return -1, errors.New("fdio_fd_create failed")
+	}
+	return int(fd), nil
+}
+
+func fdioSpawnActions(attr *ProcAttr) (actions []C.fdio_spawn_action_t, err error) {
+	defer func() {
+		if err != nil {
+			for _, action := range actions {
+				C.close(C.fsa_get_local_fd(&action))
+			}
+		}
+	}()
+
+	for i, f := range attr.Files {
+		if f == nil {
+			continue
+		}
+		fd, err := asLibfdioFD(f)
+		if err != nil {
+			return nil, err
+		}
+		action := C.fdio_spawn_action_t{action: C.FDIO_SPAWN_ACTION_TRANSFER_FD}
+		C.fsa_set_local_fd(&action, C.int(fd))
+		C.fsa_set_target_fd(&action, C.int(i))
+		actions = append(actions, action)
+	}
+
+	return actions, nil
+}
+
+func fdioStartProcess(name string, argv []string, attr *ProcAttr) (zx.Handle, error) {
+	env := attr.Env
+	if env == nil {
+		env = Environ()
+	}
+	if attr.Dir != "" {
+		found := false
+		for i, s := range env {
+			const prefix = "PWD="
+			// strings.HasPrefix
+			if len(s) >= len(prefix) && s[:len(prefix)] == prefix {
+				found = true
+				env[i] = "PWD=" + attr.Dir
+				break
+			}
+		}
+		if !found {
+			env = append(env, "PWD="+attr.Dir)
+		}
+	}
+
+	nameC := C.CString(name)
+	defer C.free(unsafe.Pointer(nameC))
+	argvC := makeCStringArray(argv)
+	defer freeCStringArray(argvC)
+	envC := makeCStringArray(env)
+	defer freeCStringArray(envC)
+
+	actions, err := fdioSpawnActions(attr)
+	if err != nil {
+		return 0, err
+	}
+
+	var actions0 *C.fdio_spawn_action_t
+	if len(actions) > 0 {
+		actions0 = &actions[0]
+	}
+
+	var h C.zx_handle_t
+	var errmsg [C.FDIO_SPAWN_ERR_MSG_MAX_LENGTH]C.char
+	status := zx.Status(C.fdio_spawn_etc(
+		C.ZX_HANDLE_INVALID,
+		C.FDIO_SPAWN_CLONE_JOB|C.FDIO_SPAWN_DEFAULT_LDSVC|C.FDIO_SPAWN_CLONE_NAMESPACE, // TODO(mdempsky): Flags.
+		nameC,
+		&argvC[0],
+		&envC[0],
+		C.size_t(len(actions)),
+		actions0,
+		&h,
+		&errmsg[0],
+	))
+	if status != zx.ErrOk {
+		return 0, errors.New("fdio_spawn_etc: " + itoa(int(status)) + ": " + charsAsString(errmsg[:]))
+	}
+	return zx.Handle(h), nil
+}
+
+func charsAsString(s []C.char) string {
+	var x []byte
+	for _, c := range s {
+		if c == 0 {
+			break
+		}
+		x = append(x, byte(c))
+	}
+	return string(x)
+}
+
+func (p *Process) kill() error {
+	procHandle := zx.Handle(p.handle)
+	status := zx.Sys_task_kill(procHandle)
+	if status != zx.ErrOk {
+		return errors.New("kill error: " + itoa(int(status)))
+	}
+	return nil
+}
+
+func (p *Process) wait() (ps *ProcessState, err error) {
+	procHandle := zx.Handle(p.handle)
+	_, err = zxwait.Wait(procHandle, zx.SignalTaskTerminated, zx.TimensecInfinite)
+	if err != nil {
+		return nil, err
+	}
+	procInfo := C.zx_info_process_t{}
+	status := zx.Sys_object_get_info(procHandle, zx.ObjectInfoProcess, unsafe.Pointer(&procInfo), C.sizeof_zx_info_process_t, nil, nil)
+	if status != zx.ErrOk {
+		return nil, errors.New("error retrieving process info: " + itoa(int(status)))
+	}
+	defer p.Release()
+	return &ProcessState{int(procInfo.return_code)}, nil
+}
diff --git a/src/os/exec_fuchsia_stubs.go b/src/os/exec_fuchsia_stubs.go
new file mode 100644
index 0000000..83aa953
--- /dev/null
+++ b/src/os/exec_fuchsia_stubs.go
@@ -0,0 +1,22 @@
+// Copyright 2018 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.
+
+// +build fuchsia
+// +build !cgo
+
+package os
+
+import "syscall/zx"
+
+func fdioStartProcess(name string, argv []string, attr *ProcAttr) (zx.Handle, error) {
+	panic("os.fdioStartProcess unimplemented")
+}
+
+func (p *Process) kill() error {
+	panic("os.Process.kill unimplemented")
+}
+
+func (p *Process) wait() (*ProcessState, error) {
+	panic("os.Process.wait unimplemented")
+}
diff --git a/src/os/executable_procfs.go b/src/os/executable_procfs.go
index 2628223..237cb5e 100644
--- a/src/os/executable_procfs.go
+++ b/src/os/executable_procfs.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build linux netbsd dragonfly js,wasm
+// +build fuchsia linux netbsd dragonfly js,wasm
 
 package os
 
diff --git a/src/os/executable_test.go b/src/os/executable_test.go
index f25ee0c..36e3ba4 100644
--- a/src/os/executable_test.go
+++ b/src/os/executable_test.go
@@ -20,6 +20,9 @@
 	testenv.MustHaveExec(t)
 	ep, err := os.Executable()
 	if err != nil {
+		if runtime.GOOS == "fuchsia" {
+			t.Skipf("Executable failed on %s: %v, expected", runtime.GOOS, err) // TODO(dhobsd): rebase
+		}
 		t.Fatalf("Executable failed: %v", err)
 	}
 	// we want fn to be of the form "dir/prog"
diff --git a/src/os/file_posix.go b/src/os/file_posix.go
index 24ea554..c81c857 100644
--- a/src/os/file_posix.go
+++ b/src/os/file_posix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris windows
+// +build aix darwin dragonfly freebsd fuchsia js,wasm linux netbsd openbsd solaris windows
 
 package os
 
diff --git a/src/os/file_unix.go b/src/os/file_unix.go
index f2c00ae..3885dcc 100644
--- a/src/os/file_unix.go
+++ b/src/os/file_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd fuchsia js,wasm linux netbsd openbsd solaris
 
 package os
 
diff --git a/src/os/getwd.go b/src/os/getwd.go
index 6d25466..39a4fd2 100644
--- a/src/os/getwd.go
+++ b/src/os/getwd.go
@@ -24,7 +24,7 @@
 // reached via multiple paths (due to symbolic links),
 // Getwd may return any one of them.
 func Getwd() (dir string, err error) {
-	if runtime.GOOS == "windows" || runtime.GOOS == "plan9" {
+	if runtime.GOOS == "windows" || runtime.GOOS == "plan9" || runtime.GOOS == "fuchsia" {
 		return syscall.Getwd()
 	}
 
diff --git a/src/os/os_test.go b/src/os/os_test.go
index e8c6451..9bec354 100644
--- a/src/os/os_test.go
+++ b/src/os/os_test.go
@@ -26,15 +26,43 @@
 	"time"
 )
 
-var dot = []string{
-	"dir_unix.go",
-	"env.go",
-	"error.go",
-	"file.go",
-	"os_test.go",
-	"types.go",
-	"stat_darwin.go",
-	"stat_linux.go",
+var dot = func() []string {
+	switch runtime.GOOS {
+	case "fuchsia":
+		return []string{
+			"go_os_test_foo",
+			"go_os_test_bar",
+			"go_os_test_baz",
+		}
+	default:
+		return []string{
+			"dir_unix.go",
+			"env.go",
+			"error.go",
+			"file.go",
+			"os_test.go",
+			"types.go",
+			"stat_darwin.go",
+			"stat_linux.go",
+		}
+	}
+}()
+
+func tmpInit(t *testing.T) {
+	if runtime.GOOS == "fuchsia" {
+		dir, err := ioutil.TempDir("", "")
+		if err != nil {
+			t.Fatalf("tempdir: %v", err)
+		}
+		for _, fname := range dot {
+			if err := MkdirAll(filepath.Join(dir, fname), ModePerm); err != nil {
+				t.Fatalf("Initializing tmp: %v", err)
+			}
+		}
+		if err := Chdir(dir); err != nil {
+			t.Fatalf("chdir: %v", err)
+		}
+	}
 }
 
 type sysDir struct {
@@ -44,6 +72,14 @@
 
 var sysdir = func() *sysDir {
 	switch runtime.GOOS {
+	case "fuchsia":
+		return &sysDir{
+			"/pkg/lib",
+			[]string{
+				"libfdio.so",
+				"ld.so.1",
+			},
+		}
 	case "android":
 		return &sysDir{
 			"/system/lib",
@@ -188,6 +224,9 @@
 }
 
 func TestStatError(t *testing.T) {
+	if runtime.GOOS == "fuchsia" {
+		t.Skip("TODO(dhobsd): fix")
+	}
 	defer chtmpdir(t)()
 
 	path := "no-such-file"
@@ -357,11 +396,13 @@
 }
 
 func TestReaddirnames(t *testing.T) {
+	tmpInit(t)
 	testReaddirnames(".", dot, t)
 	testReaddirnames(sysdir.name, sysdir.files, t)
 }
 
 func TestReaddir(t *testing.T) {
+	tmpInit(t)
 	testReaddir(".", dot, t)
 	testReaddir(sysdir.name, sysdir.files, t)
 }
@@ -479,6 +520,8 @@
 	// big directory that doesn't change often.
 	dir := "/usr/bin"
 	switch runtime.GOOS {
+	case "fuchsia":
+		dir = "/boot/bin"
 	case "android":
 		dir = "/system/bin"
 	case "darwin":
@@ -1068,6 +1111,8 @@
 	switch runtime.GOOS {
 	case "android":
 		t.Skip("android doesn't have /bin/pwd")
+	case "fuchsia":
+		t.Skip("fuchsia doesn't have /bin/pwd")
 	case "windows":
 		cmd = Getenv("COMSPEC")
 		dir = Getenv("SystemRoot")
@@ -1101,8 +1146,8 @@
 }
 
 func TestChmod(t *testing.T) {
-	// Chmod is not supported under windows.
-	if runtime.GOOS == "windows" {
+	// Chmod is not supported under windows or Fuchsia
+	if runtime.GOOS == "windows" || runtime.GOOS == "fuchsia" {
 		return
 	}
 	f := newFile("TestChmod", t)
@@ -1175,6 +1220,11 @@
 // On NFS, timings can be off due to caching of meta-data on
 // NFS servers (Issue 848).
 func TestChtimes(t *testing.T) {
+	if runtime.GOOS == "fuchsia" {
+		// It passes sometimes, but seems to be flakey
+		t.Skipf("TODO(smklein): Implement")
+	}
+
 	f := newFile("TestChtimes", t)
 	defer Remove(f.Name())
 
@@ -1189,6 +1239,11 @@
 // On NFS, timings can be off due to caching of meta-data on
 // NFS servers (Issue 848).
 func TestChtimesDir(t *testing.T) {
+	if runtime.GOOS == "fuchsia" {
+		// It passes sometimes, but seems to be flakey
+		t.Skipf("TODO(smklein): Implement")
+	}
+
 	name := newDir("TestChtimes", t)
 	defer RemoveAll(name)
 
@@ -1220,7 +1275,7 @@
 	pmt := postStat.ModTime()
 	if !pat.Before(at) {
 		switch runtime.GOOS {
-		case "plan9":
+		case "plan9", "fuchsia":
 			// Mtime is the time of the last change of
 			// content.  Similarly, atime is set whenever
 			// the contents are accessed; also, it is set
@@ -1244,7 +1299,7 @@
 
 func TestFileChdir(t *testing.T) {
 	// TODO(brainman): file.Chdir() is not implemented on windows.
-	if runtime.GOOS == "windows" {
+	if runtime.GOOS == "windows" || runtime.GOOS == "fuchsia" {
 		return
 	}
 
@@ -1279,7 +1334,7 @@
 
 func TestChdirAndGetwd(t *testing.T) {
 	// TODO(brainman): file.Chdir() is not implemented on windows.
-	if runtime.GOOS == "windows" {
+	if runtime.GOOS == "windows" || runtime.GOOS == "fuchsia" {
 		return
 	}
 	fd, err := Open(".")
@@ -1523,6 +1578,10 @@
 }
 
 func TestOpenError(t *testing.T) {
+	if runtime.GOOS == "fuchsia" {
+		t.Skipf("TODO(smklein): Implement")
+	}
+
 	for _, tt := range openErrorTests {
 		f, err := OpenFile(tt.path, tt.mode, 0)
 		if err == nil {
@@ -1624,6 +1683,10 @@
 }
 
 func TestHostname(t *testing.T) {
+	if runtime.GOOS == "fuchsia" {
+		t.Skipf("TODO(dho): Implement")
+	}
+
 	hostname, err := Hostname()
 	if err != nil {
 		t.Fatal(err)
@@ -1862,6 +1925,10 @@
 }
 
 func TestSameFile(t *testing.T) {
+	if runtime.GOOS == "fuchsia" {
+		t.Skipf("TODO(smklein): Implement")
+	}
+
 	defer chtmpdir(t)()
 	fa, err := Create("a")
 	if err != nil {
@@ -1910,13 +1977,13 @@
 	if fi.Size() != 0 {
 		t.Errorf(pre+"wrong file size have %d want 0", fi.Size())
 	}
-	if fi.Mode()&ModeDevice == 0 {
+	if fi.Mode()&ModeDevice == 0 && runtime.GOOS != "fuchsia" {
 		t.Errorf(pre+"wrong file mode %q: ModeDevice is not set", fi.Mode())
 	}
 	if fi.Mode()&ModeCharDevice == 0 {
 		t.Errorf(pre+"wrong file mode %q: ModeCharDevice is not set", fi.Mode())
 	}
-	if fi.Mode().IsRegular() {
+	if fi.Mode().IsRegular() && runtime.GOOS != "fuchsia" {
 		t.Errorf(pre+"wrong file mode %q: IsRegular returns true", fi.Mode())
 	}
 }
@@ -1973,6 +2040,10 @@
 }
 
 func TestStatDirModeExec(t *testing.T) {
+	if runtime.GOOS == "fuchsia" {
+		t.Skipf("TODO(smklein): Implement")
+	}
+
 	const mode = 0111
 
 	path, err := ioutil.TempDir("", "go-build")
@@ -1996,7 +2067,8 @@
 
 func TestStatStdin(t *testing.T) {
 	switch runtime.GOOS {
-	case "android", "plan9":
+	case "android", "plan9", "fuchsia":
+		// TODO(smklein): Implement on Fuchsia
 		t.Skipf("%s doesn't have /bin/sh", runtime.GOOS)
 	}
 
@@ -2112,6 +2184,10 @@
 }
 
 func TestLongPath(t *testing.T) {
+	if runtime.GOOS == "fuchsia" {
+		t.Skipf("no chmod support on fuchsia")
+	}
+
 	tmpdir := newDir("TestLongPath", t)
 	defer func(d string) {
 		if err := RemoveAll(d); err != nil {
@@ -2223,6 +2299,9 @@
 		// TODO: golang.org/issue/8206
 		t.Skipf("skipping test on plan9; see issue 8206")
 	}
+	if runtime.GOOS == "fuchsia" {
+		t.Skipf("TODO(smklein): Implement")
+	}
 
 	testenv.MustHaveExec(t)
 
@@ -2248,6 +2327,10 @@
 }
 
 func TestKillFindProcess(t *testing.T) {
+	if runtime.GOOS == "fuchsia" {
+		t.Skipf("TODO(smklein): Implement")
+	}
+
 	testKillProcess(t, func(p *Process) {
 		p2, err := FindProcess(p.Pid)
 		if err != nil {
@@ -2283,6 +2366,10 @@
 
 // Test that all File methods give ErrInvalid if the receiver is nil.
 func TestNilFileMethods(t *testing.T) {
+	if runtime.GOOS == "fuchsia" {
+		t.Skipf("TODO(smklein): Implement")
+	}
+
 	for _, tt := range nilFileMethodTests {
 		var file *File
 		got := tt.f(file)
@@ -2354,6 +2441,8 @@
 		t.Skip("skipping on Plan 9; does not support runtime poller")
 	case "js":
 		t.Skip("skipping on js; no support for os.Pipe")
+	case "fuchsia":
+		t.Skip("skipping on fuchsia; TODO")
 	}
 
 	threads := 100
@@ -2504,6 +2593,9 @@
 	if runtime.GOOS == "windows" {
 		testenv.SkipFlaky(t, 36019)
 	}
+	if runtime.GOOS == "fuchsia" {
+		t.Skip("fuchsia cannot expose testdata; directories can't be resources")
+	}
 	wd, err := Getwd()
 	if err != nil {
 		t.Fatal(err)
diff --git a/src/os/path_test.go b/src/os/path_test.go
index d586daf..73cafbb 100644
--- a/src/os/path_test.go
+++ b/src/os/path_test.go
@@ -105,7 +105,7 @@
 
 func TestMkdirAllAtSlash(t *testing.T) {
 	switch runtime.GOOS {
-	case "android", "plan9", "windows":
+	case "android", "fuchsia", "plan9", "windows":
 		t.Skipf("skipping on %s", runtime.GOOS)
 	case "darwin":
 		switch runtime.GOARCH {
diff --git a/src/os/path_unix.go b/src/os/path_unix.go
index c99a824..984eff2 100644
--- a/src/os/path_unix.go
+++ b/src/os/path_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd fuchsia js,wasm linux netbsd openbsd solaris
 
 package os
 
diff --git a/src/os/pipe_fuchsia.go b/src/os/pipe_fuchsia.go
new file mode 100644
index 0000000..2a74b3b
--- /dev/null
+++ b/src/os/pipe_fuchsia.go
@@ -0,0 +1,23 @@
+// Copyright 2013 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.
+
+// +build fuchsia
+
+package os
+
+import (
+	"syscall"
+	"syscall/zx/fdio"
+)
+
+func Pipe() (r *File, w *File, err error) {
+	p0, p1, err := fdio.NewPipes()
+	if err != nil {
+		return nil, nil, err
+	}
+	r = NewFile(uintptr(syscall.OpenFDIO(p0)), "|0")
+	w = NewFile(uintptr(syscall.OpenFDIO(p1)), "|1")
+	// TODO CloseOnExec equivalent
+	return r, w, nil
+}
diff --git a/src/os/pipe_test.go b/src/os/pipe_test.go
index 429bd81..fcaab1b 100644
--- a/src/os/pipe_test.go
+++ b/src/os/pipe_test.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // Test broken pipes on Unix systems.
-// +build !plan9,!js
+// +build !fuchsia,!plan9,!js
 
 package os_test
 
diff --git a/src/os/rawconn_test.go b/src/os/rawconn_test.go
index 2554f5b..44824dd 100644
--- a/src/os/rawconn_test.go
+++ b/src/os/rawconn_test.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // Test use of raw connections.
-// +build !plan9,!js
+// +build !plan9,!js,!fuchsia
 
 package os_test
 
diff --git a/src/os/removeall_test.go b/src/os/removeall_test.go
index 8a71f68..cbe3104 100644
--- a/src/os/removeall_test.go
+++ b/src/os/removeall_test.go
@@ -455,6 +455,8 @@
 			return
 		}
 		t.Fatal("RemoveAll(<read-only directory>) = nil; want error")
+	} else if runtime.GOOS == "fuchsia" {
+		t.Fatal(err)
 	}
 
 	dir, err := Open(path)
diff --git a/src/os/signal/signal_fuchsia.go b/src/os/signal/signal_fuchsia.go
new file mode 100644
index 0000000..0d4e736
--- /dev/null
+++ b/src/os/signal/signal_fuchsia.go
@@ -0,0 +1,29 @@
+// Copyright 2016 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 signal
+
+import "os"
+
+const numSig = 65
+
+func signum(sig os.Signal) int {
+	panic("TODO")
+}
+
+func enableSignal(sig int) {
+	panic("TODO")
+}
+
+func disableSignal(sig int) {
+	panic("TODO")
+}
+
+func ignoreSignal(sig int) {
+	panic("TODO")
+}
+
+func signalIgnored(sig int) bool {
+	panic("TODO")
+}
diff --git a/src/os/stat_fuchsia.go b/src/os/stat_fuchsia.go
new file mode 100644
index 0000000..fb67df3
--- /dev/null
+++ b/src/os/stat_fuchsia.go
@@ -0,0 +1,36 @@
+// Copyright 2009 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 os
+
+import (
+	"time"
+)
+
+func fillFileStatFromSys(fs *fileStat, name string) {
+	fs.name = basename(name)
+	fs.size = int64(fs.sys.Size)
+	// For now, pretend files have all bits. This should really be:
+	// fs.mode = FileMode(fs.sys.Dev & 0777)
+	// but we don't really set file modes properly and testing for executables
+	// in $PATH fails without the x bit set.
+	fs.mode = FileMode(0766)
+
+	switch fs.sys.Dev & 0xf000 {
+	case 0x4000:
+		fs.mode = fs.mode | ModeDir
+	case 0x2000:
+		fs.mode = fs.mode | ModeCharDevice
+	case 0xa000:
+		fs.mode = fs.mode | ModeSymlink
+	case 0xc000:
+		fs.mode = fs.mode | ModeSocket
+	}
+	fs.modTime = time.Unix(int64(fs.sys.ModifyTime), 0)
+}
+
+func atime(fi FileInfo) time.Time {
+	// TODO: fdio doesn't have atime yet
+	return time.Time{}
+}
diff --git a/src/os/stat_unix.go b/src/os/stat_unix.go
index 0a7e602..c688cc4 100644
--- a/src/os/stat_unix.go
+++ b/src/os/stat_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd fuchsia js,wasm linux netbsd openbsd solaris
 
 package os
 
diff --git a/src/os/sys_unix.go b/src/os/sys_unix.go
index 8491bad..e06bed5 100644
--- a/src/os/sys_unix.go
+++ b/src/os/sys_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd fuchsia linux netbsd openbsd solaris
 
 package os
 
diff --git a/src/os/timeout_test.go b/src/os/timeout_test.go
index 99b94c2..13f029b 100644
--- a/src/os/timeout_test.go
+++ b/src/os/timeout_test.go
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+// +build !fuchsia
 // +build !js
 // +build !plan9
 // +build !windows
diff --git a/src/os/user/lookup_fuchsia.go b/src/os/user/lookup_fuchsia.go
new file mode 100644
index 0000000..87ee40a
--- /dev/null
+++ b/src/os/user/lookup_fuchsia.go
@@ -0,0 +1,36 @@
+// Copyright 2016 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 user
+
+import "errors"
+
+func init() {
+	userImplemented = false
+	groupImplemented = false
+}
+
+func current() (*User, error) {
+	return nil, errors.New("user: Current not implemented on fuchsia")
+}
+
+func lookupUser(string) (*User, error) {
+	return nil, errors.New("user: Lookup not implemented on fuchsia")
+}
+
+func lookupUserId(string) (*User, error) {
+	return nil, errors.New("user: LookupId not implemented on fuchsia")
+}
+
+func lookupGroup(string) (*Group, error) {
+	return nil, errors.New("user: LookupGroup not implemented on fuchsia")
+}
+
+func lookupGroupId(string) (*Group, error) {
+	return nil, errors.New("user: LookupGroupId not implemented on fuchsia")
+}
+
+func listGroups(*User) ([]string, error) {
+	return nil, errors.New("user: GroupIds not implemented on fuchsia")
+}
diff --git a/src/os/user/lookup_stubs.go b/src/os/user/lookup_stubs.go
index 178d814..9b67527 100644
--- a/src/os/user/lookup_stubs.go
+++ b/src/os/user/lookup_stubs.go
@@ -3,6 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // +build !cgo,!windows,!plan9 android osusergo,!windows,!plan9
+// +build !fuchsia
 
 package user
 
diff --git a/src/path/filepath/path_unix.go b/src/path/filepath/path_unix.go
index ec497d9..8bdcf95 100644
--- a/src/path/filepath/path_unix.go
+++ b/src/path/filepath/path_unix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd fuchsia js,wasm linux netbsd openbsd solaris
 
 package filepath
 
diff --git a/src/runtime/asm_amd64.s b/src/runtime/asm_amd64.s
index fa25c55..0321dd8 100644
--- a/src/runtime/asm_amd64.s
+++ b/src/runtime/asm_amd64.s
@@ -179,6 +179,9 @@
 	// skip TLS setup on Darwin
 	JMP ok
 #endif
+#ifdef GOOS_fuchsia
+	// TODO(dhobsd): Fuchsia needs thread handle.
+#endif
 
 	LEAQ	runtime·m0+m_tls(SB), DI
 	CALL	runtime·settls(SB)
@@ -871,6 +874,7 @@
 	CALL	runtime·abort(SB)
 	RET
 
+#ifndef GOOS_fuchsia
 // func cputicks() int64
 TEXT runtime·cputicks(SB),NOSPLIT,$0-0
 	CMPB	runtime·lfenceBeforeRdtsc(SB), $1
@@ -885,6 +889,7 @@
 	ADDQ	DX, AX
 	MOVQ	AX, ret+0(FP)
 	RET
+#endif
 
 // func memhash(p unsafe.Pointer, h, s uintptr) uintptr
 // hash function using AES hardware instructions
diff --git a/src/runtime/cgo/cgo.go b/src/runtime/cgo/cgo.go
index c02b837..1d1fecb 100644
--- a/src/runtime/cgo/cgo.go
+++ b/src/runtime/cgo/cgo.go
@@ -15,6 +15,7 @@
 #cgo darwin,arm64 LDFLAGS: -framework CoreFoundation
 #cgo dragonfly LDFLAGS: -lpthread
 #cgo freebsd LDFLAGS: -lpthread
+#cgo fuchsia LDFLAGS: -lpthread -lfdio
 #cgo android LDFLAGS: -llog
 #cgo !android,linux LDFLAGS: -lpthread
 #cgo netbsd LDFLAGS: -lpthread
@@ -25,7 +26,9 @@
 // Issue 35247.
 #cgo darwin CFLAGS: -Wno-nullability-completeness
 
-#cgo CFLAGS: -Wall -Werror
+// TODO(INTK-705): Remove darwin CFLAGS hack when we figure out the cause of these failures on Mac
+#cgo !darwin CFLAGS: -Wall -Werror
+#cgo darwin CFLAGS: -Wall -Wno-unused-command-line-argument -Werror
 
 #cgo solaris CPPFLAGS: -D_POSIX_PTHREAD_SEMANTICS
 
diff --git a/src/runtime/cgo/fuchsia.go b/src/runtime/cgo/fuchsia.go
new file mode 100644
index 0000000..42fc3b9
--- /dev/null
+++ b/src/runtime/cgo/fuchsia.go
@@ -0,0 +1,21 @@
+// Copyright 2016 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.
+
+// +build fuchsia
+
+package cgo
+
+import _ "unsafe" // for go:linkname
+
+//go:cgo_import_static x_cgo_get_initial_handles
+//go:linkname x_cgo_get_initial_handles x_cgo_get_initial_handles
+//go:linkname _cgo_get_initial_handles runtime._cgo_get_initial_handles
+var x_cgo_get_initial_handles byte
+var _cgo_get_initial_handles = &x_cgo_get_initial_handles
+
+//go:cgo_import_static x_cgo_get_thread_self_handle
+//go:linkname x_cgo_get_thread_self_handle x_cgo_get_thread_self_handle
+//go:linkname _cgo_get_thread_self_handle runtime._cgo_get_thread_self_handle
+var x_cgo_get_thread_self_handle byte
+var _cgo_get_thread_self_handle = &x_cgo_get_thread_self_handle
diff --git a/src/runtime/cgo/gcc_context.c b/src/runtime/cgo/gcc_context.c
index 5fc0abb..e9797bd 100644
--- a/src/runtime/cgo/gcc_context.c
+++ b/src/runtime/cgo/gcc_context.c
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // +build cgo
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows
+// +build aix darwin dragonfly freebsd fuchsia linux netbsd openbsd solaris windows
 
 #include "libcgo.h"
 
diff --git a/src/runtime/cgo/gcc_fatalf.c b/src/runtime/cgo/gcc_fatalf.c
index 597e750..fa75fe8 100644
--- a/src/runtime/cgo/gcc_fatalf.c
+++ b/src/runtime/cgo/gcc_fatalf.c
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix !android,linux freebsd
+// +build aix !android,linux freebsd fuchsia
 
 #include <stdarg.h>
 #include <stdio.h>
diff --git a/src/runtime/cgo/gcc_fuchsia.c b/src/runtime/cgo/gcc_fuchsia.c
new file mode 100644
index 0000000..4cb998d
--- /dev/null
+++ b/src/runtime/cgo/gcc_fuchsia.c
@@ -0,0 +1,89 @@
+// Copyright 2011 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.
+
+// +build cgo
+// +build fuchsia
+
+#include "libcgo.h"
+
+#include <stdlib.h>
+#include <pthread.h>
+
+#include <lib/fdio/fd.h>
+#include <lib/fdio/namespace.h>
+#include <zircon/process.h>
+#include <zircon/processargs.h>
+#include <zircon/threads.h>
+#include <zircon/types.h>
+
+extern char **environ;
+
+// fdio_init matches a Go struct of the same name in os_fuchsia.go.
+struct fdio_init {
+	zx_handle_t stdioClones[3];
+	uint32_t stdioCloneNumHandles[3];
+	uint32_t stdioCloneTypes[3];
+	zx_handle_t processSelf;
+	zx_handle_t vmarRootSelf;
+	int32_t envlen;
+	char**  environ;
+	uint8_t padding[4];
+	int32_t rootNSNumHandles;
+	zx_handle_t *rootNSHandles;
+	char** rootNSPaths;
+};
+
+void
+x_cgo_get_initial_handles(struct fdio_init *handles)
+{
+	// When running with cgo support, there are two FDIO libraries in the
+	// same process. We let the C FDIO start first, then clone its namespace
+	// and use that for Go.
+	// TODO: there is some small amount of fdio library state we
+	//       have to share between Go and C, in particular, cwd.
+	//       Work out how.
+
+	// fdio may have initialized std{in,out,err} with a single fd if the FDIO_FLAG_USE_FOR_STDIO
+	// flag was set, or have separate in/out/err fds. We clone fds {0,1,2} to separate fds for use
+	// in the Go runtime. The cloned fds aren't installed into fdio's fd table so they are only
+	// usable from Go's table.
+	for (int i = 0; i < 3; ++i) {
+		zx_status_t status = fdio_fd_clone(i, &handles->stdioClones[i]);
+		if (status != ZX_OK) {
+			printf("runtime/cgo: fdio_fd_clone of stdio[%d] failed: %d\n", i, status);
+			handles->stdioCloneNumHandles[i] = 0;
+		} else {
+			handles->stdioCloneNumHandles[i] = 1;
+			handles->stdioCloneTypes[i] = PA_FD;
+		}
+	}
+
+	handles->processSelf = zx_process_self();
+	handles->vmarRootSelf = zx_vmar_root_self();
+
+	for (char** env = environ; *env; env++) {
+		handles->envlen++;
+	}
+	handles->environ = environ;
+
+	fdio_flat_namespace_t* root_ns = NULL;
+	zx_status_t status = fdio_ns_export_root(&root_ns);
+	if (status != ZX_OK) {
+		handles->rootNSNumHandles = 0;
+		handles->rootNSHandles = NULL;
+		handles->rootNSPaths = NULL;
+	} else {
+		handles->rootNSNumHandles = (int32_t)root_ns->count;
+		handles->rootNSHandles = root_ns->handle;
+		handles->rootNSPaths = (char**)root_ns->path;
+	}
+}
+
+void
+x_cgo_get_thread_self_handle(zx_handle_t *h)
+{
+	// N.B.: libc currently (and probably always will) share the same type for
+	// C11 threads and pthreads.
+	*h = thrd_get_zx_handle(pthread_self());
+}
diff --git a/src/runtime/cgo/gcc_fuchsia_amd64.c b/src/runtime/cgo/gcc_fuchsia_amd64.c
new file mode 100644
index 0000000..ae65662
--- /dev/null
+++ b/src/runtime/cgo/gcc_fuchsia_amd64.c
@@ -0,0 +1,52 @@
+// Copyright 2010 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 <pthread.h>
+#include <errno.h>
+#include <string.h> // strerror
+#include <signal.h>
+#include <stdlib.h>
+#include "libcgo.h"
+
+static void* threadentry(void*);
+static void (*setg_gcc)(void*);
+
+void
+x_cgo_init(G* g, void (*setg)(void*))
+{
+	setg_gcc = setg;
+}
+
+void
+_cgo_sys_thread_start(ThreadStart *ts)
+{
+	// TODO: switch to threads.h.
+	pthread_attr_t attr;
+	pthread_t p;
+	size_t size;
+	int err;
+
+	pthread_attr_init(&attr);
+	pthread_attr_getstacksize(&attr, &size);
+	// leave stacklo=0 and set stackhi=size; mstack will do the rest.
+	ts->g->stackhi = size;
+	err = pthread_create(&p, &attr, threadentry, ts);
+
+	if (err != 0) {
+		fatalf("pthread_create failed: %s", strerror(err));
+	}
+}
+
+static void*
+threadentry(void *v)
+{
+	ThreadStart ts;
+
+	ts = *(ThreadStart*)v;
+	free(v);
+	setg_gcc((void*)ts.g);
+
+	crosscall_amd64(ts.fn);
+	return 0;
+}
diff --git a/src/runtime/cgo/gcc_fuchsia_arm64.c b/src/runtime/cgo/gcc_fuchsia_arm64.c
new file mode 100644
index 0000000..e79d192
--- /dev/null
+++ b/src/runtime/cgo/gcc_fuchsia_arm64.c
@@ -0,0 +1,53 @@
+// Copyright 2016 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 <pthread.h>
+#include <errno.h>
+#include <string.h> // strerror
+#include <signal.h>
+#include <stdlib.h>
+#include "libcgo.h"
+
+#include <stdio.h>
+
+static void* threadentry(void*);
+static void (*setg_gcc)(void*);
+
+void
+x_cgo_init(G* g, void (*setg)(void*))
+{
+	setg_gcc = setg;
+}
+
+void
+_cgo_sys_thread_start(ThreadStart *ts)
+{
+	pthread_attr_t attr;
+	pthread_t p;
+	size_t size;
+	int err;
+
+	pthread_attr_init(&attr);
+	pthread_attr_getstacksize(&attr, &size);
+	// leave stacklo=0 and set stackhi=size; mstack will do the rest.
+	ts->g->stackhi = size;
+	err = pthread_create(&p, &attr, threadentry, ts);
+
+	if (err != 0) {
+		fatalf("pthread_create failed: %s", strerror(err));
+	}
+}
+
+extern void crosscall1(void (*fn)(void), void (*setg_gcc)(void*), void *g);
+static void*
+threadentry(void *v)
+{
+	ThreadStart ts;
+
+	ts = *(ThreadStart*)v;
+	free(v);
+
+	crosscall1(ts.fn, setg_gcc, (void*)ts.g);
+	return 0;
+}
diff --git a/src/runtime/cgo/gcc_libinit.c b/src/runtime/cgo/gcc_libinit.c
index 3304d95..ad9e040 100644
--- a/src/runtime/cgo/gcc_libinit.c
+++ b/src/runtime/cgo/gcc_libinit.c
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // +build cgo
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd fuchsia linux netbsd openbsd solaris
 
 #include <pthread.h>
 #include <errno.h>
diff --git a/src/runtime/cgo/gcc_setenv.c b/src/runtime/cgo/gcc_setenv.c
index d4f7983..81e2080 100644
--- a/src/runtime/cgo/gcc_setenv.c
+++ b/src/runtime/cgo/gcc_setenv.c
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // +build cgo
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd fuchsia linux netbsd openbsd solaris
 
 #include "libcgo.h"
 
diff --git a/src/runtime/cgo/setenv.go b/src/runtime/cgo/setenv.go
index 6495fcb..76621e5 100644
--- a/src/runtime/cgo/setenv.go
+++ b/src/runtime/cgo/setenv.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd fuchsia linux netbsd openbsd solaris
 
 package cgo
 
diff --git a/src/runtime/cputicks.go b/src/runtime/cputicks.go
index 7beb57e..e58d4c7 100644
--- a/src/runtime/cputicks.go
+++ b/src/runtime/cputicks.go
@@ -9,6 +9,7 @@
 // +build !mips
 // +build !mipsle
 // +build !wasm
+// +build !fuchsia
 
 package runtime
 
diff --git a/src/runtime/defs_fuchsia_amd64.go b/src/runtime/defs_fuchsia_amd64.go
new file mode 100644
index 0000000..7c5b9ac
--- /dev/null
+++ b/src/runtime/defs_fuchsia_amd64.go
@@ -0,0 +1,32 @@
+// Copyright 2018 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 runtime
+
+type generalRegs struct {
+	rax     uint64
+	rbx     uint64
+	rcx     uint64
+	rdx     uint64
+	rsi     uint64
+	rdi     uint64
+	rbp     uint64
+	rsp     uint64
+	r8      uint64
+	r9      uint64
+	r10     uint64
+	r11     uint64
+	r12     uint64
+	r13     uint64
+	r14     uint64
+	r15     uint64
+	rip     uint64
+	rflags  uint64
+	fs_base uint64
+	gs_base uint64
+}
+
+func (r *generalRegs) rPC() uintptr { return uintptr(r.rip) }
+func (r *generalRegs) rSP() uintptr { return uintptr(r.rsp) }
+func (r *generalRegs) rLR() uintptr { return 0 }
diff --git a/src/runtime/defs_fuchsia_arm64.go b/src/runtime/defs_fuchsia_arm64.go
new file mode 100644
index 0000000..0daffac
--- /dev/null
+++ b/src/runtime/defs_fuchsia_arm64.go
@@ -0,0 +1,18 @@
+// Copyright 2018 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 runtime
+
+type generalRegs struct {
+	r     [30]uint64
+	lr    uint64
+	sp    uint64
+	pc    uint64
+	cpsr  uint64
+	tpidr uint64
+}
+
+func (r *generalRegs) rPC() uintptr { return uintptr(r.pc) }
+func (r *generalRegs) rSP() uintptr { return uintptr(r.sp) }
+func (r *generalRegs) rLR() uintptr { return uintptr(r.lr) }
diff --git a/src/runtime/env_posix.go b/src/runtime/env_posix.go
index af353bb..50740bd 100644
--- a/src/runtime/env_posix.go
+++ b/src/runtime/env_posix.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris windows plan9
+// +build aix darwin dragonfly freebsd fuchsia js,wasm linux netbsd openbsd solaris windows plan9
 
 package runtime
 
diff --git a/src/runtime/gc_test.go b/src/runtime/gc_test.go
index c5c8a4c..8646297 100644
--- a/src/runtime/gc_test.go
+++ b/src/runtime/gc_test.go
@@ -21,6 +21,8 @@
 )
 
 func TestGcSys(t *testing.T) {
+	t.Skip("flaky test; https://github.com/golang/go/issues/37331")
+
 	if os.Getenv("GOGC") == "off" {
 		t.Skip("skipping test; GOGC=off in environment")
 	}
diff --git a/src/runtime/internal/sys/zgoos_aix.go b/src/runtime/internal/sys/zgoos_aix.go
index d97485c..873a3d5 100644
--- a/src/runtime/internal/sys/zgoos_aix.go
+++ b/src/runtime/internal/sys/zgoos_aix.go
@@ -11,6 +11,7 @@
 const GoosDarwin = 0
 const GoosDragonfly = 0
 const GoosFreebsd = 0
+const GoosFuchsia = 0
 const GoosHurd = 0
 const GoosIllumos = 0
 const GoosJs = 0
diff --git a/src/runtime/internal/sys/zgoos_android.go b/src/runtime/internal/sys/zgoos_android.go
index eec970b..6c4a4b9 100644
--- a/src/runtime/internal/sys/zgoos_android.go
+++ b/src/runtime/internal/sys/zgoos_android.go
@@ -11,6 +11,7 @@
 const GoosDarwin = 0
 const GoosDragonfly = 0
 const GoosFreebsd = 0
+const GoosFuchsia = 0
 const GoosHurd = 0
 const GoosIllumos = 0
 const GoosJs = 0
diff --git a/src/runtime/internal/sys/zgoos_darwin.go b/src/runtime/internal/sys/zgoos_darwin.go
index c40819e..89a7a01 100644
--- a/src/runtime/internal/sys/zgoos_darwin.go
+++ b/src/runtime/internal/sys/zgoos_darwin.go
@@ -11,6 +11,7 @@
 const GoosDarwin = 1
 const GoosDragonfly = 0
 const GoosFreebsd = 0
+const GoosFuchsia = 0
 const GoosHurd = 0
 const GoosIllumos = 0
 const GoosJs = 0
diff --git a/src/runtime/internal/sys/zgoos_dragonfly.go b/src/runtime/internal/sys/zgoos_dragonfly.go
index 3dc4edc..f1529d1 100644
--- a/src/runtime/internal/sys/zgoos_dragonfly.go
+++ b/src/runtime/internal/sys/zgoos_dragonfly.go
@@ -11,6 +11,7 @@
 const GoosDarwin = 0
 const GoosDragonfly = 1
 const GoosFreebsd = 0
+const GoosFuchsia = 0
 const GoosHurd = 0
 const GoosIllumos = 0
 const GoosJs = 0
diff --git a/src/runtime/internal/sys/zgoos_freebsd.go b/src/runtime/internal/sys/zgoos_freebsd.go
index 6c98b34..57c56a5 100644
--- a/src/runtime/internal/sys/zgoos_freebsd.go
+++ b/src/runtime/internal/sys/zgoos_freebsd.go
@@ -11,6 +11,7 @@
 const GoosDarwin = 0
 const GoosDragonfly = 0
 const GoosFreebsd = 1
+const GoosFuchsia = 0
 const GoosHurd = 0
 const GoosIllumos = 0
 const GoosJs = 0
diff --git a/src/runtime/internal/sys/zgoos_fuchsia.go b/src/runtime/internal/sys/zgoos_fuchsia.go
new file mode 100644
index 0000000..e08a8cb
--- /dev/null
+++ b/src/runtime/internal/sys/zgoos_fuchsia.go
@@ -0,0 +1,25 @@
+// Code generated by gengoos.go using 'go generate'. DO NOT EDIT.
+
+// +build fuchsia
+
+package sys
+
+const GOOS = `fuchsia`
+
+const GoosAix = 0
+const GoosAndroid = 0
+const GoosDarwin = 0
+const GoosDragonfly = 0
+const GoosFreebsd = 0
+const GoosFuchsia = 1
+const GoosHurd = 0
+const GoosIllumos = 0
+const GoosJs = 0
+const GoosLinux = 0
+const GoosNacl = 0
+const GoosNetbsd = 0
+const GoosOpenbsd = 0
+const GoosPlan9 = 0
+const GoosSolaris = 0
+const GoosWindows = 0
+const GoosZos = 0
diff --git a/src/runtime/internal/sys/zgoos_hurd.go b/src/runtime/internal/sys/zgoos_hurd.go
index d6dcc7b..546a643 100644
--- a/src/runtime/internal/sys/zgoos_hurd.go
+++ b/src/runtime/internal/sys/zgoos_hurd.go
@@ -11,6 +11,7 @@
 const GoosDarwin = 0
 const GoosDragonfly = 0
 const GoosFreebsd = 0
+const GoosFuchsia = 0
 const GoosHurd = 1
 const GoosIllumos = 0
 const GoosJs = 0
diff --git a/src/runtime/internal/sys/zgoos_illumos.go b/src/runtime/internal/sys/zgoos_illumos.go
index 17f4ecc..5d2d9cd 100644
--- a/src/runtime/internal/sys/zgoos_illumos.go
+++ b/src/runtime/internal/sys/zgoos_illumos.go
@@ -11,6 +11,7 @@
 const GoosDarwin = 0
 const GoosDragonfly = 0
 const GoosFreebsd = 0
+const GoosFuchsia = 0
 const GoosHurd = 0
 const GoosIllumos = 1
 const GoosJs = 0
diff --git a/src/runtime/internal/sys/zgoos_js.go b/src/runtime/internal/sys/zgoos_js.go
index 74c9943..f9dfa98 100644
--- a/src/runtime/internal/sys/zgoos_js.go
+++ b/src/runtime/internal/sys/zgoos_js.go
@@ -11,6 +11,7 @@
 const GoosDarwin = 0
 const GoosDragonfly = 0
 const GoosFreebsd = 0
+const GoosFuchsia = 0
 const GoosHurd = 0
 const GoosIllumos = 0
 const GoosJs = 1
diff --git a/src/runtime/internal/sys/zgoos_linux.go b/src/runtime/internal/sys/zgoos_linux.go
index 1d5fcb0..bc11259 100644
--- a/src/runtime/internal/sys/zgoos_linux.go
+++ b/src/runtime/internal/sys/zgoos_linux.go
@@ -12,6 +12,7 @@
 const GoosDarwin = 0
 const GoosDragonfly = 0
 const GoosFreebsd = 0
+const GoosFuchsia = 0
 const GoosHurd = 0
 const GoosIllumos = 0
 const GoosJs = 0
diff --git a/src/runtime/internal/sys/zgoos_netbsd.go b/src/runtime/internal/sys/zgoos_netbsd.go
index 194fa6e..3051619 100644
--- a/src/runtime/internal/sys/zgoos_netbsd.go
+++ b/src/runtime/internal/sys/zgoos_netbsd.go
@@ -11,6 +11,7 @@
 const GoosDarwin = 0
 const GoosDragonfly = 0
 const GoosFreebsd = 0
+const GoosFuchsia = 0
 const GoosHurd = 0
 const GoosIllumos = 0
 const GoosJs = 0
diff --git a/src/runtime/internal/sys/zgoos_openbsd.go b/src/runtime/internal/sys/zgoos_openbsd.go
index 2108691..efab0c0 100644
--- a/src/runtime/internal/sys/zgoos_openbsd.go
+++ b/src/runtime/internal/sys/zgoos_openbsd.go
@@ -11,6 +11,7 @@
 const GoosDarwin = 0
 const GoosDragonfly = 0
 const GoosFreebsd = 0
+const GoosFuchsia = 0
 const GoosHurd = 0
 const GoosIllumos = 0
 const GoosJs = 0
diff --git a/src/runtime/internal/sys/zgoos_plan9.go b/src/runtime/internal/sys/zgoos_plan9.go
index e632a90..ff96351 100644
--- a/src/runtime/internal/sys/zgoos_plan9.go
+++ b/src/runtime/internal/sys/zgoos_plan9.go
@@ -11,6 +11,7 @@
 const GoosDarwin = 0
 const GoosDragonfly = 0
 const GoosFreebsd = 0
+const GoosFuchsia = 0
 const GoosHurd = 0
 const GoosIllumos = 0
 const GoosJs = 0
diff --git a/src/runtime/internal/sys/zgoos_solaris.go b/src/runtime/internal/sys/zgoos_solaris.go
index 67b2ffb..034684b 100644
--- a/src/runtime/internal/sys/zgoos_solaris.go
+++ b/src/runtime/internal/sys/zgoos_solaris.go
@@ -12,6 +12,7 @@
 const GoosDarwin = 0
 const GoosDragonfly = 0
 const GoosFreebsd = 0
+const GoosFuchsia = 0
 const GoosHurd = 0
 const GoosIllumos = 0
 const GoosJs = 0
diff --git a/src/runtime/internal/sys/zgoos_windows.go b/src/runtime/internal/sys/zgoos_windows.go
index cf2d6f4..9c21e84 100644
--- a/src/runtime/internal/sys/zgoos_windows.go
+++ b/src/runtime/internal/sys/zgoos_windows.go
@@ -11,6 +11,7 @@
 const GoosDarwin = 0
 const GoosDragonfly = 0
 const GoosFreebsd = 0
+const GoosFuchsia = 0
 const GoosHurd = 0
 const GoosIllumos = 0
 const GoosJs = 0
diff --git a/src/runtime/internal/sys/zgoos_zos.go b/src/runtime/internal/sys/zgoos_zos.go
index e5d79ac..f8017fb 100644
--- a/src/runtime/internal/sys/zgoos_zos.go
+++ b/src/runtime/internal/sys/zgoos_zos.go
@@ -11,6 +11,7 @@
 const GoosDarwin = 0
 const GoosDragonfly = 0
 const GoosFreebsd = 0
+const GoosFuchsia = 0
 const GoosHurd = 0
 const GoosIllumos = 0
 const GoosJs = 0
diff --git a/src/runtime/lock_futex.go b/src/runtime/lock_futex.go
index 91467fd..1f0fc6b 100644
--- a/src/runtime/lock_futex.go
+++ b/src/runtime/lock_futex.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build dragonfly freebsd linux
+// +build dragonfly freebsd fuchsia linux
 
 package runtime
 
diff --git a/src/runtime/mem_fuchsia.go b/src/runtime/mem_fuchsia.go
new file mode 100644
index 0000000..0592f99
--- /dev/null
+++ b/src/runtime/mem_fuchsia.go
@@ -0,0 +1,131 @@
+// Copyright 2016 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 runtime
+
+import (
+	"unsafe"
+)
+
+const (
+	permRead  = 1 << 0
+	permWrite = 1 << 1
+
+	propName = 3
+
+	// The VMO opcode to decommit pages (ZX_VMO_OP_DECOMMIT).
+	vmoOpDecommit = 2
+
+	// The name assigned to VMOs.
+	vmoNameProp = "go-runtime-heap-vmo"
+)
+
+//go:linkname sys_vmar_unmap syscall/zx.Sys_vmar_unmap
+func sys_vmar_unmap(h uint32, addr unsafe.Pointer, l uint64) int32
+
+//go:linkname sys_vmo_create syscall/zx.Sys_vmo_create
+//go:noescape
+func sys_vmo_create(size uint64, options uint32, out *uint32) int32
+
+//go:linkname sys_object_set_property syscall/zx.Sys_object_set_property
+//go:noescape
+func sys_object_set_property(handle uint32, property uint32, value unsafe.Pointer, value_size uint) int32
+
+//go:linkname sys_vmar_map syscall/zx.Sys_vmar_map
+//go:noescape
+func sys_vmar_map(handle uint32, options uint32, vmar_offset uint64, vmo uint32, vmo_offset uint64, len uint64, mapped_addr *unsafe.Pointer) int32
+
+//go:linkname sys_vmar_op_range syscall/zx.Sys_vmar_op_range
+//go:noescape
+func sys_vmar_op_range(handle uint32, op uint32, addr uint64, size uint64, buffer unsafe.Pointer, buffer_size uint64) int32
+
+//go:linkname sys_handle_close syscall/zx.Sys_handle_close
+//go:noescape
+func sys_handle_close(handle uint32) int32
+
+//go:linkname sys_vmar_protect syscall/zx.Sys_vmar_protect
+func sys_vmar_protect(handle uint32, options uint32, addr unsafe.Pointer, len uint64) int32
+
+//go:nosplit
+func sysAlloc(n uintptr, sysStat *uint64) unsafe.Pointer {
+	var p unsafe.Pointer
+	sysMmap(unsafe.Pointer(&p), n, permRead|permWrite)
+	if uintptr(p) < 4096 {
+		println("runtime: sysMmap failed n=", n)
+		exit(2)
+	}
+	mSysStatInc(sysStat, n)
+	return p
+}
+
+func sysUnused(v unsafe.Pointer, n uintptr) {
+	if status := sys_vmar_op_range(fdioHandles.vmarRootSelf, vmoOpDecommit, uint64(uintptr(v)), uint64(n), nil, 0); status != 0 {
+		println("runtime: sys_vmar_op_range failed: ", status)
+		exit(2)
+	}
+}
+
+func sysUsed(v unsafe.Pointer, n uintptr) {
+	// TODO(dho): Maybe implement this based on ZX_VMO_OP_COMMIT
+	//
+	// Note, pages are committed (allocated) for VMOs on demand, as per
+	// https://fuchsia.dev/fuchsia-src/reference/kernel_objects/vm_object#description.
+	// Also, note that sys_vmar_op_range does not yet support ZX_VMO_OP_COMMIT, as
+	// per https://fuchsia.dev/fuchsia-src/reference/syscalls/vmar_op_range.
+}
+
+func sysHugePage(v unsafe.Pointer, n uintptr) {
+}
+
+//go:nosplit
+func sysFree(v unsafe.Pointer, n uintptr, sysStat *uint64) {
+	mSysStatDec(sysStat, n)
+	if status := sys_vmar_unmap(fdioHandles.vmarRootSelf, v, uint64(n)); status != 0 {
+		println("runtime: sys_vmar_unmap failed: ", status)
+		exit(2)
+	}
+}
+
+func sysMmap(ptr unsafe.Pointer, sz uintptr, flags uint32) {
+	var h uint32
+	if status := sys_vmo_create(uint64(sz), 0, &h); status != 0 {
+		println("runtime: sys_vmo_create failed: ", status)
+		exit(2)
+	}
+
+	prop := []byte(vmoNameProp)
+	if status := sys_object_set_property(h, propName, unsafe.Pointer(&prop[0]), uint(len(prop))); status != 0 {
+		println("runtime: sys_object_set_property failed: ", status)
+		exit(2)
+	}
+
+	if status := sys_vmar_map(fdioHandles.vmarRootSelf, flags, 0, h, 0, uint64(sz), (*unsafe.Pointer)(ptr)); status != 0 {
+		println("runtime: sys_vmar_map failed: ", status)
+		exit(2)
+	}
+
+	if status := sys_handle_close(h); status != 0 {
+		println("runtime: sys_handle_close failed: ", status)
+		exit(2)
+	}
+}
+
+func sysReserve(v unsafe.Pointer, n uintptr) unsafe.Pointer {
+	p := v
+	sysMmap(unsafe.Pointer(&p), n, 0)
+	return p
+}
+
+func sysFault(v unsafe.Pointer, n uintptr) {
+	println("TODO sysFault")
+}
+
+func sysMap(v unsafe.Pointer, n uintptr, sysStat *uint64) {
+	mSysStatInc(sysStat, n)
+
+	if status := sys_vmar_protect(fdioHandles.vmarRootSelf, permRead|permWrite, v, uint64(n)); status != 0 {
+		println("runtime: sys_vmar_protect failed: ", status)
+		exit(2)
+	}
+}
diff --git a/src/runtime/netpoll_stub.go b/src/runtime/netpoll_stub.go
index 3599f2d..16adf3f 100644
--- a/src/runtime/netpoll_stub.go
+++ b/src/runtime/netpoll_stub.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build plan9
+// +build fuchsia plan9
 
 package runtime
 
diff --git a/src/runtime/os_fuchsia.go b/src/runtime/os_fuchsia.go
new file mode 100644
index 0000000..11578bb
--- /dev/null
+++ b/src/runtime/os_fuchsia.go
@@ -0,0 +1,729 @@
+// Copyright 2016 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 runtime
+
+import (
+	"runtime/internal/atomic"
+	"unsafe"
+)
+
+const nsecInf = int64(0x7FFFFFFFFFFFFFFF)
+
+func osyield()
+
+//go:linkname cputicks syscall/zx.Sys_ticks_get
+func cputicks() int64
+
+//go:linkname sys_cprng_draw syscall/zx.Sys_cprng_draw
+//go:noescape
+func sys_cprng_draw(buffer unsafe.Pointer, size uint)
+
+//go:linkname sys_system_get_num_cpus syscall/zx.Sys_system_get_num_cpus
+func sys_system_get_num_cpus() uint32
+
+//go:linkname sys_deadline_after syscall/zx.Sys_deadline_after
+func sys_deadline_after(ns int64) int64
+
+//go:linkname sys_futex_wait syscall/zx.Sys_futex_wait
+//go:noescape
+func sys_futex_wait(v *int32, cv int32, newOwner uint32, deadline int64) int32
+
+//go:linkname sys_futex_wake syscall/zx.Sys_futex_wake
+//go:noescape
+func sys_futex_wake(v *int32, count uint32) int32
+
+//go:linkname sys_thread_create syscall/zx.Sys_thread_create
+//go:noescape
+func sys_thread_create(p uint32, name *byte, nlen uint, opts int, out *uint32) int32
+
+//go:linkname sys_thread_start syscall/zx.Sys_thread_start
+//go:noescape
+func sys_thread_start(h uint32, pc unsafe.Pointer, stk unsafe.Pointer, mp uintptr, arg2 uintptr) int32
+
+//go:linkname sys_clock_get_monotonic syscall/zx.Sys_clock_get_monotonic
+func sys_clock_get_monotonic() int64
+
+//go:linkname sys_clock_get syscall/zx.Sys_clock_get
+//go:noescape
+func sys_clock_get(clock_id uint32, out *int64) int32
+
+//go:linkname sys_debuglog_create syscall/zx.Sys_debuglog_create
+//go:noescape
+func sys_debuglog_create(resource uint32, options uint32, out *uint32) int32
+
+//go:linkname sys_debuglog_write syscall/zx.Sys_debuglog_write
+func sys_debuglog_write(handle uint32, options uint32, buffer unsafe.Pointer, buffer_size uint) int32
+
+//go:linkname sys_nanosleep syscall/zx.Sys_nanosleep
+func sys_nanosleep(deadline int64) int32
+
+//go:linkname sys_process_exit syscall/zx.Sys_process_exit
+func sys_process_exit(retcode int64)
+
+//go:linkname zx_set_stdio_handle syscall/zx.set_stdio_handle
+func zx_set_stdio_handle(n int, h uint32, t uint32)
+
+//go:linkname zx_set_proc_handle syscall/zx.set_proc_handle
+func zx_set_proc_handle(h uint32)
+
+//go:linkname zx_get_proc_handle syscall/zx.get_proc_handle
+func zx_get_proc_handle() uint32
+
+//go:linkname zx_set_vmar_root syscall/zx.set_vmar_root
+func zx_set_vmar_root(h uint32)
+
+//go:linkname zx_set_namespace syscall/zx.set_namespace
+func zx_set_namespace(m map[string]uint32)
+
+type mOS struct {
+	thread uintptr
+}
+
+type sigset struct{}
+
+//go:nosplit
+func getRandomData(r []byte) {
+	if len(r) == 0 {
+		return
+	}
+	sys_cprng_draw(unsafe.Pointer(&r[0]), uint(len(r)))
+}
+
+//go:nosplit
+func futexsleep(addr *uint32, val uint32, ns int64) {
+	deadline := sys_deadline_after(ns)
+	if ns < 0 {
+		deadline = nsecInf
+	}
+	sys_futex_wait((*int32)(unsafe.Pointer(addr)), int32(val), 0, deadline)
+}
+
+//go:nosplit
+func futexwakeup(addr *uint32, cnt uint32) {
+	sys_futex_wake((*int32)(unsafe.Pointer(addr)), cnt)
+}
+
+// cgocallm0 calls a C function on the current stack.
+//
+// It is intended for use inside functions like osinit that run
+// before mstart directly on an OS thread stack.
+//
+// If in doubt, do not use.
+func cgocallm0(fn, arg unsafe.Pointer)
+
+// exceptionInfo is defined in zircon/syscalls/exception.h.
+type exceptionInfo struct {
+	pid           uint64
+	tid           uint64
+	exceptionType uint32
+	padding       [4]uint8
+}
+
+// watchexceptions is called when pprof CPU tracing is enabled. It runs without
+// a p, hence nowritebarrierrec.
+//
+//go:nosplit
+//go:nowritebarrierrec
+func watchexceptions() {
+	procHandle := zx_get_proc_handle()
+	var exceptionChannel uint32
+	if status := vdsoCall_zx_task_create_exception_channel(procHandle, 0, unsafe.Pointer(&exceptionChannel)); status != ZX_OK {
+		println("failed to create exception channel", status)
+		exit(2)
+	}
+	for {
+
+		var observed uint32
+		if status := fake_m_object_wait_one(exceptionChannel, ZX_CHANNEL_READABLE, ZX_TIME_INFINITE, &observed); status != ZX_OK {
+			println("failed to wait on exception channel", status)
+			exit(2)
+		}
+
+		var info exceptionInfo
+		var exceptionHandle uint32
+		var actualBytes, actualHandles uint32
+		if status := vdsoCall_zx_channel_read(
+			exceptionChannel,
+			0,
+			unsafe.Pointer(&info),
+			unsafe.Pointer(&exceptionHandle),
+			uint32(unsafe.Sizeof(info)),
+			1,
+			unsafe.Pointer(&actualBytes),
+			unsafe.Pointer(&actualHandles),
+		); status != ZX_OK {
+			println("failed to read from exception channel", status)
+			exit(2)
+		}
+
+		switch info.exceptionType {
+		// A fatal exception occurred, attempt to push a panic into the
+		// offending thread.
+		case ZX_EXCP_FATAL_PAGE_FAULT, ZX_EXCP_UNALIGNED_ACCESS, ZX_EXCP_UNDEFINED_INSTRUCTION:
+			var thread uint32
+			if status := vdsoCall_zx_exception_get_thread(exceptionHandle, unsafe.Pointer(&thread)); status != ZX_OK {
+				println("failed to get exception thread", status)
+				exit(2)
+			}
+
+			var ctx sigctxt
+			if status := vdsoCall_zx_thread_read_state(
+				thread,
+				ZX_THREAD_STATE_GENERAL_REGS,
+				unsafe.Pointer(&ctx.regs),
+				uint(unsafe.Sizeof(ctx.regs)),
+			); status != ZX_OK {
+				println("failed to read thread state", status)
+				exit(2)
+			}
+
+			// Prepare a panic, we'll call sigpanic on the dead thread.
+			ctx.prepareExceptionPanic()
+			if status := vdsoCall_zx_thread_write_state(
+				thread,
+				ZX_THREAD_STATE_GENERAL_REGS,
+				unsafe.Pointer(&ctx.regs),
+				uint(unsafe.Sizeof(ctx.regs)),
+			); status != ZX_OK {
+				println("failed to recover thread state on OS exception")
+				ctx.traceback()
+				exit(2)
+			}
+			handled := ZX_EXCEPTION_STATE_HANDLED
+			if status := vdsoCall_zx_object_set_property(
+				exceptionHandle,
+				ZX_PROP_EXCEPTION_STATE,
+				unsafe.Pointer(&handled),
+				uint(unsafe.Sizeof(handled)),
+			); status != ZX_OK {
+				println("failed to mark OS exception as handled")
+				ctx.traceback()
+				exit(2)
+			}
+
+			// Close the thread handle, we don't need it anymore, and we don't really
+			// care if it succeeds.
+			_ = vdsoCall_zx_handle_close(thread)
+			if status := vdsoCall_zx_handle_close(exceptionHandle); status != ZX_OK {
+				println("failed to close exception handle")
+				ctx.traceback()
+				exit(2)
+			}
+		default:
+			// We're not handling this exception, just close the handle.
+			vdsoCall_zx_handle_close(exceptionHandle)
+		}
+	}
+}
+
+func osinit() {
+	if _cgo_get_initial_handles != nil {
+		cgocallm0(_cgo_get_initial_handles, unsafe.Pointer(&fdioHandles))
+		for i := 0; i < 3; i = i + 1 {
+			zx_set_stdio_handle(i, fdioHandles.stdioClones[i], fdioHandles.stdioCloneTypes[i])
+		}
+		zx_set_proc_handle(fdioHandles.processSelf)
+		zx_set_vmar_root(fdioHandles.vmarRootSelf)
+	} else {
+		println("runtime: fuchsia requires cgo")
+		exit(2)
+	}
+
+	ncpu = int32(sys_system_get_num_cpus())
+	physPageSize = 4096
+}
+
+func parseRootNS() {
+	if fdioHandles.rootNSNumHandles > 0 {
+		const maxHandleCount = 1 << 20 // arbitrary
+		paths := (*(*[maxHandleCount]*byte)(unsafe.Pointer(fdioHandles.rootNSPaths)))[:fdioHandles.rootNSNumHandles]
+		handles := (*(*[maxHandleCount]uint32)(unsafe.Pointer(fdioHandles.rootNSHandles)))[:fdioHandles.rootNSNumHandles]
+		m := make(map[string]uint32)
+		for i, p := range paths {
+			m[gostring(p)] = handles[i]
+		}
+
+		zx_set_namespace(m)
+	}
+}
+
+// Filled in by runtime/cgo when linked into binary.
+var (
+	_cgo_get_initial_handles    unsafe.Pointer
+	_cgo_get_thread_self_handle unsafe.Pointer
+)
+
+//go:nosplit
+func minit() {
+	var h uint32
+	asmcgocall(_cgo_get_thread_self_handle, unsafe.Pointer(&h))
+	atomic.Storeuintptr(&getg().m.thread, uintptr(h))
+}
+
+//go:nosplit
+func unminit() {
+	// TODO
+}
+
+var exceptionError = error(errorString("OS exception"))
+
+func (c *sigctxt) traceback() {
+	traceback(c.regs.rPC(), c.regs.rSP(), c.regs.rLR(), getg())
+}
+
+func sigpanic() {
+	g := getg()
+	if !canpanic(g) {
+		throw("encountered OS exception")
+	}
+	panicCheck2(exceptionError.Error())
+	panic(exceptionError)
+}
+
+func mpreinit(mp *m) {
+	// TODO
+}
+
+//go:nosplit
+func msigsave(mp *m) {
+	// TODO
+}
+
+//go:nosplit
+func msigrestore(sigmask sigset) {
+	// TODO
+}
+
+func initsig(preinit bool) {
+	// We can't call newm if this is preinit.
+	if !preinit {
+		newm(watchexceptions, nil, -1)
+	}
+}
+
+//go:nosplit
+//go:nowritebarrierrec
+func libpreinit() {
+	initsig(true)
+}
+
+//go:nosplit
+func sigblock() {
+	// TODO
+}
+
+func sigenable(sig uint32) {
+	// TODO
+}
+
+func sigdisable(sig uint32) {
+	// TODO
+}
+
+func sigignore(sig uint32) {
+	// TODO
+}
+
+func crash() {
+	*(*int32)(nil) = 0
+}
+
+func threadinit(mp *m)
+
+var gothreadname = []byte("gothread")
+
+//go:nowritebarrier
+func newosproc(mp *m) {
+	stk := unsafe.Pointer(mp.g0.stack.hi)
+	p := uint32(0) // TODO: only works due to temporary hack in zircon
+	var h uint32
+	status := sys_thread_create(p, &gothreadname[0], uint(len(gothreadname)), 0, &h)
+	if status < 0 {
+		println("runtime: newosproc sys_thread_create failed:", h)
+		exit(2)
+	}
+
+	mp.thread = uintptr(h)
+
+	status = sys_thread_start(h, unsafe.Pointer(funcPC(threadinit)), stk, uintptr(unsafe.Pointer(mp)), 0)
+	if status < 0 {
+		println("runtime: newosproc sys_thread_start failed:", h)
+		exit(2)
+	}
+}
+
+//go:nosplit
+func newosproc0(stacksize uintptr, fn unsafe.Pointer) {
+	stack := sysAlloc(stacksize, &memstats.stacks_sys)
+	if stack == nil {
+		write(2, unsafe.Pointer(&failallocatestack[0]), int32(len(failallocatestack)))
+		exit(1)
+	}
+
+	p := uint32(0) // TODO: only works due to temporary hack in zircon
+	var h uint32
+	status := sys_thread_create(p, &gothreadname[0], uint(len(gothreadname)), 0, &h)
+	if status < 0 {
+		write(2, unsafe.Pointer(&failthreadcreate[0]), int32(len(failthreadcreate)))
+		exit(1)
+
+	}
+
+	status = sys_thread_start(h, fn, unsafe.Pointer(uintptr(stack)+stacksize), 0, 0)
+	if status < 0 {
+		write(2, unsafe.Pointer(&failthreadstart[0]), int32(len(failthreadstart)))
+		exit(1)
+	}
+}
+
+var failallocatestack = []byte("runtime: failed to allocate stack for the new OS thread\n")
+var failthreadcreate = []byte("runtime: failed to create new OS thread\n")
+var failthreadstart = []byte("runtime: failed to start new OS thread\n")
+
+type zx_proc_args struct {
+	protocol        uint32
+	version         uint32
+	handle_info_off uint32
+	args_off        uint32
+	args_num        uint32
+}
+
+type zx_proc_info struct {
+	magic         uint32
+	version       uint32
+	next_tls_slot uint32
+	proc_args     *zx_proc_args
+	handle        *uint32
+	handle_info   *uint32
+	handle_count  int32
+	argv          **byte
+	argc          int32
+}
+
+type zx_tls_root struct {
+	self     *zx_tls_root
+	proc     *zx_proc_info
+	magic    uint32
+	flags    uint16
+	maxslots uint16
+	slots    [8]uintptr // has length maxslots
+}
+
+func resetcpuprofiler(hz int32) {
+	// TODO
+}
+
+// fdio_init matches a Go struct of the same name in gcc_fdio.c.
+type fdio_init struct {
+	stdioClones          [3]uint32
+	stdioCloneNumHandles [3]uint32
+	stdioCloneTypes      [3]uint32
+	processSelf          uint32
+	vmarRootSelf         uint32
+	envlen               int32
+	environ              **byte
+	_                    [4]byte
+	rootNSNumHandles     int32
+	rootNSHandles        *uint32
+	rootNSPaths          **byte
+}
+
+var fdioHandles fdio_init
+
+func goenvs() {
+	if _cgo_get_initial_handles != nil {
+		const maxEnvSize = 1 << 20 // arbitrary
+		envp := (*(*[maxEnvSize]*byte)(unsafe.Pointer(fdioHandles.environ)))[:fdioHandles.envlen]
+		envs = make([]string, len(envp))
+		for i, e := range envp {
+			envs[i] = gostring(e)
+		}
+		// TODO: find a better place to call this
+		parseRootNS()
+	} else {
+		// TODO: implement cgo-less init
+		println("runtime: no fuchsia process handle without cgo yet")
+		exit(2)
+	}
+}
+
+const _NSIG = 65 // TODO
+
+const (
+	ZX_CLOCK_MONOTONIC           = 0
+	ZX_HANDLE_INVALID            = 0
+	ZX_INFO_THREAD               = uint32(10)
+	ZX_OK                        = int32(0)
+	ZX_THREAD_STATE_GENERAL_REGS = uint32(0)
+	ZX_THREAD_STATE_NEW          = uint32(0)
+	ZX_THREAD_SUSPENDED          = uint32(1 << 5)
+	ZX_THREAD_TERMINATED         = uint32(1 << 3)
+	ZX_TIME_INFINITE             = int64(^uint64(1 << 63))
+	ZX_TIMER_SIGNALED            = uint32(1 << 3)
+	ZX_TIMER_SLACK_EARLY         = 1
+	ZX_CHANNEL_READABLE          = uint32(1 << 0)
+	ZX_EXCEPTION_STATE_HANDLED   = uint32(1)
+	ZX_PROP_EXCEPTION_STATE      = uint32(16)
+	// Exception types that are handled by the runtime. Defined in
+	// zircon/syscall/exception.h
+	ZX_EXCP_FATAL_PAGE_FAULT      = uint32(0x108)
+	ZX_EXCP_UNDEFINED_INSTRUCTION = uint32(0x208)
+	ZX_EXCP_UNALIGNED_ACCESS      = uint32(0x508)
+)
+
+//go:nosplit
+func nanotime1() int64 {
+	return sys_clock_get_monotonic()
+}
+
+//go:linkname time_now time.now
+//go:nosplit
+func time_now() (sec int64, nsec int32, mono int64) {
+	const ZX_CLOCK_UTC = 1
+	var x int64
+	sys_clock_get(ZX_CLOCK_UTC, &x)
+	return x / 1e9, int32(x % 1e9), nanotime()
+}
+
+func unixnanotime() int64 {
+	return nanotime()
+}
+
+// #define LOGBUF_MAX (ZX_LOG_RECORD_MAX - sizeof(zx_log_record_t))
+const logBufMax = 224
+
+var logger uint32
+var logBufferArray [logBufMax]byte
+var logBufferN int
+
+//go:nosplit
+func write1(fd uintptr, buf unsafe.Pointer, n int32) int32 {
+	if fd != 1 && fd != 2 {
+		panic("runtime.write(): can not write to non-log fd")
+	}
+
+	// This initialization mechanism is not thread-safe, but if the only calls to 'write' with
+	// these file descriptors come from print, they will already be serialized by a lock in
+	// print's implementation.
+	if logger <= 0 {
+		sys_debuglog_create(0, 0, &logger)
+		logBufferN = 0
+	}
+	// Ideally this should panic, but that would go down "blind", which is arguably worse.
+	if logger <= 0 {
+		return -1
+	}
+
+	for i := int32(0); i < n; i++ {
+		c := *(*byte)(unsafe.Pointer(uintptr(buf) + uintptr(i)))
+
+		if c == '\n' {
+			sys_debuglog_write(logger, 0, unsafe.Pointer(&logBufferArray[0]), uint(logBufferN))
+			logBufferN = 0
+			continue
+		}
+
+		if c < ' ' {
+			continue
+		}
+
+		logBufferArray[logBufferN] = c
+		logBufferN++
+
+		if logBufferN == len(logBufferArray) {
+			sys_debuglog_write(logger, 0, unsafe.Pointer(&logBufferArray[0]), uint(logBufferN))
+			logBufferN = 0
+		}
+	}
+
+	return n
+}
+
+//go:nosplit
+func exit(code int32) {
+	sys_process_exit(int64(code))
+}
+
+//go:nosplit
+func usleep(usec uint32) {
+	sys_nanosleep(sys_deadline_after(int64(usec * 1000)))
+}
+
+func signame(sig uint32) string {
+	return "unknown_sig" // TODO
+}
+
+// zircon_mktls
+//go:nosplit
+func zircon_mktls() {
+	// TODO
+}
+
+//go:nosplit
+func zircon_settls(val uintptr) {
+	// TODO: should call zx_set_object_property with property ZX_PROP_REGISTER_FS in amd64 or
+	// ZX_PROP_REGISTER_CP15 on arm.
+}
+
+//go:linkname os_sigpipe os.sigpipe
+func os_sigpipe() {
+	// TODO
+}
+
+// gsignalStack is unused on fuchsia
+type gsignalStack struct{}
+
+const preemptMSupported = false
+
+func preemptM(mp *m) {
+	// No threads, so nothing to do.
+}
+
+var (
+	profTimer uint32 // timer handle
+	profHz    = ZX_TIME_INFINITE
+)
+
+type zxCpuSet struct {
+	mask [16]uint32
+}
+
+type zxInfoThread struct {
+	state                 uint32
+	waitExceptionPortType uint32
+	affinityMask          zxCpuSet
+}
+
+//go:noescape
+//go:nosplit
+func fake_m_object_wait_one(handle uint32, signals uint32, deadline int64, observed *uint32) int32
+
+func profilem(mp *m, thread uint32) {
+	// Ignore nascent threads.
+	var observed uint32
+	var info zxInfoThread
+	var actualSize uint64
+	var availSize uint64
+	if status := vdsoCall_zx_object_get_info(thread, ZX_INFO_THREAD, unsafe.Pointer(&info), uint(unsafe.Sizeof(info)), unsafe.Pointer(&actualSize), unsafe.Pointer(&availSize)); status != ZX_OK {
+		return
+	}
+	if info.state == ZX_THREAD_STATE_NEW {
+		return
+	}
+
+	// Wait for the thread to be suspended.
+	if status := fake_m_object_wait_one(thread, ZX_THREAD_SUSPENDED|ZX_THREAD_TERMINATED, ZX_TIME_INFINITE, &observed); status != ZX_OK {
+		return
+	}
+
+	// Ignore threads that were terminated as a result of suspension.
+	if observed&ZX_THREAD_TERMINATED == ZX_THREAD_TERMINATED {
+		return
+	}
+
+	var r generalRegs
+	if status := vdsoCall_zx_thread_read_state(thread, ZX_THREAD_STATE_GENERAL_REGS, unsafe.Pointer(&r), uint(unsafe.Sizeof(r))); status != ZX_OK {
+		return
+	}
+
+	if mp.curg != nil {
+		sigprof(r.rPC(), r.rSP(), r.rLR(), mp.curg, mp)
+	} else {
+		sigprofNonGoPC(r.rPC())
+	}
+}
+
+// profileLoop is called when pprof CPU tracing is enabled. It runs without a p, hence nowritebarrierrec.
+//
+//go:nosplit
+//go:nowritebarrierrec
+func profileLoop() {
+	me := getg().m
+	for {
+		var observed uint32
+		if status := fake_m_object_wait_one(profTimer, ZX_TIMER_SIGNALED, ZX_TIME_INFINITE, &observed); status != ZX_OK {
+			continue
+		}
+
+		// Scan over all threads and suspend them, then trace. Ideally, we'd scan over
+		// all of them and give them a chance to suspend before this, but I don't want
+		// to deal with allocation here.
+		first := (*m)(atomic.Loadp(unsafe.Pointer(&allm)))
+		for mp := first; mp != nil; mp = mp.alllink {
+			thread := uint32(atomic.Loaduintptr(&mp.thread))
+			// Do not profile threads blocked on Notes (this includes idle worker threads, idle timer thread,
+			// idle heap scavenger, etc.). Do not profile this thread.
+			if thread == ZX_HANDLE_INVALID || mp.profilehz == 0 || mp.blocked || mp == me {
+				continue
+			}
+
+			var token uint32
+			if status := vdsoCall_zx_task_suspend_token(thread, unsafe.Pointer(&token)); status == ZX_OK {
+				profilem(mp, thread)
+			}
+			vdsoCall_zx_handle_close(token)
+
+		}
+
+		due := vdsoCall_zx_deadline_after(profHz)
+		if status := vdsoCall_zx_timer_set(profTimer, due, ZX_TIMER_SLACK_EARLY); status != ZX_OK {
+			// TODO: what do?
+			return
+		}
+	}
+}
+
+// profileloop is defined in sys_fuchsia_{amd,arm}64.s
+func profileloop()
+
+func setProcessCPUProfiler(hz int32) {
+	// This function is entered in the critical section guarded by
+	// prof.signalLock in proc.go and is thus safe to assume the profiler's
+	// timer is created atomically.
+	if profTimer == ZX_HANDLE_INVALID {
+		if status := vdsoCall_zx_timer_create(ZX_TIMER_SLACK_EARLY, ZX_CLOCK_MONOTONIC, unsafe.Pointer(&profTimer)); status != ZX_OK {
+			// TODO: what do?
+			return
+		}
+
+		newm(profileLoop, nil, -1)
+	}
+}
+
+func setThreadCPUProfiler(hz int32) {
+	// Don't do anything if we don't have a timer yet.
+	if profTimer == ZX_HANDLE_INVALID {
+		return
+	}
+
+	atomic.Store((*uint32)(unsafe.Pointer(&getg().m.profilehz)), uint32(hz))
+
+	if hz > 0 {
+		ns := int64(int64(1000000000) / int64(hz))
+		// Bound tracing frequency to microseconds. This is likely
+		// already well above the granularity traces can actually
+		// provide.
+		if ns < 1000 {
+			ns = 1000
+		}
+
+		profHz = ns
+		due := vdsoCall_zx_deadline_after(ns)
+		if status := vdsoCall_zx_timer_set(profTimer, due, ZX_TIMER_SLACK_EARLY); status != ZX_OK {
+			// TODO: what do?
+			return
+		}
+	} else {
+		if status := vdsoCall_zx_timer_cancel(profTimer); status != ZX_OK {
+			return
+		}
+	}
+}
+
+func exitThread(wait *uint32) {}
+
+//go:nosplit
+//go:nowritebarrierrec
+func clearSignalHandlers() {}
diff --git a/src/runtime/os_fuchsia_arm64.go b/src/runtime/os_fuchsia_arm64.go
new file mode 100644
index 0000000..e5b021a
--- /dev/null
+++ b/src/runtime/os_fuchsia_arm64.go
@@ -0,0 +1,5 @@
+// Copyright 2016 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 runtime
diff --git a/src/runtime/pprof/pprof_test.go b/src/runtime/pprof/pprof_test.go
index 7149bfb..ef35b41 100644
--- a/src/runtime/pprof/pprof_test.go
+++ b/src/runtime/pprof/pprof_test.go
@@ -92,6 +92,7 @@
 }
 
 func TestCPUProfileMultithreaded(t *testing.T) {
+	t.Skip("TODO(https://github.com/golang/go/issues/40823): unskip when the crash is fixed")
 	defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(2))
 	testCPUProfile(t, stackContains, []string{"runtime/pprof.cpuHog1", "runtime/pprof.cpuHog2"}, avoidFunctions(), func(dur time.Duration) {
 		c := make(chan int)
@@ -456,6 +457,10 @@
 		// Use smaller size for Android to avoid crash.
 		heap = 100 << 20
 	}
+	if runtime.GOOS == "fuchsia" {
+		// Use smaller heap for Fuchsia to avoid crash.
+		heap = 100 << 20
+	}
 	if runtime.GOOS == "windows" && runtime.GOARCH == "arm" {
 		// Use smaller heap for Windows/ARM to avoid crash.
 		heap = 100 << 20
@@ -581,6 +586,10 @@
 }
 
 func TestMorestack(t *testing.T) {
+	if runtime.GOOS == "fuchsia" {
+		t.Skip("skipping on fuchsia")
+	}
+
 	testCPUProfile(t, stackContainsAll, []string{"runtime.newstack,runtime/pprof.growstack"}, avoidFunctions(), func(duration time.Duration) {
 		t := time.After(duration)
 		c := make(chan bool)
diff --git a/src/runtime/pprof/proto.go b/src/runtime/pprof/proto.go
index 8519af6..5e627a9 100644
--- a/src/runtime/pprof/proto.go
+++ b/src/runtime/pprof/proto.go
@@ -10,6 +10,7 @@
 	"fmt"
 	"io"
 	"io/ioutil"
+	"os"
 	"runtime"
 	"strconv"
 	"time"
@@ -407,6 +408,10 @@
 			// Even if stk was truncated due to the stack depth
 			// limit, expandFinalInlineFrame above has already
 			// fixed the truncation, ensuring it is long enough.
+			if len(l.pcs) > len(stk) {
+				// Temporary logging for golang.org/issues/40823
+				dumpState(l, stk)
+			}
 			stk = stk[len(l.pcs):]
 			continue
 		}
@@ -446,6 +451,16 @@
 	return locs
 }
 
+func dumpState(l locInfo, stk []uintptr) {
+	buf := new(bytes.Buffer)
+	buf.WriteString("stk:")
+	printStackRecord(buf, stk, true)
+	buf.WriteString("\n")
+	buf.WriteString("l.pcs:")
+	printStackRecord(buf, l.pcs, true)
+	fmt.Fprintln(os.Stderr, buf.String())
+}
+
 // pcDeck is a helper to detect a sequence of inlined functions from
 // a stack trace returned by the runtime.
 //
diff --git a/src/runtime/rt0_fuchsia_amd64.s b/src/runtime/rt0_fuchsia_amd64.s
new file mode 100644
index 0000000..8947cfe
--- /dev/null
+++ b/src/runtime/rt0_fuchsia_amd64.s
@@ -0,0 +1,14 @@
+// Copyright 2016 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 _rt0_amd64_fuchsia(SB),NOSPLIT,$-8
+	JMP	_rt0_amd64(SB)
+
+TEXT _rt0_amd64_fuchsia_lib(SB),NOSPLIT,$0
+	// musl doesn't provide argc/argv; see golang.org/issue/13492
+	MOVQ	$0, DI // argc
+	MOVQ	$0, SI // argv
+	JMP	_rt0_amd64_lib(SB)
diff --git a/src/runtime/rt0_fuchsia_arm64.s b/src/runtime/rt0_fuchsia_arm64.s
new file mode 100644
index 0000000..2df5fa1
--- /dev/null
+++ b/src/runtime/rt0_fuchsia_arm64.s
@@ -0,0 +1,92 @@
+// Copyright 2016 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 _rt0_arm64_fuchsia(SB),NOSPLIT,$-8
+	MOVD 0(RSP),  R0 // argc
+	ADD  $8, RSP, R1 // argv
+	BL   main(SB)
+
+TEXT main(SB),NOSPLIT,$-8
+	MOVD $runtime·rt0_go(SB), R2
+	BL   R2
+
+// When building with -buildmode=c-shared, this symbol is called when the shared
+// library is loaded.
+TEXT _rt0_arm64_fuchsia_lib(SB),NOSPLIT,$184
+	// Preserve callee-save registers.
+	MOVD R19, 24(RSP)
+	MOVD R20, 32(RSP)
+	MOVD R21, 40(RSP)
+	MOVD R22, 48(RSP)
+	MOVD R23, 56(RSP)
+	MOVD R24, 64(RSP)
+	MOVD R25, 72(RSP)
+	MOVD R26, 80(RSP)
+	MOVD R27, 88(RSP)
+	FMOVD F8, 96(RSP)
+	FMOVD F9, 104(RSP)
+	FMOVD F10, 112(RSP)
+	FMOVD F11, 120(RSP)
+	FMOVD F12, 128(RSP)
+	FMOVD F13, 136(RSP)
+	FMOVD F14, 144(RSP)
+	FMOVD F15, 152(RSP)
+	MOVD g, 160(RSP)
+
+	// Initialize g as null in case of using g later e.g. sigaction in cgo_sigaction.go
+	MOVD	ZR, g
+
+	// Synchronous initialization.
+	MOVD	$runtime·libpreinit(SB), R4
+	BL	(R4)
+
+	// Create a new thread to do the runtime initialization and return.
+	MOVD	_cgo_sys_thread_create(SB), R4
+	CMP	$0, R4
+	BEQ	nocgo
+	MOVD	$_rt0_arm64_fuchsia_lib_go(SB), R0
+	MOVD	$0, R1
+	SUB	$16, RSP		// reserve 16 bytes for sp-8 where fp may be saved.
+	BL	(R4)
+	ADD	$16, RSP
+	B	restore
+
+nocgo:
+	MOVD	$0x800000, R0                     // stacksize = 8192KB
+	MOVD	$_rt0_arm64_fuchsia_lib_go(SB), R1
+	MOVD	R0, 8(RSP)
+	MOVD	R1, 16(RSP)
+	MOVD	$runtime·newosproc0(SB),R4
+	BL	(R4)
+
+restore:
+	// Restore callee-save registers.
+	MOVD 24(RSP), R19
+	MOVD 32(RSP), R20
+	MOVD 40(RSP), R21
+	MOVD 48(RSP), R22
+	MOVD 56(RSP), R23
+	MOVD 64(RSP), R24
+	MOVD 72(RSP), R25
+	MOVD 80(RSP), R26
+	MOVD 88(RSP), R27
+	FMOVD 96(RSP), F8
+	FMOVD 104(RSP), F9
+	FMOVD 112(RSP), F10
+	FMOVD 120(RSP), F11
+	FMOVD 128(RSP), F12
+	FMOVD 136(RSP), F13
+	FMOVD 144(RSP), F14
+	FMOVD 152(RSP), F15
+	MOVD 160(RSP), g
+	RET
+
+TEXT _rt0_arm64_fuchsia_lib_go(SB),NOSPLIT,$0
+	// musl doesn't provide argc/argv; see golang.org/issue/13492
+	MOVD	$0, R0 // argc
+	MOVD	$0, R1 // argv
+	MOVD	$runtime·rt0_go(SB),R4
+	B       (R4)
diff --git a/src/runtime/signal_amd64.go b/src/runtime/signal_amd64.go
index 6ab1f75..1d22439 100644
--- a/src/runtime/signal_amd64.go
+++ b/src/runtime/signal_amd64.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // +build amd64
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build darwin dragonfly freebsd linux netbsd openbsd solaris fuchsia
 
 package runtime
 
diff --git a/src/runtime/signal_arm64.go b/src/runtime/signal_arm64.go
index 3c20139..8d2c3ac 100644
--- a/src/runtime/signal_arm64.go
+++ b/src/runtime/signal_arm64.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build darwin freebsd linux netbsd openbsd
+// +build darwin freebsd linux netbsd openbsd fuchsia
 
 package runtime
 
diff --git a/src/runtime/signal_fuchsia_amd64.go b/src/runtime/signal_fuchsia_amd64.go
new file mode 100644
index 0000000..fbec7f1
--- /dev/null
+++ b/src/runtime/signal_fuchsia_amd64.go
@@ -0,0 +1,57 @@
+// 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 runtime
+
+const (
+	// Bogus definitions to allow signal_amd64 to build.
+	_SIGFPE     = 0x1
+	_FPE_INTDIV = 0x01
+)
+
+type sigctxt struct {
+	regs generalRegs
+}
+
+func (c *sigctxt) rax() uint64 { return c.regs.rax }
+func (c *sigctxt) rbx() uint64 { return c.regs.rbx }
+func (c *sigctxt) rcx() uint64 { return c.regs.rcx }
+func (c *sigctxt) rdx() uint64 { return c.regs.rdx }
+func (c *sigctxt) rdi() uint64 { return c.regs.rdi }
+func (c *sigctxt) rsi() uint64 { return c.regs.rsi }
+func (c *sigctxt) rbp() uint64 { return c.regs.rbp }
+func (c *sigctxt) rsp() uint64 { return c.regs.rsp }
+func (c *sigctxt) r8() uint64  { return c.regs.r8 }
+func (c *sigctxt) r9() uint64  { return c.regs.r9 }
+func (c *sigctxt) r10() uint64 { return c.regs.r10 }
+func (c *sigctxt) r11() uint64 { return c.regs.r11 }
+func (c *sigctxt) r12() uint64 { return c.regs.r12 }
+func (c *sigctxt) r13() uint64 { return c.regs.r13 }
+func (c *sigctxt) r14() uint64 { return c.regs.r14 }
+func (c *sigctxt) r15() uint64 { return c.regs.r15 }
+
+//go:nosplit
+//go:nowritebarrierrec
+func (c *sigctxt) rip() uint64 { return c.regs.rip }
+
+func (c *sigctxt) rflags() uint64 { return c.regs.rflags }
+
+// TODO brunodalbo these only seem to be used to dump regs, what's the right
+// value here?
+func (c *sigctxt) cs() uint64      { return c.regs.fs_base }
+func (c *sigctxt) fs() uint64      { return c.regs.fs_base }
+func (c *sigctxt) gs() uint64      { return c.regs.fs_base }
+func (c *sigctxt) sigaddr() uint64 { return 0 }
+
+func (c *sigctxt) set_rip(x uint64) { c.regs.rip = x }
+func (c *sigctxt) set_rsp(x uint64) { c.regs.rsp = x }
+
+func (c *sigctxt) prepareExceptionPanic() {
+	// NOTE(brunodalbo) we're passing the wrong g into preparePanic here for
+	// simplicity. This is not entirely correct, as prepare panic wants the g
+	// from the panicking thread. It should be fine for amd64 though, as g is
+	// only used in preparePanic to improve the traceback in case we're in a cgo
+	// call.
+	c.preparePanic(0, getg())
+}
diff --git a/src/runtime/signal_fuchsia_arm64.go b/src/runtime/signal_fuchsia_arm64.go
new file mode 100644
index 0000000..e799cd9
--- /dev/null
+++ b/src/runtime/signal_fuchsia_arm64.go
@@ -0,0 +1,82 @@
+// 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 runtime
+
+// Needed for go:linkname.
+import _ "unsafe"
+
+type sigctxt struct {
+	regs generalRegs
+}
+
+func (c *sigctxt) r0() uint64  { return c.regs.r[0] }
+func (c *sigctxt) r1() uint64  { return c.regs.r[1] }
+func (c *sigctxt) r2() uint64  { return c.regs.r[2] }
+func (c *sigctxt) r3() uint64  { return c.regs.r[3] }
+func (c *sigctxt) r4() uint64  { return c.regs.r[4] }
+func (c *sigctxt) r5() uint64  { return c.regs.r[5] }
+func (c *sigctxt) r6() uint64  { return c.regs.r[6] }
+func (c *sigctxt) r7() uint64  { return c.regs.r[7] }
+func (c *sigctxt) r8() uint64  { return c.regs.r[8] }
+func (c *sigctxt) r9() uint64  { return c.regs.r[9] }
+func (c *sigctxt) r10() uint64 { return c.regs.r[10] }
+func (c *sigctxt) r11() uint64 { return c.regs.r[11] }
+func (c *sigctxt) r12() uint64 { return c.regs.r[12] }
+func (c *sigctxt) r13() uint64 { return c.regs.r[13] }
+func (c *sigctxt) r14() uint64 { return c.regs.r[14] }
+func (c *sigctxt) r15() uint64 { return c.regs.r[15] }
+func (c *sigctxt) r16() uint64 { return c.regs.r[16] }
+func (c *sigctxt) r17() uint64 { return c.regs.r[17] }
+func (c *sigctxt) r18() uint64 { return c.regs.r[18] }
+func (c *sigctxt) r19() uint64 { return c.regs.r[19] }
+func (c *sigctxt) r20() uint64 { return c.regs.r[20] }
+func (c *sigctxt) r21() uint64 { return c.regs.r[21] }
+func (c *sigctxt) r22() uint64 { return c.regs.r[22] }
+func (c *sigctxt) r23() uint64 { return c.regs.r[23] }
+func (c *sigctxt) r24() uint64 { return c.regs.r[24] }
+func (c *sigctxt) r25() uint64 { return c.regs.r[25] }
+func (c *sigctxt) r26() uint64 { return c.regs.r[26] }
+func (c *sigctxt) r27() uint64 { return c.regs.r[27] }
+func (c *sigctxt) r28() uint64 { return c.regs.r[28] }
+func (c *sigctxt) r29() uint64 { return c.regs.r[29] }
+func (c *sigctxt) lr() uint64  { return c.regs.lr }
+func (c *sigctxt) sp() uint64  { return c.regs.sp }
+
+//go:nosplit
+//go:nowritebarrierrec
+func (c *sigctxt) pc() uint64 { return c.regs.pc }
+
+// TODO brunodalbo these only seem to be used to dump regs, what's the right
+// value here?
+func (c *sigctxt) pstate() uint64  { return 0 }
+func (c *sigctxt) fault() uintptr  { return 0 }
+func (c *sigctxt) sigcode() uint64 { return 0 }
+func (c *sigctxt) sigaddr() uint64 { return 0 }
+
+func (c *sigctxt) set_pc(x uint64)  { c.regs.pc = x }
+func (c *sigctxt) set_sp(x uint64)  { c.regs.sp = x }
+func (c *sigctxt) set_lr(x uint64)  { c.regs.lr = x }
+func (c *sigctxt) set_r28(x uint64) { c.regs.r[28] = x }
+
+//go:linkname xx_panicmem xx_panicmem
+func xx_panicmem()
+
+func (c *sigctxt) prepareExceptionPanic() {
+	//	R1 - LR at moment of fault
+	//	R2 - PC at moment of fault
+	c.regs.r[1] = c.lr()
+	c.regs.r[2] = c.pc()
+	c.pushCall(funcPC(xx_panicmem), uintptr(c.pc()))
+}
+
+//go:nosplit
+//go:linkname setsigsegv
+func setsigsegv(pc uintptr) {
+	g := getg()
+	g.sig = 0
+	g.sigpc = pc
+	g.sigcode0 = 0
+	g.sigcode1 = 0 // TODO: emulate si_addr
+}
diff --git a/src/runtime/signal_fuchsia_arm64.s b/src/runtime/signal_fuchsia_arm64.s
new file mode 100644
index 0000000..8d88dbd
--- /dev/null
+++ b/src/runtime/signal_fuchsia_arm64.s
@@ -0,0 +1,59 @@
+// 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"
+
+// NOTE(brunodalbo): this is copied from cgo/signal_darwin_arm64 since the
+// SIGSEV handling is similar to what needs to happen in Fuchsia.
+
+// xx_panicmem is the entrypoint for SIGSEGV as intercepted via a
+// mach thread port as EXC_BAD_ACCESS. As the segfault may have happened
+// in C code, we first need to load_g then call xx_panicmem.
+//
+//	R1 - LR at moment of fault
+//	R2 - PC at moment of fault
+TEXT xx_panicmem(SB),NOSPLIT|NOFRAME,$0
+	// If in external C code, we need to load the g register.
+	BL  runtime·load_g(SB)
+	CMP $0, g
+	BNE ongothread
+
+	// On a foreign thread.
+	// TODO(crawshaw): call badsignal
+	MOVD.W $0, -16(RSP)
+	MOVW $139, R1
+	MOVW R1, 8(RSP)
+	B    runtime·exit(SB)
+
+ongothread:
+	// Trigger a SIGSEGV panic.
+	//
+	// The goal is to arrange the stack so it looks like the runtime
+	// function sigpanic was called from the PC that faulted. It has
+	// to be sigpanic, as the stack unwinding code in traceback.go
+	// looks explicitly for it.
+	//
+	// To do this we call into runtime·setsigsegv, which sets the
+	// appropriate state inside the g object. We give it the faulting
+	// PC on the stack, then put it in the LR before calling sigpanic.
+
+	// Build a 32-byte stack frame for us for this call.
+	// Saved LR (none available) is at the bottom,
+	// then the PC argument for setsigsegv,
+	// then a copy of the LR for us to restore.
+	MOVD.W $0, -16(RSP)
+	MOVD R1, 8(RSP)
+	MOVD R2, 16(RSP)
+	BL runtime·setsigsegv(SB)
+	MOVD 8(RSP), R1
+	MOVD 16(RSP), R2
+
+	// Build a 16-byte stack frame for the simulated
+	// call to sigpanic, by taking 16 bytes away from the
+	// 32-byte stack frame above.
+	// The saved LR in this frame is the LR at time of fault,
+	// and the LR on entry to sigpanic is the PC at time of fault.
+	MOVD.W R1, 16(RSP)
+	MOVD R2, R30
+	B runtime·sigpanic(SB)
diff --git a/src/runtime/stubs2.go b/src/runtime/stubs2.go
index 4a1a5cc..66599d4 100644
--- a/src/runtime/stubs2.go
+++ b/src/runtime/stubs2.go
@@ -7,6 +7,7 @@
 // +build !windows
 // +build !js
 // +build !darwin
+// +build !fuchsia
 // +build !aix
 
 package runtime
diff --git a/src/runtime/stubs3.go b/src/runtime/stubs3.go
index 95eecc7..f4930dd 100644
--- a/src/runtime/stubs3.go
+++ b/src/runtime/stubs3.go
@@ -6,6 +6,7 @@
 // +build !solaris
 // +build !freebsd
 // +build !darwin
+// +build !fuchsia
 // +build !aix
 
 package runtime
diff --git a/src/runtime/sys_fuchsia_amd64.s b/src/runtime/sys_fuchsia_amd64.s
new file mode 100644
index 0000000..285d079
--- /dev/null
+++ b/src/runtime/sys_fuchsia_amd64.s
@@ -0,0 +1,94 @@
+// Copyright 2018 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 "go_asm.h"
+#include "go_tls.h"
+#include "textflag.h"
+
+TEXT runtime·threadinit(SB),NOSPLIT,$0
+	MOVQ	DI, R8
+
+	MOVQ	m_g0(R8), DX		// g
+	MOVQ	R8, g_m(DX)
+
+	// Layout new m scheduler stack on os stack.
+	// TODO: which os stack? do we need to make a new vmo?
+	LEAQ	(-8*1024+104)(SP), BX
+	MOVQ	BX, g_stackguard0(DX)
+	MOVQ	BX, g_stackguard1(DX)
+	MOVQ	BX, (g_stack+stack_lo)(DX)
+	MOVQ	SP, (g_stack+stack_hi)(DX)
+
+	PUSHQ	R8
+
+	// Set up tls.
+	LEAQ	m_tls(R8), DI
+	CALL 	runtime·settls(SB)
+
+	get_tls(CX)
+
+	POPQ	R8
+	MOVQ	m_g0(R8), DX
+	MOVQ	DX, g(CX)
+
+	CLD				// convention is D is always left cleared
+	CALL	runtime·stackcheck(SB)	// clobbers AX,CX
+	CALL	runtime·mstart(SB)
+	// TODO CALL	syscall/zx·Sys_zircon_thread_exit(SB)
+	RET
+
+// Set TLS base to DI for the thread handle supplied in SI.
+TEXT runtime·settls(SB),NOSPLIT,$0
+	ADDQ	$8, DI		// ELF wants to use -8(FS)
+	PUSHQ	DI
+	LEAQ	0(SP), DX	// object_set_property takes a pointer to the base
+
+	SUBQ	$28, SP
+
+	MOVL	SI, 0(SP)	// thread handle
+	MOVL	$4, 4(SP)	// ZX_PROP_REGISTER_FS
+	MOVQ	DX, 8(SP)	// pointer to fs base
+	MOVQ	$8, 16(SP)	// size
+	CALL	runtime·vdsoCall_zx_object_set_property(SB)
+
+	// Stash return and restore SP
+	MOVL	24(SP), AX
+	ADDQ	$28, SP
+	TESTL	$0, AX
+	JZ	2(PC)
+	MOVL	$0xf1, 0xf1  // crash
+	POPQ	DI
+	RET
+
+TEXT ·cgocallm0(SB),NOSPLIT,$0-20
+	MOVQ fn+0(FP), AX
+	MOVQ arg+8(FP), DI
+
+	MOVQ SP, BP // BP is callee-save in the x86-64 ABI
+
+	ANDQ $~15, SP
+	CALL AX
+
+	MOVQ BP, SP
+	get_tls(CX)
+	RET
+
+// This implementation lives separately because the m/g for the profiler and
+// exception watcher are faked, and this causes issues with runtime.exitsyscall
+// not returning.
+TEXT runtime·fake_m_object_wait_one(SB),NOSPLIT,$0-28
+	MOVL handle+0(FP), DI
+	MOVL signals+4(FP), SI
+	MOVQ deadline+8(FP), DX
+	MOVQ observed+16(FP), CX
+	MOVQ vdso_zx_object_wait_one(SB), AX
+	CALL AX
+	MOVL AX, ret+24(FP)
+	RET
+
+TEXT runtime·osyield(SB),NOSPLIT,$0
+	MOVQ $0, DI
+	MOVQ vdso_zx_nanosleep(SB), AX
+	CALL AX
+	RET
diff --git a/src/runtime/sys_fuchsia_arm64.s b/src/runtime/sys_fuchsia_arm64.s
new file mode 100644
index 0000000..ce89ebe
--- /dev/null
+++ b/src/runtime/sys_fuchsia_arm64.s
@@ -0,0 +1,59 @@
+// Copyright 2016 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 "go_asm.h"
+#include "funcdata.h"
+#include "textflag.h"
+
+TEXT runtime·threadinit(SB),NOSPLIT,$0
+	// Layout new m scheduler stack on os stack.
+	// TODO: which os stack? do we need to make a new vmo?
+
+	MOVD	m_g0(R0), g
+	MOVD	R0, g_m(g)
+
+	MOVD RSP, R7
+	MOVD $(-64*1024)(R7), R0
+	MOVD R0, g_stackguard0(g)
+	MOVD R0, g_stackguard1(g)
+	MOVD R0, (g_stack+stack_lo)(g)
+	MOVD R7, (g_stack+stack_hi)(g)
+
+	BL	runtime·mstart(SB)
+	MOVD	$0, R0
+	MOVD	R0, (R0)	// boom
+	UNDEF
+
+TEXT ·cgocallm0(SB),NOSPLIT,$0-20
+	MOVD fn+0(FP), R1
+	MOVD arg+8(FP), R0
+
+	MOVD RSP, R19 // R19 is callee-save by C
+	MOVD g, R21   // R21 is callee-save by C
+	MOVD RSP, R7
+	ADD  $-32, R7, R7
+	AND  $~15, R7
+	MOVD R7, RSP  // align stack for C
+	BL   R1
+
+	MOVD R19, RSP // restore SP
+	MOVD R21, g   // restore g
+	RET
+
+// This implementation lives separately because the m/g for the profiler and
+// exception watcher are faked, and this causes issues with runtime.exitsyscall
+// not returning.
+TEXT runtime·fake_m_object_wait_one(SB),NOSPLIT,$0-28
+	MOVW handle+0(FP), R0
+	MOVW signals+4(FP), R1
+	MOVD deadline+8(FP), R2
+	MOVD observed+16(FP), R3
+	BL vdso_zx_object_wait_one(SB)
+	MOVW R0, ret+24(FP)
+	RET
+
+TEXT runtime·osyield(SB),NOSPLIT,$0
+	MOVD $0, R0
+	BL vdso_zx_nanosleep(SB)
+	RET
diff --git a/src/runtime/timestub.go b/src/runtime/timestub.go
index 459bf8e..c7a2bc4 100644
--- a/src/runtime/timestub.go
+++ b/src/runtime/timestub.go
@@ -6,6 +6,7 @@
 // indirectly, in terms of walltime and nanotime assembly.
 
 // +build !windows
+// +build !fuchsia
 
 package runtime
 
diff --git a/src/runtime/tls_arm64.h b/src/runtime/tls_arm64.h
index f60f4f6..08855c4 100644
--- a/src/runtime/tls_arm64.h
+++ b/src/runtime/tls_arm64.h
@@ -9,6 +9,9 @@
 #ifdef GOOS_linux
 #define TLS_linux
 #endif
+#ifdef GOOS_fuchsia
+#define TLS_linux
+#endif
 #ifdef TLS_linux
 #define TPIDR TPIDR_EL0
 #define MRS_TPIDR_R0 WORD $0xd53bd040 // MRS TPIDR_EL0, R0
diff --git a/src/runtime/vdso_elf.go b/src/runtime/vdso_elf.go
new file mode 100644
index 0000000..84af79d
--- /dev/null
+++ b/src/runtime/vdso_elf.go
@@ -0,0 +1,58 @@
+// Copyright 2012 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.
+//
+// +build fuchsia linux
+// +build 386 amd64 arm arm64 ppc64 ppc64le
+
+package runtime
+
+import "unsafe"
+
+const (
+	_AT_SYSINFO_EHDR = 33
+
+	_PT_LOAD    = 1 /* Loadable program segment */
+	_PT_DYNAMIC = 2 /* Dynamic linking information */
+
+	_PF_X = 1 /* Executable PH segment */
+
+	_DT_NULL     = 0          /* Marks end of dynamic section */
+	_DT_HASH     = 4          /* Dynamic symbol hash table */
+	_DT_STRTAB   = 5          /* Address of string table */
+	_DT_SYMTAB   = 6          /* Address of symbol table */
+	_DT_GNU_HASH = 0x6ffffef5 /* GNU-style dynamic symbol hash table */
+	_DT_VERSYM   = 0x6ffffff0
+	_DT_VERDEF   = 0x6ffffffc
+
+	_VER_FLG_BASE = 0x1 /* Version definition of file itself */
+
+	_SHN_UNDEF = 0 /* Undefined section */
+
+	_SHT_DYNSYM = 11 /* Dynamic linker symbol table */
+
+	_STT_FUNC = 2 /* Symbol is a code object */
+
+	_STT_NOTYPE = 0 /* Symbol type is not specified */
+
+	_STB_GLOBAL = 1 /* Global symbol */
+	_STB_WEAK   = 2 /* Weak symbol */
+
+	_EI_NIDENT = 16
+
+	// Maximum indices for the array types used when traversing the vDSO ELF structures.
+	// Computed from architecture-specific max provided by vdso_linux_*.go
+	vdsoSymTabSize     = vdsoArrayMax / unsafe.Sizeof(elfSym{})
+	vdsoDynSize        = vdsoArrayMax / unsafe.Sizeof(elfDyn{})
+	vdsoSymStringsSize = vdsoArrayMax     // byte
+	vdsoVerSymSize     = vdsoArrayMax / 2 // uint16
+	vdsoHashSize       = vdsoArrayMax / 4 // uint32
+
+	// vdsoBloomSizeScale is a scaling factor for gnuhash tables which are uint32 indexed,
+	// but contain uintptrs
+	vdsoBloomSizeScale = unsafe.Sizeof(uintptr(0)) / 4 // uint32
+)
+
+/* How to extract and insert information held in the st_info field.  */
+func _ELF_ST_BIND(val byte) byte { return val >> 4 }
+func _ELF_ST_TYPE(val byte) byte { return val & 0xf }
diff --git a/src/runtime/vdso_elf64.go b/src/runtime/vdso_elf64.go
index 6ded9d6..b3ce61d 100644
--- a/src/runtime/vdso_elf64.go
+++ b/src/runtime/vdso_elf64.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build linux
+// +build fuchsia linux
 // +build amd64 arm64 mips64 mips64le ppc64 ppc64le
 
 package runtime
diff --git a/src/runtime/vdso_fuchsia.go b/src/runtime/vdso_fuchsia.go
new file mode 100644
index 0000000..9e4c7f3
--- /dev/null
+++ b/src/runtime/vdso_fuchsia.go
@@ -0,0 +1,160 @@
+// Copyright 2012 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 runtime
+
+import "unsafe"
+
+// Look up symbols in the Fuchsia vDSO.
+//
+// When processes are spawned in Fuchsia, they are provided with a handle to a channel
+// and a pointer to where the vDSO is loaded. Syscalls may never be called directly;
+// on syscall entry, the kernel checks to see that the syscall was entered from the
+// vDSO. Because reading from the channel requires performing a syscall, we must
+// resolve symbols from the vDSO first.
+//
+// This is only performed when not using cgo. When a Go binary is built with cgo, libc
+// handles all of this.
+
+type vdsoSymbolKey struct {
+	name    string
+	gnuHash uint32
+	ptr     *uintptr
+}
+
+type vdsoInfo struct {
+	/* Load information */
+	loadAddr uintptr
+	loadBase uintptr /* loadAddr + p_vaddr */
+
+	/* Symbol table */
+	symtab     *[vdsoSymTabSize]elfSym
+	symstrings *[vdsoSymStringsSize]byte
+	chain      []uint32
+	bucket     []uint32
+	symOff     uint32
+	nBuckets   uint32
+}
+
+var (
+	vdsoLoadBase uintptr
+	vdsoMemSize  uintptr
+)
+
+// see vdso_keys_fuchsia.go for vdsoSymbolKeys[] and vdso*Sym vars
+
+func vdsoInit(info *vdsoInfo, hdr *elfEhdr) {
+	info.loadAddr = uintptr(unsafe.Pointer(hdr))
+
+	pt := unsafe.Pointer(info.loadAddr + uintptr(hdr.e_phoff))
+
+	// We need two things from the segment table: the load offset
+	// and the dynamic table.
+	var foundVaddr bool
+	var dyn *[vdsoDynSize]elfDyn
+	for i := uint16(0); i < hdr.e_phnum; i++ {
+		pt := (*elfPhdr)(add(pt, uintptr(i)*unsafe.Sizeof(elfPhdr{})))
+		switch pt.p_type {
+		case _PT_LOAD:
+			if !foundVaddr && pt.p_flags&_PF_X == _PF_X {
+				foundVaddr = true
+				info.loadBase = info.loadAddr + uintptr(pt.p_vaddr)
+				vdsoLoadBase = info.loadBase
+				vdsoMemSize = uintptr(pt.p_memsz)
+			}
+
+		case _PT_DYNAMIC:
+			dyn = (*[vdsoDynSize]elfDyn)(unsafe.Pointer(info.loadAddr + uintptr(pt.p_vaddr)))
+		}
+	}
+
+	if !foundVaddr || dyn == nil {
+		crash()
+	}
+
+	// Fish out the useful bits of the dynamic table.
+	var gnuhash *[vdsoHashSize]uint32
+	info.symstrings = nil
+	info.symtab = nil
+	for i := 0; dyn[i].d_tag != _DT_NULL; i++ {
+		dt := &dyn[i]
+		p := info.loadAddr + uintptr(dt.d_val)
+		switch dt.d_tag {
+		case _DT_STRTAB:
+			info.symstrings = (*[vdsoSymStringsSize]byte)(unsafe.Pointer(p))
+		case _DT_SYMTAB:
+			info.symtab = (*[vdsoSymTabSize]elfSym)(unsafe.Pointer(p))
+		case _DT_GNU_HASH:
+			gnuhash = (*[vdsoHashSize]uint32)(unsafe.Pointer(p))
+		}
+	}
+
+	if info.symstrings == nil || info.symtab == nil || gnuhash == nil {
+		crash()
+	}
+
+	// Parse the GNU hash table header.
+	info.nBuckets = gnuhash[0]
+	info.symOff = gnuhash[1]
+	bloomSize := gnuhash[2]
+	info.bucket = gnuhash[4+bloomSize*uint32(vdsoBloomSizeScale):][:info.nBuckets]
+	info.chain = gnuhash[4+bloomSize*uint32(vdsoBloomSizeScale)+info.nBuckets:]
+}
+
+func vdsoResolveSymbols(info *vdsoInfo) {
+	// Loop over the keys we wish to resolve and assign the symbol's offset to the
+	// pointer in the key table. We assume that all symbols we want to resolve
+	// exist, and crash if we are unable to resolve any of them.
+	for _, k := range vdsoSymbolKeys {
+		symIndex := info.bucket[k.gnuHash%info.nBuckets]
+
+		// Anything less than info.symOff is e.g. STN_UNDEF and will not be
+		// resolvable. Since that means we wouldn't be able to resolve this
+		// symbol we definitely need, crash.
+		if symIndex < info.symOff {
+			crash()
+		}
+
+		// For each symbol in this bucket, compare hashes and the name. If the
+		// symbol is not found, crash.
+		for ; ; symIndex++ {
+			hash := info.chain[symIndex-info.symOff]
+			sym := &info.symtab[symIndex]
+			if hash|1 == k.gnuHash|1 && k.name == gostringnocopy(&info.symstrings[sym.st_name]) {
+				typ := _ELF_ST_TYPE(sym.st_info)
+				bind := _ELF_ST_BIND(sym.st_info)
+				// If this isn't a function, doesn't have the appropriate binding, or
+				// has an undefined index, crash.
+				if typ != _STT_FUNC || (bind != _STB_GLOBAL && bind != _STB_WEAK) || sym.st_shndx == _SHN_UNDEF {
+					crash()
+				}
+
+				// We've found our symbol, assign its address and continue on to the
+				// next symbol.
+				*k.ptr = info.loadAddr + uintptr(sym.st_value)
+				break
+			}
+
+			if hash&1 != 0 {
+				// We made it to the end of this chain without finding
+				// our symbol. We won't find it. Crash.
+				crash()
+			}
+		}
+	}
+}
+
+func loadVDSO(val uintptr) {
+	var info vdsoInfo
+	// TODO(dhobsd): rsc says in vdso_linux.go that the compiler thinks info
+	// escapes. Remove/fix/investigate this comment at some point.
+	info1 := (*vdsoInfo)(noescape(unsafe.Pointer(&info)))
+	vdsoInit(info1, (*elfEhdr)(unsafe.Pointer(val)))
+	vdsoResolveSymbols(info1)
+}
+
+// inVDSOPage returns whether an observed PC falls within the VDSO mapping.
+func inVDSOPage(pc uintptr) bool {
+	return pc >= vdsoLoadBase && pc < vdsoLoadBase+vdsoMemSize
+}
diff --git a/src/runtime/vdso_in_none.go b/src/runtime/vdso_in_none.go
index 7f4019c..6093b9c 100644
--- a/src/runtime/vdso_in_none.go
+++ b/src/runtime/vdso_in_none.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build linux,!386,!amd64,!arm,!arm64,!mips64,!mips64le,!ppc64,!ppc64le !linux
+// +build linux,!386,!amd64,!arm,!arm64,!mips64,!mips64le,!ppc64,!ppc64le !fuchsia,!linux
 
 package runtime
 
diff --git a/src/runtime/vdso_keys_fuchsia.go b/src/runtime/vdso_keys_fuchsia.go
new file mode 100644
index 0000000..d7856f4
--- /dev/null
+++ b/src/runtime/vdso_keys_fuchsia.go
@@ -0,0 +1,1471 @@
+// Copyright 2019 The Fuchsia Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// WARNING: THIS FILE IS MACHINE GENERATED BY //tools/kazoo. DO NOT EDIT.
+
+package runtime
+
+import "unsafe"
+
+const (
+	// vdsoArrayMax is the byte-size of a maximally sized array on this architecture.
+	// See cmd/compile/internal/amd64/galign.go arch.MAXWIDTH initialization.
+	vdsoArrayMax = 1<<50 - 1
+)
+
+var vdsoSymbolKeys = []vdsoSymbolKey{
+	{"_zx_bti_create", 0x7833987, &vdso_zx_bti_create},
+	{"_zx_bti_pin", 0x2aa0e6da, &vdso_zx_bti_pin},
+	{"_zx_bti_release_quarantine", 0x441c1c6b, &vdso_zx_bti_release_quarantine},
+	{"_zx_cache_flush", 0x319eccca, &vdso_zx_cache_flush},
+	{"_zx_channel_create", 0xe5199281, &vdso_zx_channel_create},
+	{"_zx_channel_read", 0xe7169b09, &vdso_zx_channel_read},
+	{"_zx_channel_read_etc", 0x77c4cc84, &vdso_zx_channel_read_etc},
+	{"_zx_channel_write", 0xca4bbc18, &vdso_zx_channel_write},
+	{"_zx_channel_write_etc", 0x43b1dd13, &vdso_zx_channel_write_etc},
+	{"_zx_channel_call_noretry", 0xb5ad0b5b, &vdso_zx_channel_call_noretry},
+	{"_zx_channel_call_finish", 0x85ce3de9, &vdso_zx_channel_call_finish},
+	{"_zx_channel_call", 0xe70e51c9, &vdso_zx_channel_call},
+	{"_zx_clock_get", 0x3fb5d7c0, &vdso_zx_clock_get},
+	{"_zx_clock_get_monotonic", 0xb00e6115, &vdso_zx_clock_get_monotonic},
+	{"_zx_clock_adjust", 0x87cf38ab, &vdso_zx_clock_adjust},
+	{"_zx_clock_get_monotonic_via_kernel", 0x3dc12b54, &vdso_zx_clock_get_monotonic_via_kernel},
+	{"_zx_clock_create", 0x8d73ce14, &vdso_zx_clock_create},
+	{"_zx_clock_read", 0x3676d5dc, &vdso_zx_clock_read},
+	{"_zx_clock_get_details", 0xb7227265, &vdso_zx_clock_get_details},
+	{"_zx_clock_update", 0xb74bec03, &vdso_zx_clock_update},
+	{"_zx_cprng_draw_once", 0x40248ce0, &vdso_zx_cprng_draw_once},
+	{"_zx_cprng_draw", 0x12929c5c, &vdso_zx_cprng_draw},
+	{"_zx_cprng_add_entropy", 0x1617dd47, &vdso_zx_cprng_add_entropy},
+	{"_zx_debug_read", 0x6c062397, &vdso_zx_debug_read},
+	{"_zx_debug_write", 0xed2c5666, &vdso_zx_debug_write},
+	{"_zx_debug_send_command", 0xac6e8203, &vdso_zx_debug_send_command},
+	{"_zx_debuglog_create", 0x2504f1, &vdso_zx_debuglog_create},
+	{"_zx_debuglog_write", 0x3f7aa088, &vdso_zx_debuglog_write},
+	{"_zx_debuglog_read", 0x66c2b179, &vdso_zx_debuglog_read},
+	{"_zx_event_create", 0x4c39490a, &vdso_zx_event_create},
+	{"_zx_eventpair_create", 0xe3fd9c16, &vdso_zx_eventpair_create},
+	{"_zx_exception_get_thread", 0xb1c70bba, &vdso_zx_exception_get_thread},
+	{"_zx_exception_get_process", 0xcddbd761, &vdso_zx_exception_get_process},
+	{"_zx_fifo_create", 0xf197cb2c, &vdso_zx_fifo_create},
+	{"_zx_fifo_read", 0x3ec8acf4, &vdso_zx_fifo_read},
+	{"_zx_fifo_write", 0x18400b63, &vdso_zx_fifo_write},
+	{"_zx_framebuffer_get_info", 0xe6c88924, &vdso_zx_framebuffer_get_info},
+	{"_zx_framebuffer_set_range", 0x364ad6b1, &vdso_zx_framebuffer_set_range},
+	{"_zx_futex_wait", 0xb089e255, &vdso_zx_futex_wait},
+	{"_zx_futex_wake", 0xb089e288, &vdso_zx_futex_wake},
+	{"_zx_futex_requeue", 0xd509be7c, &vdso_zx_futex_requeue},
+	{"_zx_futex_wake_single_owner", 0x63970173, &vdso_zx_futex_wake_single_owner},
+	{"_zx_futex_requeue_single_owner", 0x8f9a9e7, &vdso_zx_futex_requeue_single_owner},
+	{"_zx_futex_get_owner", 0xf16dec6a, &vdso_zx_futex_get_owner},
+	{"_zx_guest_create", 0x6f318390, &vdso_zx_guest_create},
+	{"_zx_guest_set_trap", 0xffe2547e, &vdso_zx_guest_set_trap},
+	{"_zx_handle_close", 0xe769f876, &vdso_zx_handle_close},
+	{"_zx_handle_close_many", 0x8a9a3aaa, &vdso_zx_handle_close_many},
+	{"_zx_handle_duplicate", 0x3f0a83b, &vdso_zx_handle_duplicate},
+	{"_zx_handle_replace", 0xdc2d9edc, &vdso_zx_handle_replace},
+	{"_zx_interrupt_create", 0xaa939795, &vdso_zx_interrupt_create},
+	{"_zx_interrupt_bind", 0xa25b97be, &vdso_zx_interrupt_bind},
+	{"_zx_interrupt_wait", 0xa266f916, &vdso_zx_interrupt_wait},
+	{"_zx_interrupt_destroy", 0x2cb5724b, &vdso_zx_interrupt_destroy},
+	{"_zx_interrupt_ack", 0x3b390f10, &vdso_zx_interrupt_ack},
+	{"_zx_interrupt_trigger", 0x19f00875, &vdso_zx_interrupt_trigger},
+	{"_zx_interrupt_bind_vcpu", 0x505f9f1b, &vdso_zx_interrupt_bind_vcpu},
+	{"_zx_iommu_create", 0x297b6af, &vdso_zx_iommu_create},
+	{"_zx_ioports_request", 0xb8f1c0ad, &vdso_zx_ioports_request},
+	{"_zx_ioports_release", 0xb88e6f05, &vdso_zx_ioports_release},
+	{"_zx_job_create", 0x6b9cbb63, &vdso_zx_job_create},
+	{"_zx_job_set_policy", 0xa45d60ea, &vdso_zx_job_set_policy},
+	{"_zx_job_set_critical", 0x129ab785, &vdso_zx_job_set_critical},
+	{"_zx_ktrace_read", 0x7a59dbca, &vdso_zx_ktrace_read},
+	{"_zx_ktrace_control", 0x15debecf, &vdso_zx_ktrace_control},
+	{"_zx_ktrace_write", 0xc5f714f9, &vdso_zx_ktrace_write},
+	{"_zx_nanosleep", 0xe9d6145a, &vdso_zx_nanosleep},
+	{"_zx_ticks_get", 0xaeb30a32, &vdso_zx_ticks_get},
+	{"_zx_ticks_per_second", 0x6ed47574, &vdso_zx_ticks_per_second},
+	{"_zx_deadline_after", 0x6253eb5c, &vdso_zx_deadline_after},
+	{"_zx_vmar_unmap_handle_close_thread_exit", 0x5a372afb, &vdso_zx_vmar_unmap_handle_close_thread_exit},
+	{"_zx_futex_wake_handle_close_thread_exit", 0x49731cb8, &vdso_zx_futex_wake_handle_close_thread_exit},
+	{"_zx_ticks_get_via_kernel", 0x821bc851, &vdso_zx_ticks_get_via_kernel},
+	{"_zx_msi_allocate", 0xf5370e42, &vdso_zx_msi_allocate},
+	{"_zx_msi_create", 0xbf7b04f1, &vdso_zx_msi_create},
+	{"_zx_mtrace_control", 0x8c5f3211, &vdso_zx_mtrace_control},
+	{"_zx_object_wait_one", 0xed850621, &vdso_zx_object_wait_one},
+	{"_zx_object_wait_many", 0x9e247bd4, &vdso_zx_object_wait_many},
+	{"_zx_object_wait_async", 0x61e4dcdd, &vdso_zx_object_wait_async},
+	{"_zx_object_signal", 0x460ab89, &vdso_zx_object_signal},
+	{"_zx_object_signal_peer", 0xe90c8694, &vdso_zx_object_signal_peer},
+	{"_zx_object_get_property", 0xd60c8aef, &vdso_zx_object_get_property},
+	{"_zx_object_set_property", 0x2174eb7b, &vdso_zx_object_set_property},
+	{"_zx_object_get_info", 0x7582ddf6, &vdso_zx_object_get_info},
+	{"_zx_object_get_child", 0x256ecc2e, &vdso_zx_object_get_child},
+	{"_zx_object_set_profile", 0x7d1d2727, &vdso_zx_object_set_profile},
+	{"_zx_pager_create", 0x8d44ed57, &vdso_zx_pager_create},
+	{"_zx_pager_create_vmo", 0x564fdd48, &vdso_zx_pager_create_vmo},
+	{"_zx_pager_detach_vmo", 0x2072c15d, &vdso_zx_pager_detach_vmo},
+	{"_zx_pager_supply_pages", 0x69d1fc7f, &vdso_zx_pager_supply_pages},
+	{"_zx_pager_op_range", 0x5e8195ae, &vdso_zx_pager_op_range},
+	{"_zx_pc_firmware_tables", 0x1a05d1fe, &vdso_zx_pc_firmware_tables},
+	{"_zx_pci_get_nth_device", 0x32106f08, &vdso_zx_pci_get_nth_device},
+	{"_zx_pci_enable_bus_master", 0x76091cab, &vdso_zx_pci_enable_bus_master},
+	{"_zx_pci_reset_device", 0xc6496142, &vdso_zx_pci_reset_device},
+	{"_zx_pci_config_read", 0xc765eb61, &vdso_zx_pci_config_read},
+	{"_zx_pci_config_write", 0xb4851770, &vdso_zx_pci_config_write},
+	{"_zx_pci_cfg_pio_rw", 0xda224f4f, &vdso_zx_pci_cfg_pio_rw},
+	{"_zx_pci_get_bar", 0x14ec9dc4, &vdso_zx_pci_get_bar},
+	{"_zx_pci_map_interrupt", 0x3c5aa3fa, &vdso_zx_pci_map_interrupt},
+	{"_zx_pci_query_irq_mode", 0xdf173875, &vdso_zx_pci_query_irq_mode},
+	{"_zx_pci_set_irq_mode", 0xedfcadcb, &vdso_zx_pci_set_irq_mode},
+	{"_zx_pci_init", 0x4db59c04, &vdso_zx_pci_init},
+	{"_zx_pci_add_subtract_io_range", 0x5fcd4b03, &vdso_zx_pci_add_subtract_io_range},
+	{"_zx_pmt_unpin", 0x8e954c6f, &vdso_zx_pmt_unpin},
+	{"_zx_port_create", 0x5294baed, &vdso_zx_port_create},
+	{"_zx_port_queue", 0x8f22883e, &vdso_zx_port_queue},
+	{"_zx_port_wait", 0xfc97666e, &vdso_zx_port_wait},
+	{"_zx_port_cancel", 0x5166105f, &vdso_zx_port_cancel},
+	{"_zx_process_exit", 0xc7f8a64d, &vdso_zx_process_exit},
+	{"_zx_process_create", 0xa3a21647, &vdso_zx_process_create},
+	{"_zx_process_start", 0xc80873a1, &vdso_zx_process_start},
+	{"_zx_process_read_memory", 0x883ab627, &vdso_zx_process_read_memory},
+	{"_zx_process_write_memory", 0x18162116, &vdso_zx_process_write_memory},
+	{"_zx_profile_create", 0x28e1bf39, &vdso_zx_profile_create},
+	{"_zx_resource_create", 0x22a0d150, &vdso_zx_resource_create},
+	{"_zx_smc_call", 0x63f0533, &vdso_zx_smc_call},
+	{"_zx_socket_create", 0xf536e851, &vdso_zx_socket_create},
+	{"_zx_socket_write", 0x5e2d97e8, &vdso_zx_socket_write},
+	{"_zx_socket_read", 0xb5443cd9, &vdso_zx_socket_read},
+	{"_zx_socket_shutdown", 0x78afef9, &vdso_zx_socket_shutdown},
+	{"_zx_stream_create", 0x5a685d14, &vdso_zx_stream_create},
+	{"_zx_stream_writev", 0x89120a21, &vdso_zx_stream_writev},
+	{"_zx_stream_writev_at", 0xcd618395, &vdso_zx_stream_writev_at},
+	{"_zx_stream_readv", 0xae7040d2, &vdso_zx_stream_readv},
+	{"_zx_stream_readv_at", 0x7bfd08a6, &vdso_zx_stream_readv_at},
+	{"_zx_stream_seek", 0xcefc31c8, &vdso_zx_stream_seek},
+	{"_zx_syscall_test_0", 0xb62fbcde, &vdso_zx_syscall_test_0},
+	{"_zx_syscall_test_1", 0xb62fbcdf, &vdso_zx_syscall_test_1},
+	{"_zx_syscall_test_2", 0xb62fbce0, &vdso_zx_syscall_test_2},
+	{"_zx_syscall_test_3", 0xb62fbce1, &vdso_zx_syscall_test_3},
+	{"_zx_syscall_test_4", 0xb62fbce2, &vdso_zx_syscall_test_4},
+	{"_zx_syscall_test_5", 0xb62fbce3, &vdso_zx_syscall_test_5},
+	{"_zx_syscall_test_6", 0xb62fbce4, &vdso_zx_syscall_test_6},
+	{"_zx_syscall_test_7", 0xb62fbce5, &vdso_zx_syscall_test_7},
+	{"_zx_syscall_test_8", 0xb62fbce6, &vdso_zx_syscall_test_8},
+	{"_zx_syscall_test_wrapper", 0x4d7af9cf, &vdso_zx_syscall_test_wrapper},
+	{"_zx_syscall_test_handle_create", 0xb996e56d, &vdso_zx_syscall_test_handle_create},
+	{"_zx_system_get_dcache_line_size", 0x2d6d6511, &vdso_zx_system_get_dcache_line_size},
+	{"_zx_system_get_num_cpus", 0x8e92a0c2, &vdso_zx_system_get_num_cpus},
+	{"_zx_system_get_version_string", 0xf2daeaf4, &vdso_zx_system_get_version_string},
+	{"_zx_system_get_physmem", 0x5a0e027b, &vdso_zx_system_get_physmem},
+	{"_zx_system_get_features", 0x42682df7, &vdso_zx_system_get_features},
+	{"_zx_system_get_event", 0x7a0b68da, &vdso_zx_system_get_event},
+	{"_zx_system_mexec", 0xd142362b, &vdso_zx_system_mexec},
+	{"_zx_system_mexec_payload_get", 0x34bd22b3, &vdso_zx_system_mexec_payload_get},
+	{"_zx_system_powerctl", 0x43f6ae09, &vdso_zx_system_powerctl},
+	{"_zx_task_suspend", 0xe13ad509, &vdso_zx_task_suspend},
+	{"_zx_task_suspend_token", 0x341e98a9, &vdso_zx_task_suspend_token},
+	{"_zx_task_create_exception_channel", 0x5318f181, &vdso_zx_task_create_exception_channel},
+	{"_zx_task_kill", 0x1ae4e313, &vdso_zx_task_kill},
+	{"_zx_thread_exit", 0xed44fe6, &vdso_zx_thread_exit},
+	{"_zx_thread_create", 0x100e8a20, &vdso_zx_thread_create},
+	{"_zx_thread_start", 0xea59505a, &vdso_zx_thread_start},
+	{"_zx_thread_read_state", 0x82fd0a88, &vdso_zx_thread_read_state},
+	{"_zx_thread_write_state", 0xb9265eb7, &vdso_zx_thread_write_state},
+	{"_zx_timer_create", 0x943773a9, &vdso_zx_timer_create},
+	{"_zx_timer_set", 0xa2689081, &vdso_zx_timer_set},
+	{"_zx_timer_cancel", 0x9308c91b, &vdso_zx_timer_cancel},
+	{"_zx_vcpu_create", 0x458b1fc6, &vdso_zx_vcpu_create},
+	{"_zx_vcpu_resume", 0x67a54423, &vdso_zx_vcpu_resume},
+	{"_zx_vcpu_interrupt", 0x4ddc6df, &vdso_zx_vcpu_interrupt},
+	{"_zx_vcpu_read_state", 0xaa78032e, &vdso_zx_vcpu_read_state},
+	{"_zx_vcpu_write_state", 0xd0006c1d, &vdso_zx_vcpu_write_state},
+	{"_zx_vmar_allocate", 0x4cac85ef, &vdso_zx_vmar_allocate},
+	{"_zx_vmar_destroy", 0xc2294134, &vdso_zx_vmar_destroy},
+	{"_zx_vmar_map", 0xc7b00448, &vdso_zx_vmar_map},
+	{"_zx_vmar_unmap", 0x745a1b6b, &vdso_zx_vmar_unmap},
+	{"_zx_vmar_protect", 0x7bee8f8b, &vdso_zx_vmar_protect},
+	{"_zx_vmar_op_range", 0x4e117375, &vdso_zx_vmar_op_range},
+	{"_zx_vmo_create", 0xb27a765a, &vdso_zx_vmo_create},
+	{"_zx_vmo_read", 0xe70ab4a2, &vdso_zx_vmo_read},
+	{"_zx_vmo_write", 0xc8c308d1, &vdso_zx_vmo_write},
+	{"_zx_vmo_get_size", 0x261c77c0, &vdso_zx_vmo_get_size},
+	{"_zx_vmo_set_size", 0x3932724c, &vdso_zx_vmo_set_size},
+	{"_zx_vmo_op_range", 0xa73d6b71, &vdso_zx_vmo_op_range},
+	{"_zx_vmo_create_child", 0x72c8b3dd, &vdso_zx_vmo_create_child},
+	{"_zx_vmo_set_cache_policy", 0xe509bad4, &vdso_zx_vmo_set_cache_policy},
+	{"_zx_vmo_replace_as_executable", 0xbd38e576, &vdso_zx_vmo_replace_as_executable},
+	{"_zx_vmo_create_contiguous", 0x466a8289, &vdso_zx_vmo_create_contiguous},
+	{"_zx_vmo_create_physical", 0x659677b6, &vdso_zx_vmo_create_physical},
+}
+
+//go:cgo_import_dynamic vdso_zx_bti_create zx_bti_create
+//go:cgo_import_dynamic vdso_zx_bti_pin zx_bti_pin
+//go:cgo_import_dynamic vdso_zx_bti_release_quarantine zx_bti_release_quarantine
+//go:cgo_import_dynamic vdso_zx_cache_flush zx_cache_flush
+//go:cgo_import_dynamic vdso_zx_channel_create zx_channel_create
+//go:cgo_import_dynamic vdso_zx_channel_read zx_channel_read
+//go:cgo_import_dynamic vdso_zx_channel_read_etc zx_channel_read_etc
+//go:cgo_import_dynamic vdso_zx_channel_write zx_channel_write
+//go:cgo_import_dynamic vdso_zx_channel_write_etc zx_channel_write_etc
+//go:cgo_import_dynamic vdso_zx_channel_call_noretry zx_channel_call_noretry
+//go:cgo_import_dynamic vdso_zx_channel_call_finish zx_channel_call_finish
+//go:cgo_import_dynamic vdso_zx_channel_call zx_channel_call
+//go:cgo_import_dynamic vdso_zx_clock_get zx_clock_get
+//go:cgo_import_dynamic vdso_zx_clock_get_monotonic zx_clock_get_monotonic
+//go:cgo_import_dynamic vdso_zx_clock_adjust zx_clock_adjust
+//go:cgo_import_dynamic vdso_zx_clock_get_monotonic_via_kernel zx_clock_get_monotonic_via_kernel
+//go:cgo_import_dynamic vdso_zx_clock_create zx_clock_create
+//go:cgo_import_dynamic vdso_zx_clock_read zx_clock_read
+//go:cgo_import_dynamic vdso_zx_clock_get_details zx_clock_get_details
+//go:cgo_import_dynamic vdso_zx_clock_update zx_clock_update
+//go:cgo_import_dynamic vdso_zx_cprng_draw_once zx_cprng_draw_once
+//go:cgo_import_dynamic vdso_zx_cprng_draw zx_cprng_draw
+//go:cgo_import_dynamic vdso_zx_cprng_add_entropy zx_cprng_add_entropy
+//go:cgo_import_dynamic vdso_zx_debug_read zx_debug_read
+//go:cgo_import_dynamic vdso_zx_debug_write zx_debug_write
+//go:cgo_import_dynamic vdso_zx_debug_send_command zx_debug_send_command
+//go:cgo_import_dynamic vdso_zx_debuglog_create zx_debuglog_create
+//go:cgo_import_dynamic vdso_zx_debuglog_write zx_debuglog_write
+//go:cgo_import_dynamic vdso_zx_debuglog_read zx_debuglog_read
+//go:cgo_import_dynamic vdso_zx_event_create zx_event_create
+//go:cgo_import_dynamic vdso_zx_eventpair_create zx_eventpair_create
+//go:cgo_import_dynamic vdso_zx_exception_get_thread zx_exception_get_thread
+//go:cgo_import_dynamic vdso_zx_exception_get_process zx_exception_get_process
+//go:cgo_import_dynamic vdso_zx_fifo_create zx_fifo_create
+//go:cgo_import_dynamic vdso_zx_fifo_read zx_fifo_read
+//go:cgo_import_dynamic vdso_zx_fifo_write zx_fifo_write
+//go:cgo_import_dynamic vdso_zx_framebuffer_get_info zx_framebuffer_get_info
+//go:cgo_import_dynamic vdso_zx_framebuffer_set_range zx_framebuffer_set_range
+//go:cgo_import_dynamic vdso_zx_futex_wait zx_futex_wait
+//go:cgo_import_dynamic vdso_zx_futex_wake zx_futex_wake
+//go:cgo_import_dynamic vdso_zx_futex_requeue zx_futex_requeue
+//go:cgo_import_dynamic vdso_zx_futex_wake_single_owner zx_futex_wake_single_owner
+//go:cgo_import_dynamic vdso_zx_futex_requeue_single_owner zx_futex_requeue_single_owner
+//go:cgo_import_dynamic vdso_zx_futex_get_owner zx_futex_get_owner
+//go:cgo_import_dynamic vdso_zx_guest_create zx_guest_create
+//go:cgo_import_dynamic vdso_zx_guest_set_trap zx_guest_set_trap
+//go:cgo_import_dynamic vdso_zx_handle_close zx_handle_close
+//go:cgo_import_dynamic vdso_zx_handle_close_many zx_handle_close_many
+//go:cgo_import_dynamic vdso_zx_handle_duplicate zx_handle_duplicate
+//go:cgo_import_dynamic vdso_zx_handle_replace zx_handle_replace
+//go:cgo_import_dynamic vdso_zx_interrupt_create zx_interrupt_create
+//go:cgo_import_dynamic vdso_zx_interrupt_bind zx_interrupt_bind
+//go:cgo_import_dynamic vdso_zx_interrupt_wait zx_interrupt_wait
+//go:cgo_import_dynamic vdso_zx_interrupt_destroy zx_interrupt_destroy
+//go:cgo_import_dynamic vdso_zx_interrupt_ack zx_interrupt_ack
+//go:cgo_import_dynamic vdso_zx_interrupt_trigger zx_interrupt_trigger
+//go:cgo_import_dynamic vdso_zx_interrupt_bind_vcpu zx_interrupt_bind_vcpu
+//go:cgo_import_dynamic vdso_zx_iommu_create zx_iommu_create
+//go:cgo_import_dynamic vdso_zx_ioports_request zx_ioports_request
+//go:cgo_import_dynamic vdso_zx_ioports_release zx_ioports_release
+//go:cgo_import_dynamic vdso_zx_job_create zx_job_create
+//go:cgo_import_dynamic vdso_zx_job_set_policy zx_job_set_policy
+//go:cgo_import_dynamic vdso_zx_job_set_critical zx_job_set_critical
+//go:cgo_import_dynamic vdso_zx_ktrace_read zx_ktrace_read
+//go:cgo_import_dynamic vdso_zx_ktrace_control zx_ktrace_control
+//go:cgo_import_dynamic vdso_zx_ktrace_write zx_ktrace_write
+//go:cgo_import_dynamic vdso_zx_nanosleep zx_nanosleep
+//go:cgo_import_dynamic vdso_zx_ticks_get zx_ticks_get
+//go:cgo_import_dynamic vdso_zx_ticks_per_second zx_ticks_per_second
+//go:cgo_import_dynamic vdso_zx_deadline_after zx_deadline_after
+//go:cgo_import_dynamic vdso_zx_vmar_unmap_handle_close_thread_exit zx_vmar_unmap_handle_close_thread_exit
+//go:cgo_import_dynamic vdso_zx_futex_wake_handle_close_thread_exit zx_futex_wake_handle_close_thread_exit
+//go:cgo_import_dynamic vdso_zx_ticks_get_via_kernel zx_ticks_get_via_kernel
+//go:cgo_import_dynamic vdso_zx_msi_allocate zx_msi_allocate
+//go:cgo_import_dynamic vdso_zx_msi_create zx_msi_create
+//go:cgo_import_dynamic vdso_zx_mtrace_control zx_mtrace_control
+//go:cgo_import_dynamic vdso_zx_object_wait_one zx_object_wait_one
+//go:cgo_import_dynamic vdso_zx_object_wait_many zx_object_wait_many
+//go:cgo_import_dynamic vdso_zx_object_wait_async zx_object_wait_async
+//go:cgo_import_dynamic vdso_zx_object_signal zx_object_signal
+//go:cgo_import_dynamic vdso_zx_object_signal_peer zx_object_signal_peer
+//go:cgo_import_dynamic vdso_zx_object_get_property zx_object_get_property
+//go:cgo_import_dynamic vdso_zx_object_set_property zx_object_set_property
+//go:cgo_import_dynamic vdso_zx_object_get_info zx_object_get_info
+//go:cgo_import_dynamic vdso_zx_object_get_child zx_object_get_child
+//go:cgo_import_dynamic vdso_zx_object_set_profile zx_object_set_profile
+//go:cgo_import_dynamic vdso_zx_pager_create zx_pager_create
+//go:cgo_import_dynamic vdso_zx_pager_create_vmo zx_pager_create_vmo
+//go:cgo_import_dynamic vdso_zx_pager_detach_vmo zx_pager_detach_vmo
+//go:cgo_import_dynamic vdso_zx_pager_supply_pages zx_pager_supply_pages
+//go:cgo_import_dynamic vdso_zx_pager_op_range zx_pager_op_range
+//go:cgo_import_dynamic vdso_zx_pc_firmware_tables zx_pc_firmware_tables
+//go:cgo_import_dynamic vdso_zx_pci_get_nth_device zx_pci_get_nth_device
+//go:cgo_import_dynamic vdso_zx_pci_enable_bus_master zx_pci_enable_bus_master
+//go:cgo_import_dynamic vdso_zx_pci_reset_device zx_pci_reset_device
+//go:cgo_import_dynamic vdso_zx_pci_config_read zx_pci_config_read
+//go:cgo_import_dynamic vdso_zx_pci_config_write zx_pci_config_write
+//go:cgo_import_dynamic vdso_zx_pci_cfg_pio_rw zx_pci_cfg_pio_rw
+//go:cgo_import_dynamic vdso_zx_pci_get_bar zx_pci_get_bar
+//go:cgo_import_dynamic vdso_zx_pci_map_interrupt zx_pci_map_interrupt
+//go:cgo_import_dynamic vdso_zx_pci_query_irq_mode zx_pci_query_irq_mode
+//go:cgo_import_dynamic vdso_zx_pci_set_irq_mode zx_pci_set_irq_mode
+//go:cgo_import_dynamic vdso_zx_pci_init zx_pci_init
+//go:cgo_import_dynamic vdso_zx_pci_add_subtract_io_range zx_pci_add_subtract_io_range
+//go:cgo_import_dynamic vdso_zx_pmt_unpin zx_pmt_unpin
+//go:cgo_import_dynamic vdso_zx_port_create zx_port_create
+//go:cgo_import_dynamic vdso_zx_port_queue zx_port_queue
+//go:cgo_import_dynamic vdso_zx_port_wait zx_port_wait
+//go:cgo_import_dynamic vdso_zx_port_cancel zx_port_cancel
+//go:cgo_import_dynamic vdso_zx_process_exit zx_process_exit
+//go:cgo_import_dynamic vdso_zx_process_create zx_process_create
+//go:cgo_import_dynamic vdso_zx_process_start zx_process_start
+//go:cgo_import_dynamic vdso_zx_process_read_memory zx_process_read_memory
+//go:cgo_import_dynamic vdso_zx_process_write_memory zx_process_write_memory
+//go:cgo_import_dynamic vdso_zx_profile_create zx_profile_create
+//go:cgo_import_dynamic vdso_zx_resource_create zx_resource_create
+//go:cgo_import_dynamic vdso_zx_smc_call zx_smc_call
+//go:cgo_import_dynamic vdso_zx_socket_create zx_socket_create
+//go:cgo_import_dynamic vdso_zx_socket_write zx_socket_write
+//go:cgo_import_dynamic vdso_zx_socket_read zx_socket_read
+//go:cgo_import_dynamic vdso_zx_socket_shutdown zx_socket_shutdown
+//go:cgo_import_dynamic vdso_zx_stream_create zx_stream_create
+//go:cgo_import_dynamic vdso_zx_stream_writev zx_stream_writev
+//go:cgo_import_dynamic vdso_zx_stream_writev_at zx_stream_writev_at
+//go:cgo_import_dynamic vdso_zx_stream_readv zx_stream_readv
+//go:cgo_import_dynamic vdso_zx_stream_readv_at zx_stream_readv_at
+//go:cgo_import_dynamic vdso_zx_stream_seek zx_stream_seek
+//go:cgo_import_dynamic vdso_zx_syscall_test_0 zx_syscall_test_0
+//go:cgo_import_dynamic vdso_zx_syscall_test_1 zx_syscall_test_1
+//go:cgo_import_dynamic vdso_zx_syscall_test_2 zx_syscall_test_2
+//go:cgo_import_dynamic vdso_zx_syscall_test_3 zx_syscall_test_3
+//go:cgo_import_dynamic vdso_zx_syscall_test_4 zx_syscall_test_4
+//go:cgo_import_dynamic vdso_zx_syscall_test_5 zx_syscall_test_5
+//go:cgo_import_dynamic vdso_zx_syscall_test_6 zx_syscall_test_6
+//go:cgo_import_dynamic vdso_zx_syscall_test_7 zx_syscall_test_7
+//go:cgo_import_dynamic vdso_zx_syscall_test_8 zx_syscall_test_8
+//go:cgo_import_dynamic vdso_zx_syscall_test_wrapper zx_syscall_test_wrapper
+//go:cgo_import_dynamic vdso_zx_syscall_test_handle_create zx_syscall_test_handle_create
+//go:cgo_import_dynamic vdso_zx_system_get_dcache_line_size zx_system_get_dcache_line_size
+//go:cgo_import_dynamic vdso_zx_system_get_num_cpus zx_system_get_num_cpus
+//go:cgo_import_dynamic vdso_zx_system_get_version_string zx_system_get_version_string
+//go:cgo_import_dynamic vdso_zx_system_get_physmem zx_system_get_physmem
+//go:cgo_import_dynamic vdso_zx_system_get_features zx_system_get_features
+//go:cgo_import_dynamic vdso_zx_system_get_event zx_system_get_event
+//go:cgo_import_dynamic vdso_zx_system_mexec zx_system_mexec
+//go:cgo_import_dynamic vdso_zx_system_mexec_payload_get zx_system_mexec_payload_get
+//go:cgo_import_dynamic vdso_zx_system_powerctl zx_system_powerctl
+//go:cgo_import_dynamic vdso_zx_task_suspend zx_task_suspend
+//go:cgo_import_dynamic vdso_zx_task_suspend_token zx_task_suspend_token
+//go:cgo_import_dynamic vdso_zx_task_create_exception_channel zx_task_create_exception_channel
+//go:cgo_import_dynamic vdso_zx_task_kill zx_task_kill
+//go:cgo_import_dynamic vdso_zx_thread_exit zx_thread_exit
+//go:cgo_import_dynamic vdso_zx_thread_create zx_thread_create
+//go:cgo_import_dynamic vdso_zx_thread_start zx_thread_start
+//go:cgo_import_dynamic vdso_zx_thread_read_state zx_thread_read_state
+//go:cgo_import_dynamic vdso_zx_thread_write_state zx_thread_write_state
+//go:cgo_import_dynamic vdso_zx_timer_create zx_timer_create
+//go:cgo_import_dynamic vdso_zx_timer_set zx_timer_set
+//go:cgo_import_dynamic vdso_zx_timer_cancel zx_timer_cancel
+//go:cgo_import_dynamic vdso_zx_vcpu_create zx_vcpu_create
+//go:cgo_import_dynamic vdso_zx_vcpu_resume zx_vcpu_resume
+//go:cgo_import_dynamic vdso_zx_vcpu_interrupt zx_vcpu_interrupt
+//go:cgo_import_dynamic vdso_zx_vcpu_read_state zx_vcpu_read_state
+//go:cgo_import_dynamic vdso_zx_vcpu_write_state zx_vcpu_write_state
+//go:cgo_import_dynamic vdso_zx_vmar_allocate zx_vmar_allocate
+//go:cgo_import_dynamic vdso_zx_vmar_destroy zx_vmar_destroy
+//go:cgo_import_dynamic vdso_zx_vmar_map zx_vmar_map
+//go:cgo_import_dynamic vdso_zx_vmar_unmap zx_vmar_unmap
+//go:cgo_import_dynamic vdso_zx_vmar_protect zx_vmar_protect
+//go:cgo_import_dynamic vdso_zx_vmar_op_range zx_vmar_op_range
+//go:cgo_import_dynamic vdso_zx_vmo_create zx_vmo_create
+//go:cgo_import_dynamic vdso_zx_vmo_read zx_vmo_read
+//go:cgo_import_dynamic vdso_zx_vmo_write zx_vmo_write
+//go:cgo_import_dynamic vdso_zx_vmo_get_size zx_vmo_get_size
+//go:cgo_import_dynamic vdso_zx_vmo_set_size zx_vmo_set_size
+//go:cgo_import_dynamic vdso_zx_vmo_op_range zx_vmo_op_range
+//go:cgo_import_dynamic vdso_zx_vmo_create_child zx_vmo_create_child
+//go:cgo_import_dynamic vdso_zx_vmo_set_cache_policy zx_vmo_set_cache_policy
+//go:cgo_import_dynamic vdso_zx_vmo_replace_as_executable zx_vmo_replace_as_executable
+//go:cgo_import_dynamic vdso_zx_vmo_create_contiguous zx_vmo_create_contiguous
+//go:cgo_import_dynamic vdso_zx_vmo_create_physical zx_vmo_create_physical
+
+//go:linkname vdso_zx_bti_create vdso_zx_bti_create
+//go:linkname vdso_zx_bti_pin vdso_zx_bti_pin
+//go:linkname vdso_zx_bti_release_quarantine vdso_zx_bti_release_quarantine
+//go:linkname vdso_zx_cache_flush vdso_zx_cache_flush
+//go:linkname vdso_zx_channel_create vdso_zx_channel_create
+//go:linkname vdso_zx_channel_read vdso_zx_channel_read
+//go:linkname vdso_zx_channel_read_etc vdso_zx_channel_read_etc
+//go:linkname vdso_zx_channel_write vdso_zx_channel_write
+//go:linkname vdso_zx_channel_write_etc vdso_zx_channel_write_etc
+//go:linkname vdso_zx_channel_call_noretry vdso_zx_channel_call_noretry
+//go:linkname vdso_zx_channel_call_finish vdso_zx_channel_call_finish
+//go:linkname vdso_zx_channel_call vdso_zx_channel_call
+//go:linkname vdso_zx_clock_get vdso_zx_clock_get
+//go:linkname vdso_zx_clock_get_monotonic vdso_zx_clock_get_monotonic
+//go:linkname vdso_zx_clock_adjust vdso_zx_clock_adjust
+//go:linkname vdso_zx_clock_get_monotonic_via_kernel vdso_zx_clock_get_monotonic_via_kernel
+//go:linkname vdso_zx_clock_create vdso_zx_clock_create
+//go:linkname vdso_zx_clock_read vdso_zx_clock_read
+//go:linkname vdso_zx_clock_get_details vdso_zx_clock_get_details
+//go:linkname vdso_zx_clock_update vdso_zx_clock_update
+//go:linkname vdso_zx_cprng_draw_once vdso_zx_cprng_draw_once
+//go:linkname vdso_zx_cprng_draw vdso_zx_cprng_draw
+//go:linkname vdso_zx_cprng_add_entropy vdso_zx_cprng_add_entropy
+//go:linkname vdso_zx_debug_read vdso_zx_debug_read
+//go:linkname vdso_zx_debug_write vdso_zx_debug_write
+//go:linkname vdso_zx_debug_send_command vdso_zx_debug_send_command
+//go:linkname vdso_zx_debuglog_create vdso_zx_debuglog_create
+//go:linkname vdso_zx_debuglog_write vdso_zx_debuglog_write
+//go:linkname vdso_zx_debuglog_read vdso_zx_debuglog_read
+//go:linkname vdso_zx_event_create vdso_zx_event_create
+//go:linkname vdso_zx_eventpair_create vdso_zx_eventpair_create
+//go:linkname vdso_zx_exception_get_thread vdso_zx_exception_get_thread
+//go:linkname vdso_zx_exception_get_process vdso_zx_exception_get_process
+//go:linkname vdso_zx_fifo_create vdso_zx_fifo_create
+//go:linkname vdso_zx_fifo_read vdso_zx_fifo_read
+//go:linkname vdso_zx_fifo_write vdso_zx_fifo_write
+//go:linkname vdso_zx_framebuffer_get_info vdso_zx_framebuffer_get_info
+//go:linkname vdso_zx_framebuffer_set_range vdso_zx_framebuffer_set_range
+//go:linkname vdso_zx_futex_wait vdso_zx_futex_wait
+//go:linkname vdso_zx_futex_wake vdso_zx_futex_wake
+//go:linkname vdso_zx_futex_requeue vdso_zx_futex_requeue
+//go:linkname vdso_zx_futex_wake_single_owner vdso_zx_futex_wake_single_owner
+//go:linkname vdso_zx_futex_requeue_single_owner vdso_zx_futex_requeue_single_owner
+//go:linkname vdso_zx_futex_get_owner vdso_zx_futex_get_owner
+//go:linkname vdso_zx_guest_create vdso_zx_guest_create
+//go:linkname vdso_zx_guest_set_trap vdso_zx_guest_set_trap
+//go:linkname vdso_zx_handle_close vdso_zx_handle_close
+//go:linkname vdso_zx_handle_close_many vdso_zx_handle_close_many
+//go:linkname vdso_zx_handle_duplicate vdso_zx_handle_duplicate
+//go:linkname vdso_zx_handle_replace vdso_zx_handle_replace
+//go:linkname vdso_zx_interrupt_create vdso_zx_interrupt_create
+//go:linkname vdso_zx_interrupt_bind vdso_zx_interrupt_bind
+//go:linkname vdso_zx_interrupt_wait vdso_zx_interrupt_wait
+//go:linkname vdso_zx_interrupt_destroy vdso_zx_interrupt_destroy
+//go:linkname vdso_zx_interrupt_ack vdso_zx_interrupt_ack
+//go:linkname vdso_zx_interrupt_trigger vdso_zx_interrupt_trigger
+//go:linkname vdso_zx_interrupt_bind_vcpu vdso_zx_interrupt_bind_vcpu
+//go:linkname vdso_zx_iommu_create vdso_zx_iommu_create
+//go:linkname vdso_zx_ioports_request vdso_zx_ioports_request
+//go:linkname vdso_zx_ioports_release vdso_zx_ioports_release
+//go:linkname vdso_zx_job_create vdso_zx_job_create
+//go:linkname vdso_zx_job_set_policy vdso_zx_job_set_policy
+//go:linkname vdso_zx_job_set_critical vdso_zx_job_set_critical
+//go:linkname vdso_zx_ktrace_read vdso_zx_ktrace_read
+//go:linkname vdso_zx_ktrace_control vdso_zx_ktrace_control
+//go:linkname vdso_zx_ktrace_write vdso_zx_ktrace_write
+//go:linkname vdso_zx_nanosleep vdso_zx_nanosleep
+//go:linkname vdso_zx_ticks_get vdso_zx_ticks_get
+//go:linkname vdso_zx_ticks_per_second vdso_zx_ticks_per_second
+//go:linkname vdso_zx_deadline_after vdso_zx_deadline_after
+//go:linkname vdso_zx_vmar_unmap_handle_close_thread_exit vdso_zx_vmar_unmap_handle_close_thread_exit
+//go:linkname vdso_zx_futex_wake_handle_close_thread_exit vdso_zx_futex_wake_handle_close_thread_exit
+//go:linkname vdso_zx_ticks_get_via_kernel vdso_zx_ticks_get_via_kernel
+//go:linkname vdso_zx_msi_allocate vdso_zx_msi_allocate
+//go:linkname vdso_zx_msi_create vdso_zx_msi_create
+//go:linkname vdso_zx_mtrace_control vdso_zx_mtrace_control
+//go:linkname vdso_zx_object_wait_one vdso_zx_object_wait_one
+//go:linkname vdso_zx_object_wait_many vdso_zx_object_wait_many
+//go:linkname vdso_zx_object_wait_async vdso_zx_object_wait_async
+//go:linkname vdso_zx_object_signal vdso_zx_object_signal
+//go:linkname vdso_zx_object_signal_peer vdso_zx_object_signal_peer
+//go:linkname vdso_zx_object_get_property vdso_zx_object_get_property
+//go:linkname vdso_zx_object_set_property vdso_zx_object_set_property
+//go:linkname vdso_zx_object_get_info vdso_zx_object_get_info
+//go:linkname vdso_zx_object_get_child vdso_zx_object_get_child
+//go:linkname vdso_zx_object_set_profile vdso_zx_object_set_profile
+//go:linkname vdso_zx_pager_create vdso_zx_pager_create
+//go:linkname vdso_zx_pager_create_vmo vdso_zx_pager_create_vmo
+//go:linkname vdso_zx_pager_detach_vmo vdso_zx_pager_detach_vmo
+//go:linkname vdso_zx_pager_supply_pages vdso_zx_pager_supply_pages
+//go:linkname vdso_zx_pager_op_range vdso_zx_pager_op_range
+//go:linkname vdso_zx_pc_firmware_tables vdso_zx_pc_firmware_tables
+//go:linkname vdso_zx_pci_get_nth_device vdso_zx_pci_get_nth_device
+//go:linkname vdso_zx_pci_enable_bus_master vdso_zx_pci_enable_bus_master
+//go:linkname vdso_zx_pci_reset_device vdso_zx_pci_reset_device
+//go:linkname vdso_zx_pci_config_read vdso_zx_pci_config_read
+//go:linkname vdso_zx_pci_config_write vdso_zx_pci_config_write
+//go:linkname vdso_zx_pci_cfg_pio_rw vdso_zx_pci_cfg_pio_rw
+//go:linkname vdso_zx_pci_get_bar vdso_zx_pci_get_bar
+//go:linkname vdso_zx_pci_map_interrupt vdso_zx_pci_map_interrupt
+//go:linkname vdso_zx_pci_query_irq_mode vdso_zx_pci_query_irq_mode
+//go:linkname vdso_zx_pci_set_irq_mode vdso_zx_pci_set_irq_mode
+//go:linkname vdso_zx_pci_init vdso_zx_pci_init
+//go:linkname vdso_zx_pci_add_subtract_io_range vdso_zx_pci_add_subtract_io_range
+//go:linkname vdso_zx_pmt_unpin vdso_zx_pmt_unpin
+//go:linkname vdso_zx_port_create vdso_zx_port_create
+//go:linkname vdso_zx_port_queue vdso_zx_port_queue
+//go:linkname vdso_zx_port_wait vdso_zx_port_wait
+//go:linkname vdso_zx_port_cancel vdso_zx_port_cancel
+//go:linkname vdso_zx_process_exit vdso_zx_process_exit
+//go:linkname vdso_zx_process_create vdso_zx_process_create
+//go:linkname vdso_zx_process_start vdso_zx_process_start
+//go:linkname vdso_zx_process_read_memory vdso_zx_process_read_memory
+//go:linkname vdso_zx_process_write_memory vdso_zx_process_write_memory
+//go:linkname vdso_zx_profile_create vdso_zx_profile_create
+//go:linkname vdso_zx_resource_create vdso_zx_resource_create
+//go:linkname vdso_zx_smc_call vdso_zx_smc_call
+//go:linkname vdso_zx_socket_create vdso_zx_socket_create
+//go:linkname vdso_zx_socket_write vdso_zx_socket_write
+//go:linkname vdso_zx_socket_read vdso_zx_socket_read
+//go:linkname vdso_zx_socket_shutdown vdso_zx_socket_shutdown
+//go:linkname vdso_zx_stream_create vdso_zx_stream_create
+//go:linkname vdso_zx_stream_writev vdso_zx_stream_writev
+//go:linkname vdso_zx_stream_writev_at vdso_zx_stream_writev_at
+//go:linkname vdso_zx_stream_readv vdso_zx_stream_readv
+//go:linkname vdso_zx_stream_readv_at vdso_zx_stream_readv_at
+//go:linkname vdso_zx_stream_seek vdso_zx_stream_seek
+//go:linkname vdso_zx_syscall_test_0 vdso_zx_syscall_test_0
+//go:linkname vdso_zx_syscall_test_1 vdso_zx_syscall_test_1
+//go:linkname vdso_zx_syscall_test_2 vdso_zx_syscall_test_2
+//go:linkname vdso_zx_syscall_test_3 vdso_zx_syscall_test_3
+//go:linkname vdso_zx_syscall_test_4 vdso_zx_syscall_test_4
+//go:linkname vdso_zx_syscall_test_5 vdso_zx_syscall_test_5
+//go:linkname vdso_zx_syscall_test_6 vdso_zx_syscall_test_6
+//go:linkname vdso_zx_syscall_test_7 vdso_zx_syscall_test_7
+//go:linkname vdso_zx_syscall_test_8 vdso_zx_syscall_test_8
+//go:linkname vdso_zx_syscall_test_wrapper vdso_zx_syscall_test_wrapper
+//go:linkname vdso_zx_syscall_test_handle_create vdso_zx_syscall_test_handle_create
+//go:linkname vdso_zx_system_get_dcache_line_size vdso_zx_system_get_dcache_line_size
+//go:linkname vdso_zx_system_get_num_cpus vdso_zx_system_get_num_cpus
+//go:linkname vdso_zx_system_get_version_string vdso_zx_system_get_version_string
+//go:linkname vdso_zx_system_get_physmem vdso_zx_system_get_physmem
+//go:linkname vdso_zx_system_get_features vdso_zx_system_get_features
+//go:linkname vdso_zx_system_get_event vdso_zx_system_get_event
+//go:linkname vdso_zx_system_mexec vdso_zx_system_mexec
+//go:linkname vdso_zx_system_mexec_payload_get vdso_zx_system_mexec_payload_get
+//go:linkname vdso_zx_system_powerctl vdso_zx_system_powerctl
+//go:linkname vdso_zx_task_suspend vdso_zx_task_suspend
+//go:linkname vdso_zx_task_suspend_token vdso_zx_task_suspend_token
+//go:linkname vdso_zx_task_create_exception_channel vdso_zx_task_create_exception_channel
+//go:linkname vdso_zx_task_kill vdso_zx_task_kill
+//go:linkname vdso_zx_thread_exit vdso_zx_thread_exit
+//go:linkname vdso_zx_thread_create vdso_zx_thread_create
+//go:linkname vdso_zx_thread_start vdso_zx_thread_start
+//go:linkname vdso_zx_thread_read_state vdso_zx_thread_read_state
+//go:linkname vdso_zx_thread_write_state vdso_zx_thread_write_state
+//go:linkname vdso_zx_timer_create vdso_zx_timer_create
+//go:linkname vdso_zx_timer_set vdso_zx_timer_set
+//go:linkname vdso_zx_timer_cancel vdso_zx_timer_cancel
+//go:linkname vdso_zx_vcpu_create vdso_zx_vcpu_create
+//go:linkname vdso_zx_vcpu_resume vdso_zx_vcpu_resume
+//go:linkname vdso_zx_vcpu_interrupt vdso_zx_vcpu_interrupt
+//go:linkname vdso_zx_vcpu_read_state vdso_zx_vcpu_read_state
+//go:linkname vdso_zx_vcpu_write_state vdso_zx_vcpu_write_state
+//go:linkname vdso_zx_vmar_allocate vdso_zx_vmar_allocate
+//go:linkname vdso_zx_vmar_destroy vdso_zx_vmar_destroy
+//go:linkname vdso_zx_vmar_map vdso_zx_vmar_map
+//go:linkname vdso_zx_vmar_unmap vdso_zx_vmar_unmap
+//go:linkname vdso_zx_vmar_protect vdso_zx_vmar_protect
+//go:linkname vdso_zx_vmar_op_range vdso_zx_vmar_op_range
+//go:linkname vdso_zx_vmo_create vdso_zx_vmo_create
+//go:linkname vdso_zx_vmo_read vdso_zx_vmo_read
+//go:linkname vdso_zx_vmo_write vdso_zx_vmo_write
+//go:linkname vdso_zx_vmo_get_size vdso_zx_vmo_get_size
+//go:linkname vdso_zx_vmo_set_size vdso_zx_vmo_set_size
+//go:linkname vdso_zx_vmo_op_range vdso_zx_vmo_op_range
+//go:linkname vdso_zx_vmo_create_child vdso_zx_vmo_create_child
+//go:linkname vdso_zx_vmo_set_cache_policy vdso_zx_vmo_set_cache_policy
+//go:linkname vdso_zx_vmo_replace_as_executable vdso_zx_vmo_replace_as_executable
+//go:linkname vdso_zx_vmo_create_contiguous vdso_zx_vmo_create_contiguous
+//go:linkname vdso_zx_vmo_create_physical vdso_zx_vmo_create_physical
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_bti_create(iommu uint32, options uint32, bti_id uint64, out unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_bti_pin(handle uint32, options uint32, vmo uint32, offset uint64, size uint64, addrs unsafe.Pointer, num_addrs uint, pmt unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_bti_release_quarantine(handle uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_cache_flush(addr unsafe.Pointer, size uint, options uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_channel_create(options uint32, out0 unsafe.Pointer, out1 unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_channel_read(handle uint32, options uint32, bytes unsafe.Pointer, handles unsafe.Pointer, num_bytes uint32, num_handles uint32, actual_bytes unsafe.Pointer, actual_handles unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_channel_read_etc(handle uint32, options uint32, bytes unsafe.Pointer, handles unsafe.Pointer, num_bytes uint32, num_handles uint32, actual_bytes unsafe.Pointer, actual_handles unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_channel_write(handle uint32, options uint32, bytes unsafe.Pointer, num_bytes uint32, handles unsafe.Pointer, num_handles uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_channel_write_etc(handle uint32, options uint32, bytes unsafe.Pointer, num_bytes uint32, handles unsafe.Pointer, num_handles uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_channel_call_noretry(handle uint32, options uint32, deadline int64, args unsafe.Pointer, actual_bytes unsafe.Pointer, actual_handles unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_channel_call_finish(deadline int64, args unsafe.Pointer, actual_bytes unsafe.Pointer, actual_handles unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_channel_call(handle uint32, options uint32, deadline int64, args unsafe.Pointer, actual_bytes unsafe.Pointer, actual_handles unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_clock_get(clock_id uint32, out unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_clock_get_monotonic() int64
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_clock_adjust(handle uint32, clock_id uint32, offset int64) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_clock_get_monotonic_via_kernel() int64
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_clock_create(options uint64, args unsafe.Pointer, out unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_clock_read(handle uint32, now unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_clock_get_details(handle uint32, options uint64, details unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_clock_update(handle uint32, options uint64, args unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_cprng_draw_once(buffer unsafe.Pointer, buffer_size uint) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_cprng_draw(buffer unsafe.Pointer, buffer_size uint)
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_cprng_add_entropy(buffer unsafe.Pointer, buffer_size uint) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_debug_read(handle uint32, buffer unsafe.Pointer, buffer_size uint, actual unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_debug_write(buffer unsafe.Pointer, buffer_size uint) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_debug_send_command(resource uint32, buffer unsafe.Pointer, buffer_size uint) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_debuglog_create(resource uint32, options uint32, out unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_debuglog_write(handle uint32, options uint32, buffer unsafe.Pointer, buffer_size uint) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_debuglog_read(handle uint32, options uint32, buffer unsafe.Pointer, buffer_size uint) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_event_create(options uint32, out unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_eventpair_create(options uint32, out0 unsafe.Pointer, out1 unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_exception_get_thread(handle uint32, out unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_exception_get_process(handle uint32, out unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_fifo_create(elem_count uint, elem_size uint, options uint32, out0 unsafe.Pointer, out1 unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_fifo_read(handle uint32, elem_size uint, data unsafe.Pointer, data_size uint, actual_count unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_fifo_write(handle uint32, elem_size uint, data unsafe.Pointer, count uint, actual_count unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_framebuffer_get_info(resource uint32, format unsafe.Pointer, width unsafe.Pointer, height unsafe.Pointer, stride unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_framebuffer_set_range(resource uint32, vmo uint32, len uint32, format uint32, width uint32, height uint32, stride uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_futex_wait(value_ptr unsafe.Pointer, current_value int32, new_futex_owner uint32, deadline int64) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_futex_wake(value_ptr unsafe.Pointer, wake_count uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_futex_requeue(value_ptr unsafe.Pointer, wake_count uint32, current_value int32, requeue_ptr unsafe.Pointer, requeue_count uint32, new_requeue_owner uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_futex_wake_single_owner(value_ptr unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_futex_requeue_single_owner(value_ptr unsafe.Pointer, current_value int32, requeue_ptr unsafe.Pointer, requeue_count uint32, new_requeue_owner uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_futex_get_owner(value_ptr unsafe.Pointer, koid unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_guest_create(resource uint32, options uint32, guest_handle unsafe.Pointer, vmar_handle unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_guest_set_trap(handle uint32, kind uint32, addr uintptr, size uint, port_handle uint32, key uint64) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_handle_close(handle uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_handle_close_many(handles unsafe.Pointer, num_handles uint) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_handle_duplicate(handle uint32, rights uint32, out unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_handle_replace(handle uint32, rights uint32, out unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_interrupt_create(src_obj uint32, src_num uint32, options uint32, out_handle unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_interrupt_bind(handle uint32, port_handle uint32, key uint64, options uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_interrupt_wait(handle uint32, out_timestamp unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_interrupt_destroy(handle uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_interrupt_ack(handle uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_interrupt_trigger(handle uint32, options uint32, timestamp int64) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_interrupt_bind_vcpu(handle uint32, vcpu uint32, options uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_iommu_create(resource uint32, typ uint32, desc unsafe.Pointer, desc_size uint, out unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_ioports_request(resource uint32, io_addr uint16, len uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_ioports_release(resource uint32, io_addr uint16, len uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_job_create(parent_job uint32, options uint32, out unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_job_set_policy(handle uint32, options uint32, topic uint32, policy unsafe.Pointer, policy_size uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_job_set_critical(job uint32, options uint32, process uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_ktrace_read(handle uint32, data unsafe.Pointer, offset uint32, data_size uint, actual unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_ktrace_control(handle uint32, action uint32, options uint32, ptr unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_ktrace_write(handle uint32, id uint32, arg0 uint32, arg1 uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_nanosleep(deadline int64) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_ticks_get() int64
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_ticks_per_second() int64
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_deadline_after(nanoseconds int64) int64
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_vmar_unmap_handle_close_thread_exit(vmar_handle uint32, addr uintptr, size uint, close_handle uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_futex_wake_handle_close_thread_exit(value_ptr unsafe.Pointer, wake_count uint32, new_value int32, close_handle uint32)
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_ticks_get_via_kernel() int64
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_msi_allocate(handle uint32, count uint32, out_allocation unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_msi_create(handle uint32, options uint32, msi_id uint32, vmo uint32, vmo_offset uint, out_interrupt unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_mtrace_control(handle uint32, kind uint32, action uint32, options uint32, ptr unsafe.Pointer, ptr_size uint) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_object_wait_one(handle uint32, signals uint32, deadline int64, observed unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_object_wait_many(items unsafe.Pointer, num_items uint, deadline int64) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_object_wait_async(handle uint32, port uint32, key uint64, signals uint32, options uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_object_signal(handle uint32, clear_mask uint32, set_mask uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_object_signal_peer(handle uint32, clear_mask uint32, set_mask uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_object_get_property(handle uint32, property uint32, value unsafe.Pointer, value_size uint) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_object_set_property(handle uint32, property uint32, value unsafe.Pointer, value_size uint) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_object_get_info(handle uint32, topic uint32, buffer unsafe.Pointer, buffer_size uint, actual unsafe.Pointer, avail unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_object_get_child(handle uint32, koid uint64, rights uint32, out unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_object_set_profile(handle uint32, profile uint32, options uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_pager_create(options uint32, out unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_pager_create_vmo(pager uint32, options uint32, port uint32, key uint64, size uint64, out unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_pager_detach_vmo(pager uint32, vmo uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_pager_supply_pages(pager uint32, pager_vmo uint32, offset uint64, length uint64, aux_vmo uint32, aux_offset uint64) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_pager_op_range(pager uint32, op uint32, pager_vmo uint32, offset uint64, length uint64, data uint64) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_pc_firmware_tables(handle uint32, acpi_rsdp unsafe.Pointer, smbios unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_pci_get_nth_device(handle uint32, index uint32, out_info unsafe.Pointer, out_handle unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_pci_enable_bus_master(handle uint32, enable uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_pci_reset_device(handle uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_pci_config_read(handle uint32, offset uint16, width uint, out_val unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_pci_config_write(handle uint32, offset uint16, width uint, val uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_pci_cfg_pio_rw(handle uint32, bus uint8, dev uint8, funk uint8, offset uint8, val unsafe.Pointer, width uint, write uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_pci_get_bar(handle uint32, bar_num uint32, out_bar unsafe.Pointer, out_handle unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_pci_map_interrupt(handle uint32, which_irq int32, out_handle unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_pci_query_irq_mode(handle uint32, mode uint32, out_max_irqs unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_pci_set_irq_mode(handle uint32, mode uint32, requested_irq_count uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_pci_init(handle uint32, init_buf unsafe.Pointer, len uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_pci_add_subtract_io_range(handle uint32, mmio uint32, base uint64, len uint64, add uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_pmt_unpin(handle uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_port_create(options uint32, out unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_port_queue(handle uint32, packet unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_port_wait(handle uint32, deadline int64, packet unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_port_cancel(handle uint32, source uint32, key uint64) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_process_exit(retcode int64)
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_process_create(job uint32, name unsafe.Pointer, name_size uint, options uint32, proc_handle unsafe.Pointer, vmar_handle unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_process_start(handle uint32, thread uint32, entry uintptr, stack uintptr, arg1 uint32, arg2 uintptr) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_process_read_memory(handle uint32, vaddr uintptr, buffer unsafe.Pointer, buffer_size uint, actual unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_process_write_memory(handle uint32, vaddr uintptr, buffer unsafe.Pointer, buffer_size uint, actual unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_profile_create(root_job uint32, options uint32, profile unsafe.Pointer, out unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_resource_create(parent_rsrc uint32, options uint32, base uint64, size uint, name unsafe.Pointer, name_size uint, resource_out unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_smc_call(handle uint32, parameters unsafe.Pointer, out_smc_result unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_socket_create(options uint32, out0 unsafe.Pointer, out1 unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_socket_write(handle uint32, options uint32, buffer unsafe.Pointer, buffer_size uint, actual unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_socket_read(handle uint32, options uint32, buffer unsafe.Pointer, buffer_size uint, actual unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_socket_shutdown(handle uint32, options uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_stream_create(options uint32, vmo uint32, seek uint64, out_stream unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_stream_writev(handle uint32, options uint32, vector unsafe.Pointer, num_vector uint, actual unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_stream_writev_at(handle uint32, options uint32, offset uint64, vector unsafe.Pointer, num_vector uint, actual unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_stream_readv(handle uint32, options uint32, vector unsafe.Pointer, num_vector uint, actual unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_stream_readv_at(handle uint32, options uint32, offset uint64, vector unsafe.Pointer, num_vector uint, actual unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_stream_seek(handle uint32, whence uint32, offset int64, out_seek unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_syscall_test_0() int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_syscall_test_1(a int32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_syscall_test_2(a int32, b int32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_syscall_test_3(a int32, b int32, c int32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_syscall_test_4(a int32, b int32, c int32, d int32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_syscall_test_5(a int32, b int32, c int32, d int32, e int32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_syscall_test_6(a int32, b int32, c int32, d int32, e int32, f int32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_syscall_test_7(a int32, b int32, c int32, d int32, e int32, f int32, g_ int32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_syscall_test_8(a int32, b int32, c int32, d int32, e int32, f int32, g_ int32, h int32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_syscall_test_wrapper(a int32, b int32, c int32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_syscall_test_handle_create(return_value int32, out unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_system_get_dcache_line_size() uint32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_system_get_num_cpus() uint32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_system_get_version_string() unsafe.Pointer
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_system_get_physmem() uint64
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_system_get_features(kind uint32, features unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_system_get_event(root_job uint32, kind uint32, event unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_system_mexec(resource uint32, kernel_vmo uint32, bootimage_vmo uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_system_mexec_payload_get(resource uint32, buffer unsafe.Pointer, buffer_size uint) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_system_powerctl(resource uint32, cmd uint32, arg unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_task_suspend(handle uint32, token unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_task_suspend_token(handle uint32, token unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_task_create_exception_channel(handle uint32, options uint32, out unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_task_kill(handle uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_thread_exit()
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_thread_create(process uint32, name unsafe.Pointer, name_size uint, options uint32, out unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_thread_start(handle uint32, thread_entry uintptr, stack uintptr, arg1 uintptr, arg2 uintptr) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_thread_read_state(handle uint32, kind uint32, buffer unsafe.Pointer, buffer_size uint) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_thread_write_state(handle uint32, kind uint32, buffer unsafe.Pointer, buffer_size uint) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_timer_create(options uint32, clock_id uint32, out unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_timer_set(handle uint32, deadline int64, slack int64) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_timer_cancel(handle uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_vcpu_create(guest uint32, options uint32, entry uintptr, out unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_vcpu_resume(handle uint32, packet unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_vcpu_interrupt(handle uint32, vector uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_vcpu_read_state(handle uint32, kind uint32, buffer unsafe.Pointer, buffer_size uint) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_vcpu_write_state(handle uint32, kind uint32, buffer unsafe.Pointer, buffer_size uint) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_vmar_allocate(parent_vmar uint32, options uint32, offset uint, size uint, child_vmar unsafe.Pointer, child_addr unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_vmar_destroy(handle uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_vmar_map(handle uint32, options uint32, vmar_offset uint, vmo uint32, vmo_offset uint64, len uint, mapped_addr unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_vmar_unmap(handle uint32, addr uintptr, len uint) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_vmar_protect(handle uint32, options uint32, addr uintptr, len uint) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_vmar_op_range(handle uint32, op uint32, address uintptr, size uint, buffer unsafe.Pointer, buffer_size uint) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_vmo_create(size uint64, options uint32, out unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_vmo_read(handle uint32, buffer unsafe.Pointer, offset uint64, buffer_size uint) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_vmo_write(handle uint32, buffer unsafe.Pointer, offset uint64, buffer_size uint) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_vmo_get_size(handle uint32, size unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_vmo_set_size(handle uint32, size uint64) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_vmo_op_range(handle uint32, op uint32, offset uint64, size uint64, buffer unsafe.Pointer, buffer_size uint) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_vmo_create_child(handle uint32, options uint32, offset uint64, size uint64, out unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_vmo_set_cache_policy(handle uint32, cache_policy uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_vmo_replace_as_executable(handle uint32, vmex uint32, out unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_vmo_create_contiguous(bti uint32, size uint, alignment_log2 uint32, out unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_vmo_create_physical(resource uint32, paddr uintptr, size uint, out unsafe.Pointer) int32
+
+var (
+	vdso_zx_bti_create                          uintptr
+	vdso_zx_bti_pin                             uintptr
+	vdso_zx_bti_release_quarantine              uintptr
+	vdso_zx_cache_flush                         uintptr
+	vdso_zx_channel_create                      uintptr
+	vdso_zx_channel_read                        uintptr
+	vdso_zx_channel_read_etc                    uintptr
+	vdso_zx_channel_write                       uintptr
+	vdso_zx_channel_write_etc                   uintptr
+	vdso_zx_channel_call_noretry                uintptr
+	vdso_zx_channel_call_finish                 uintptr
+	vdso_zx_channel_call                        uintptr
+	vdso_zx_clock_get                           uintptr
+	vdso_zx_clock_get_monotonic                 uintptr
+	vdso_zx_clock_adjust                        uintptr
+	vdso_zx_clock_get_monotonic_via_kernel      uintptr
+	vdso_zx_clock_create                        uintptr
+	vdso_zx_clock_read                          uintptr
+	vdso_zx_clock_get_details                   uintptr
+	vdso_zx_clock_update                        uintptr
+	vdso_zx_cprng_draw_once                     uintptr
+	vdso_zx_cprng_draw                          uintptr
+	vdso_zx_cprng_add_entropy                   uintptr
+	vdso_zx_debug_read                          uintptr
+	vdso_zx_debug_write                         uintptr
+	vdso_zx_debug_send_command                  uintptr
+	vdso_zx_debuglog_create                     uintptr
+	vdso_zx_debuglog_write                      uintptr
+	vdso_zx_debuglog_read                       uintptr
+	vdso_zx_event_create                        uintptr
+	vdso_zx_eventpair_create                    uintptr
+	vdso_zx_exception_get_thread                uintptr
+	vdso_zx_exception_get_process               uintptr
+	vdso_zx_fifo_create                         uintptr
+	vdso_zx_fifo_read                           uintptr
+	vdso_zx_fifo_write                          uintptr
+	vdso_zx_framebuffer_get_info                uintptr
+	vdso_zx_framebuffer_set_range               uintptr
+	vdso_zx_futex_wait                          uintptr
+	vdso_zx_futex_wake                          uintptr
+	vdso_zx_futex_requeue                       uintptr
+	vdso_zx_futex_wake_single_owner             uintptr
+	vdso_zx_futex_requeue_single_owner          uintptr
+	vdso_zx_futex_get_owner                     uintptr
+	vdso_zx_guest_create                        uintptr
+	vdso_zx_guest_set_trap                      uintptr
+	vdso_zx_handle_close                        uintptr
+	vdso_zx_handle_close_many                   uintptr
+	vdso_zx_handle_duplicate                    uintptr
+	vdso_zx_handle_replace                      uintptr
+	vdso_zx_interrupt_create                    uintptr
+	vdso_zx_interrupt_bind                      uintptr
+	vdso_zx_interrupt_wait                      uintptr
+	vdso_zx_interrupt_destroy                   uintptr
+	vdso_zx_interrupt_ack                       uintptr
+	vdso_zx_interrupt_trigger                   uintptr
+	vdso_zx_interrupt_bind_vcpu                 uintptr
+	vdso_zx_iommu_create                        uintptr
+	vdso_zx_ioports_request                     uintptr
+	vdso_zx_ioports_release                     uintptr
+	vdso_zx_job_create                          uintptr
+	vdso_zx_job_set_policy                      uintptr
+	vdso_zx_job_set_critical                    uintptr
+	vdso_zx_ktrace_read                         uintptr
+	vdso_zx_ktrace_control                      uintptr
+	vdso_zx_ktrace_write                        uintptr
+	vdso_zx_nanosleep                           uintptr
+	vdso_zx_ticks_get                           uintptr
+	vdso_zx_ticks_per_second                    uintptr
+	vdso_zx_deadline_after                      uintptr
+	vdso_zx_vmar_unmap_handle_close_thread_exit uintptr
+	vdso_zx_futex_wake_handle_close_thread_exit uintptr
+	vdso_zx_ticks_get_via_kernel                uintptr
+	vdso_zx_msi_allocate                        uintptr
+	vdso_zx_msi_create                          uintptr
+	vdso_zx_mtrace_control                      uintptr
+	vdso_zx_object_wait_one                     uintptr
+	vdso_zx_object_wait_many                    uintptr
+	vdso_zx_object_wait_async                   uintptr
+	vdso_zx_object_signal                       uintptr
+	vdso_zx_object_signal_peer                  uintptr
+	vdso_zx_object_get_property                 uintptr
+	vdso_zx_object_set_property                 uintptr
+	vdso_zx_object_get_info                     uintptr
+	vdso_zx_object_get_child                    uintptr
+	vdso_zx_object_set_profile                  uintptr
+	vdso_zx_pager_create                        uintptr
+	vdso_zx_pager_create_vmo                    uintptr
+	vdso_zx_pager_detach_vmo                    uintptr
+	vdso_zx_pager_supply_pages                  uintptr
+	vdso_zx_pager_op_range                      uintptr
+	vdso_zx_pc_firmware_tables                  uintptr
+	vdso_zx_pci_get_nth_device                  uintptr
+	vdso_zx_pci_enable_bus_master               uintptr
+	vdso_zx_pci_reset_device                    uintptr
+	vdso_zx_pci_config_read                     uintptr
+	vdso_zx_pci_config_write                    uintptr
+	vdso_zx_pci_cfg_pio_rw                      uintptr
+	vdso_zx_pci_get_bar                         uintptr
+	vdso_zx_pci_map_interrupt                   uintptr
+	vdso_zx_pci_query_irq_mode                  uintptr
+	vdso_zx_pci_set_irq_mode                    uintptr
+	vdso_zx_pci_init                            uintptr
+	vdso_zx_pci_add_subtract_io_range           uintptr
+	vdso_zx_pmt_unpin                           uintptr
+	vdso_zx_port_create                         uintptr
+	vdso_zx_port_queue                          uintptr
+	vdso_zx_port_wait                           uintptr
+	vdso_zx_port_cancel                         uintptr
+	vdso_zx_process_exit                        uintptr
+	vdso_zx_process_create                      uintptr
+	vdso_zx_process_start                       uintptr
+	vdso_zx_process_read_memory                 uintptr
+	vdso_zx_process_write_memory                uintptr
+	vdso_zx_profile_create                      uintptr
+	vdso_zx_resource_create                     uintptr
+	vdso_zx_smc_call                            uintptr
+	vdso_zx_socket_create                       uintptr
+	vdso_zx_socket_write                        uintptr
+	vdso_zx_socket_read                         uintptr
+	vdso_zx_socket_shutdown                     uintptr
+	vdso_zx_stream_create                       uintptr
+	vdso_zx_stream_writev                       uintptr
+	vdso_zx_stream_writev_at                    uintptr
+	vdso_zx_stream_readv                        uintptr
+	vdso_zx_stream_readv_at                     uintptr
+	vdso_zx_stream_seek                         uintptr
+	vdso_zx_syscall_test_0                      uintptr
+	vdso_zx_syscall_test_1                      uintptr
+	vdso_zx_syscall_test_2                      uintptr
+	vdso_zx_syscall_test_3                      uintptr
+	vdso_zx_syscall_test_4                      uintptr
+	vdso_zx_syscall_test_5                      uintptr
+	vdso_zx_syscall_test_6                      uintptr
+	vdso_zx_syscall_test_7                      uintptr
+	vdso_zx_syscall_test_8                      uintptr
+	vdso_zx_syscall_test_wrapper                uintptr
+	vdso_zx_syscall_test_handle_create          uintptr
+	vdso_zx_system_get_dcache_line_size         uintptr
+	vdso_zx_system_get_num_cpus                 uintptr
+	vdso_zx_system_get_version_string           uintptr
+	vdso_zx_system_get_physmem                  uintptr
+	vdso_zx_system_get_features                 uintptr
+	vdso_zx_system_get_event                    uintptr
+	vdso_zx_system_mexec                        uintptr
+	vdso_zx_system_mexec_payload_get            uintptr
+	vdso_zx_system_powerctl                     uintptr
+	vdso_zx_task_suspend                        uintptr
+	vdso_zx_task_suspend_token                  uintptr
+	vdso_zx_task_create_exception_channel       uintptr
+	vdso_zx_task_kill                           uintptr
+	vdso_zx_thread_exit                         uintptr
+	vdso_zx_thread_create                       uintptr
+	vdso_zx_thread_start                        uintptr
+	vdso_zx_thread_read_state                   uintptr
+	vdso_zx_thread_write_state                  uintptr
+	vdso_zx_timer_create                        uintptr
+	vdso_zx_timer_set                           uintptr
+	vdso_zx_timer_cancel                        uintptr
+	vdso_zx_vcpu_create                         uintptr
+	vdso_zx_vcpu_resume                         uintptr
+	vdso_zx_vcpu_interrupt                      uintptr
+	vdso_zx_vcpu_read_state                     uintptr
+	vdso_zx_vcpu_write_state                    uintptr
+	vdso_zx_vmar_allocate                       uintptr
+	vdso_zx_vmar_destroy                        uintptr
+	vdso_zx_vmar_map                            uintptr
+	vdso_zx_vmar_unmap                          uintptr
+	vdso_zx_vmar_protect                        uintptr
+	vdso_zx_vmar_op_range                       uintptr
+	vdso_zx_vmo_create                          uintptr
+	vdso_zx_vmo_read                            uintptr
+	vdso_zx_vmo_write                           uintptr
+	vdso_zx_vmo_get_size                        uintptr
+	vdso_zx_vmo_set_size                        uintptr
+	vdso_zx_vmo_op_range                        uintptr
+	vdso_zx_vmo_create_child                    uintptr
+	vdso_zx_vmo_set_cache_policy                uintptr
+	vdso_zx_vmo_replace_as_executable           uintptr
+	vdso_zx_vmo_create_contiguous               uintptr
+	vdso_zx_vmo_create_physical                 uintptr
+)
diff --git a/src/runtime/vdso_linux.go b/src/runtime/vdso_linux.go
index 6e29424..64d4198 100644
--- a/src/runtime/vdso_linux.go
+++ b/src/runtime/vdso_linux.go
@@ -20,52 +20,6 @@
 // The version section is documented at
 // https://refspecs.linuxfoundation.org/LSB_3.2.0/LSB-Core-generic/LSB-Core-generic/symversion.html
 
-const (
-	_AT_SYSINFO_EHDR = 33
-
-	_PT_LOAD    = 1 /* Loadable program segment */
-	_PT_DYNAMIC = 2 /* Dynamic linking information */
-
-	_DT_NULL     = 0          /* Marks end of dynamic section */
-	_DT_HASH     = 4          /* Dynamic symbol hash table */
-	_DT_STRTAB   = 5          /* Address of string table */
-	_DT_SYMTAB   = 6          /* Address of symbol table */
-	_DT_GNU_HASH = 0x6ffffef5 /* GNU-style dynamic symbol hash table */
-	_DT_VERSYM   = 0x6ffffff0
-	_DT_VERDEF   = 0x6ffffffc
-
-	_VER_FLG_BASE = 0x1 /* Version definition of file itself */
-
-	_SHN_UNDEF = 0 /* Undefined section */
-
-	_SHT_DYNSYM = 11 /* Dynamic linker symbol table */
-
-	_STT_FUNC = 2 /* Symbol is a code object */
-
-	_STT_NOTYPE = 0 /* Symbol type is not specified */
-
-	_STB_GLOBAL = 1 /* Global symbol */
-	_STB_WEAK   = 2 /* Weak symbol */
-
-	_EI_NIDENT = 16
-
-	// Maximum indices for the array types used when traversing the vDSO ELF structures.
-	// Computed from architecture-specific max provided by vdso_linux_*.go
-	vdsoSymTabSize     = vdsoArrayMax / unsafe.Sizeof(elfSym{})
-	vdsoDynSize        = vdsoArrayMax / unsafe.Sizeof(elfDyn{})
-	vdsoSymStringsSize = vdsoArrayMax     // byte
-	vdsoVerSymSize     = vdsoArrayMax / 2 // uint16
-	vdsoHashSize       = vdsoArrayMax / 4 // uint32
-
-	// vdsoBloomSizeScale is a scaling factor for gnuhash tables which are uint32 indexed,
-	// but contain uintptrs
-	vdsoBloomSizeScale = unsafe.Sizeof(uintptr(0)) / 4 // uint32
-)
-
-/* How to extract and insert information held in the st_info field.  */
-func _ELF_ST_BIND(val byte) byte { return val >> 4 }
-func _ELF_ST_TYPE(val byte) byte { return val & 0xf }
-
 type vdsoSymbolKey struct {
 	name    string
 	symHash uint32
diff --git a/src/runtime/vdsocalls_fuchsia_amd64.s b/src/runtime/vdsocalls_fuchsia_amd64.s
new file mode 100644
index 0000000..556547b
--- /dev/null
+++ b/src/runtime/vdsocalls_fuchsia_amd64.s
@@ -0,0 +1,4148 @@
+// Copyright 2019 The Fuchsia Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// WARNING: THIS FILE IS MACHINE GENERATED BY //tools/kazoo. DO NOT EDIT.
+
+#include "go_asm.h"
+#include "go_tls.h"
+#include "textflag.h"
+#include "funcdata.h"
+
+// func vdsoCall_zx_bti_create(iommu uint32, options uint32, bti_id uint64, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_bti_create(SB),NOSPLIT,$8-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL iommu+0(FP), DI
+	MOVL options+4(FP), SI
+	MOVQ bti_id+8(FP), DX
+	MOVQ out+16(FP), CX
+	MOVQ vdso_zx_bti_create(SB), AX
+	CALL AX
+	MOVL AX, ret+24(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_bti_pin(handle uint32, options uint32, vmo uint32, offset uint64, size uint64, addrs unsafe.Pointer, num_addrs uint, pmt unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_bti_pin(SB),NOSPLIT,$40-60
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 56(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 56(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL options+4(FP), SI
+	MOVL vmo+8(FP), DX
+	MOVQ offset+16(FP), CX
+	MOVQ size+24(FP), R8
+	MOVQ addrs+32(FP), R9
+	MOVQ num_addrs+40(FP), R12
+	MOVQ pmt+48(FP), R13
+	MOVQ SP, BP   // BP is preserved across vsdo call by the x86-64 ABI
+	ANDQ $~15, SP // stack alignment for x86-64 ABI
+	PUSHQ R13
+	PUSHQ R12
+	MOVQ vdso_zx_bti_pin(SB), AX
+	CALL AX
+	POPQ R12
+	POPQ R13
+	MOVQ BP, SP
+	MOVL AX, ret+56(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_bti_release_quarantine(handle uint32) int32
+TEXT runtime·vdsoCall_zx_bti_release_quarantine(SB),NOSPLIT,$8-12
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVQ vdso_zx_bti_release_quarantine(SB), AX
+	CALL AX
+	MOVL AX, ret+8(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_cache_flush(addr unsafe.Pointer, size uint, options uint32) int32
+TEXT runtime·vdsoCall_zx_cache_flush(SB),NOSPLIT,$8-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVQ addr+0(FP), DI
+	MOVQ size+8(FP), SI
+	MOVL options+16(FP), DX
+	MOVQ vdso_zx_cache_flush(SB), AX
+	CALL AX
+	MOVL AX, ret+24(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_channel_create(options uint32, out0 unsafe.Pointer, out1 unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_channel_create(SB),NOSPLIT,$8-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL options+0(FP), DI
+	MOVQ out0+8(FP), SI
+	MOVQ out1+16(FP), DX
+	MOVQ vdso_zx_channel_create(SB), AX
+	CALL AX
+	MOVL AX, ret+24(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_channel_read(handle uint32, options uint32, bytes unsafe.Pointer, handles unsafe.Pointer, num_bytes uint32, num_handles uint32, actual_bytes unsafe.Pointer, actual_handles unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_channel_read(SB),NOSPLIT,$40-52
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 56(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 56(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL options+4(FP), SI
+	MOVQ bytes+8(FP), DX
+	MOVQ handles+16(FP), CX
+	MOVL num_bytes+24(FP), R8
+	MOVL num_handles+28(FP), R9
+	MOVQ actual_bytes+32(FP), R12
+	MOVQ actual_handles+40(FP), R13
+	MOVQ SP, BP   // BP is preserved across vsdo call by the x86-64 ABI
+	ANDQ $~15, SP // stack alignment for x86-64 ABI
+	PUSHQ R13
+	PUSHQ R12
+	MOVQ vdso_zx_channel_read(SB), AX
+	CALL AX
+	POPQ R12
+	POPQ R13
+	MOVQ BP, SP
+	MOVL AX, ret+48(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_channel_read_etc(handle uint32, options uint32, bytes unsafe.Pointer, handles unsafe.Pointer, num_bytes uint32, num_handles uint32, actual_bytes unsafe.Pointer, actual_handles unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_channel_read_etc(SB),NOSPLIT,$40-52
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 56(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 56(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL options+4(FP), SI
+	MOVQ bytes+8(FP), DX
+	MOVQ handles+16(FP), CX
+	MOVL num_bytes+24(FP), R8
+	MOVL num_handles+28(FP), R9
+	MOVQ actual_bytes+32(FP), R12
+	MOVQ actual_handles+40(FP), R13
+	MOVQ SP, BP   // BP is preserved across vsdo call by the x86-64 ABI
+	ANDQ $~15, SP // stack alignment for x86-64 ABI
+	PUSHQ R13
+	PUSHQ R12
+	MOVQ vdso_zx_channel_read_etc(SB), AX
+	CALL AX
+	POPQ R12
+	POPQ R13
+	MOVQ BP, SP
+	MOVL AX, ret+48(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_channel_write(handle uint32, options uint32, bytes unsafe.Pointer, num_bytes uint32, handles unsafe.Pointer, num_handles uint32) int32
+TEXT runtime·vdsoCall_zx_channel_write(SB),NOSPLIT,$8-44
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL options+4(FP), SI
+	MOVQ bytes+8(FP), DX
+	MOVL num_bytes+16(FP), CX
+	MOVQ handles+24(FP), R8
+	MOVL num_handles+32(FP), R9
+	MOVQ vdso_zx_channel_write(SB), AX
+	CALL AX
+	MOVL AX, ret+40(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_channel_write_etc(handle uint32, options uint32, bytes unsafe.Pointer, num_bytes uint32, handles unsafe.Pointer, num_handles uint32) int32
+TEXT runtime·vdsoCall_zx_channel_write_etc(SB),NOSPLIT,$8-44
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL options+4(FP), SI
+	MOVQ bytes+8(FP), DX
+	MOVL num_bytes+16(FP), CX
+	MOVQ handles+24(FP), R8
+	MOVL num_handles+32(FP), R9
+	MOVQ vdso_zx_channel_write_etc(SB), AX
+	CALL AX
+	MOVL AX, ret+40(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_channel_call_noretry(handle uint32, options uint32, deadline int64, args unsafe.Pointer, actual_bytes unsafe.Pointer, actual_handles unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_channel_call_noretry(SB),NOSPLIT,$8-44
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL options+4(FP), SI
+	MOVQ deadline+8(FP), DX
+	MOVQ args+16(FP), CX
+	MOVQ actual_bytes+24(FP), R8
+	MOVQ actual_handles+32(FP), R9
+	MOVQ vdso_zx_channel_call_noretry(SB), AX
+	CALL AX
+	MOVL AX, ret+40(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_channel_call_finish(deadline int64, args unsafe.Pointer, actual_bytes unsafe.Pointer, actual_handles unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_channel_call_finish(SB),NOSPLIT,$8-36
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVQ deadline+0(FP), DI
+	MOVQ args+8(FP), SI
+	MOVQ actual_bytes+16(FP), DX
+	MOVQ actual_handles+24(FP), CX
+	MOVQ vdso_zx_channel_call_finish(SB), AX
+	CALL AX
+	MOVL AX, ret+32(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_channel_call(handle uint32, options uint32, deadline int64, args unsafe.Pointer, actual_bytes unsafe.Pointer, actual_handles unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_channel_call(SB),NOSPLIT,$8-44
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	CALL runtime·entersyscall(SB)
+	MOVL handle+0(FP), DI
+	MOVL options+4(FP), SI
+	MOVQ deadline+8(FP), DX
+	MOVQ args+16(FP), CX
+	MOVQ actual_bytes+24(FP), R8
+	MOVQ actual_handles+32(FP), R9
+	MOVQ vdso_zx_channel_call(SB), AX
+	CALL AX
+	MOVL AX, ret+40(FP)
+	CALL runtime·exitsyscall(SB)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_clock_get(clock_id uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_clock_get(SB),NOSPLIT,$8-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL clock_id+0(FP), DI
+	MOVQ out+8(FP), SI
+	MOVQ vdso_zx_clock_get(SB), AX
+	CALL AX
+	MOVL AX, ret+16(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_clock_get_monotonic() int64
+TEXT runtime·vdsoCall_zx_clock_get_monotonic(SB),NOSPLIT,$8-8
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVQ vdso_zx_clock_get_monotonic(SB), AX
+	CALL AX
+	MOVQ AX, ret+0(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_clock_adjust(handle uint32, clock_id uint32, offset int64) int32
+TEXT runtime·vdsoCall_zx_clock_adjust(SB),NOSPLIT,$8-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL clock_id+4(FP), SI
+	MOVQ offset+8(FP), DX
+	MOVQ vdso_zx_clock_adjust(SB), AX
+	CALL AX
+	MOVL AX, ret+16(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_clock_get_monotonic_via_kernel() int64
+TEXT runtime·vdsoCall_zx_clock_get_monotonic_via_kernel(SB),NOSPLIT,$8-8
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVQ vdso_zx_clock_get_monotonic_via_kernel(SB), AX
+	CALL AX
+	MOVQ AX, ret+0(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_clock_create(options uint64, args unsafe.Pointer, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_clock_create(SB),NOSPLIT,$8-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVQ options+0(FP), DI
+	MOVQ args+8(FP), SI
+	MOVQ out+16(FP), DX
+	MOVQ vdso_zx_clock_create(SB), AX
+	CALL AX
+	MOVL AX, ret+24(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_clock_read(handle uint32, now unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_clock_read(SB),NOSPLIT,$8-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVQ now+8(FP), SI
+	MOVQ vdso_zx_clock_read(SB), AX
+	CALL AX
+	MOVL AX, ret+16(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_clock_get_details(handle uint32, options uint64, details unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_clock_get_details(SB),NOSPLIT,$8-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVQ options+8(FP), SI
+	MOVQ details+16(FP), DX
+	MOVQ vdso_zx_clock_get_details(SB), AX
+	CALL AX
+	MOVL AX, ret+24(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_clock_update(handle uint32, options uint64, args unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_clock_update(SB),NOSPLIT,$8-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVQ options+8(FP), SI
+	MOVQ args+16(FP), DX
+	MOVQ vdso_zx_clock_update(SB), AX
+	CALL AX
+	MOVL AX, ret+24(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_cprng_draw_once(buffer unsafe.Pointer, buffer_size uint) int32
+TEXT runtime·vdsoCall_zx_cprng_draw_once(SB),NOSPLIT,$8-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVQ buffer+0(FP), DI
+	MOVQ buffer_size+8(FP), SI
+	MOVQ vdso_zx_cprng_draw_once(SB), AX
+	CALL AX
+	MOVL AX, ret+16(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_cprng_draw(buffer unsafe.Pointer, buffer_size uint)
+TEXT runtime·vdsoCall_zx_cprng_draw(SB),NOSPLIT,$8-16
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVQ buffer+0(FP), DI
+	MOVQ buffer_size+8(FP), SI
+	MOVQ vdso_zx_cprng_draw(SB), AX
+	CALL AX
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_cprng_add_entropy(buffer unsafe.Pointer, buffer_size uint) int32
+TEXT runtime·vdsoCall_zx_cprng_add_entropy(SB),NOSPLIT,$8-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVQ buffer+0(FP), DI
+	MOVQ buffer_size+8(FP), SI
+	MOVQ vdso_zx_cprng_add_entropy(SB), AX
+	CALL AX
+	MOVL AX, ret+16(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_debug_read(handle uint32, buffer unsafe.Pointer, buffer_size uint, actual unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_debug_read(SB),NOSPLIT,$8-36
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVQ buffer+8(FP), SI
+	MOVQ buffer_size+16(FP), DX
+	MOVQ actual+24(FP), CX
+	MOVQ vdso_zx_debug_read(SB), AX
+	CALL AX
+	MOVL AX, ret+32(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_debug_write(buffer unsafe.Pointer, buffer_size uint) int32
+TEXT runtime·vdsoCall_zx_debug_write(SB),NOSPLIT,$8-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVQ buffer+0(FP), DI
+	MOVQ buffer_size+8(FP), SI
+	MOVQ vdso_zx_debug_write(SB), AX
+	CALL AX
+	MOVL AX, ret+16(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_debug_send_command(resource uint32, buffer unsafe.Pointer, buffer_size uint) int32
+TEXT runtime·vdsoCall_zx_debug_send_command(SB),NOSPLIT,$8-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL resource+0(FP), DI
+	MOVQ buffer+8(FP), SI
+	MOVQ buffer_size+16(FP), DX
+	MOVQ vdso_zx_debug_send_command(SB), AX
+	CALL AX
+	MOVL AX, ret+24(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_debuglog_create(resource uint32, options uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_debuglog_create(SB),NOSPLIT,$8-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL resource+0(FP), DI
+	MOVL options+4(FP), SI
+	MOVQ out+8(FP), DX
+	MOVQ vdso_zx_debuglog_create(SB), AX
+	CALL AX
+	MOVL AX, ret+16(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_debuglog_write(handle uint32, options uint32, buffer unsafe.Pointer, buffer_size uint) int32
+TEXT runtime·vdsoCall_zx_debuglog_write(SB),NOSPLIT,$8-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL options+4(FP), SI
+	MOVQ buffer+8(FP), DX
+	MOVQ buffer_size+16(FP), CX
+	MOVQ vdso_zx_debuglog_write(SB), AX
+	CALL AX
+	MOVL AX, ret+24(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_debuglog_read(handle uint32, options uint32, buffer unsafe.Pointer, buffer_size uint) int32
+TEXT runtime·vdsoCall_zx_debuglog_read(SB),NOSPLIT,$8-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL options+4(FP), SI
+	MOVQ buffer+8(FP), DX
+	MOVQ buffer_size+16(FP), CX
+	MOVQ vdso_zx_debuglog_read(SB), AX
+	CALL AX
+	MOVL AX, ret+24(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_event_create(options uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_event_create(SB),NOSPLIT,$8-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL options+0(FP), DI
+	MOVQ out+8(FP), SI
+	MOVQ vdso_zx_event_create(SB), AX
+	CALL AX
+	MOVL AX, ret+16(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_eventpair_create(options uint32, out0 unsafe.Pointer, out1 unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_eventpair_create(SB),NOSPLIT,$8-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL options+0(FP), DI
+	MOVQ out0+8(FP), SI
+	MOVQ out1+16(FP), DX
+	MOVQ vdso_zx_eventpair_create(SB), AX
+	CALL AX
+	MOVL AX, ret+24(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_exception_get_thread(handle uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_exception_get_thread(SB),NOSPLIT,$8-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVQ out+8(FP), SI
+	MOVQ vdso_zx_exception_get_thread(SB), AX
+	CALL AX
+	MOVL AX, ret+16(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_exception_get_process(handle uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_exception_get_process(SB),NOSPLIT,$8-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVQ out+8(FP), SI
+	MOVQ vdso_zx_exception_get_process(SB), AX
+	CALL AX
+	MOVL AX, ret+16(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_fifo_create(elem_count uint, elem_size uint, options uint32, out0 unsafe.Pointer, out1 unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_fifo_create(SB),NOSPLIT,$8-44
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVQ elem_count+0(FP), DI
+	MOVQ elem_size+8(FP), SI
+	MOVL options+16(FP), DX
+	MOVQ out0+24(FP), CX
+	MOVQ out1+32(FP), R8
+	MOVQ vdso_zx_fifo_create(SB), AX
+	CALL AX
+	MOVL AX, ret+40(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_fifo_read(handle uint32, elem_size uint, data unsafe.Pointer, data_size uint, actual_count unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_fifo_read(SB),NOSPLIT,$8-44
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVQ elem_size+8(FP), SI
+	MOVQ data+16(FP), DX
+	MOVQ data_size+24(FP), CX
+	MOVQ actual_count+32(FP), R8
+	MOVQ vdso_zx_fifo_read(SB), AX
+	CALL AX
+	MOVL AX, ret+40(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_fifo_write(handle uint32, elem_size uint, data unsafe.Pointer, count uint, actual_count unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_fifo_write(SB),NOSPLIT,$8-44
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVQ elem_size+8(FP), SI
+	MOVQ data+16(FP), DX
+	MOVQ count+24(FP), CX
+	MOVQ actual_count+32(FP), R8
+	MOVQ vdso_zx_fifo_write(SB), AX
+	CALL AX
+	MOVL AX, ret+40(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_framebuffer_get_info(resource uint32, format unsafe.Pointer, width unsafe.Pointer, height unsafe.Pointer, stride unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_framebuffer_get_info(SB),NOSPLIT,$8-44
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL resource+0(FP), DI
+	MOVQ format+8(FP), SI
+	MOVQ width+16(FP), DX
+	MOVQ height+24(FP), CX
+	MOVQ stride+32(FP), R8
+	MOVQ vdso_zx_framebuffer_get_info(SB), AX
+	CALL AX
+	MOVL AX, ret+40(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_framebuffer_set_range(resource uint32, vmo uint32, len uint32, format uint32, width uint32, height uint32, stride uint32) int32
+TEXT runtime·vdsoCall_zx_framebuffer_set_range(SB),NOSPLIT,$32-36
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 48(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 48(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL resource+0(FP), DI
+	MOVL vmo+4(FP), SI
+	MOVL len+8(FP), DX
+	MOVL format+12(FP), CX
+	MOVL width+16(FP), R8
+	MOVL height+20(FP), R9
+	MOVL stride+24(FP), R12
+	MOVQ SP, BP   // BP is preserved across vsdo call by the x86-64 ABI
+	ANDQ $~15, SP // stack alignment for x86-64 ABI
+	PUSHQ R12
+	MOVQ vdso_zx_framebuffer_set_range(SB), AX
+	CALL AX
+	POPQ R12
+	MOVQ BP, SP
+	MOVL AX, ret+32(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_futex_wait(value_ptr unsafe.Pointer, current_value int32, new_futex_owner uint32, deadline int64) int32
+TEXT runtime·vdsoCall_zx_futex_wait(SB),NOSPLIT,$8-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVQ value_ptr+0(FP), DI
+	MOVL current_value+8(FP), SI
+	MOVL new_futex_owner+12(FP), DX
+	MOVQ deadline+16(FP), CX
+	MOVQ vdso_zx_futex_wait(SB), AX
+	CALL AX
+	MOVL AX, ret+24(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_futex_wake(value_ptr unsafe.Pointer, wake_count uint32) int32
+TEXT runtime·vdsoCall_zx_futex_wake(SB),NOSPLIT,$8-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVQ value_ptr+0(FP), DI
+	MOVL wake_count+8(FP), SI
+	MOVQ vdso_zx_futex_wake(SB), AX
+	CALL AX
+	MOVL AX, ret+16(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_futex_requeue(value_ptr unsafe.Pointer, wake_count uint32, current_value int32, requeue_ptr unsafe.Pointer, requeue_count uint32, new_requeue_owner uint32) int32
+TEXT runtime·vdsoCall_zx_futex_requeue(SB),NOSPLIT,$8-36
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVQ value_ptr+0(FP), DI
+	MOVL wake_count+8(FP), SI
+	MOVL current_value+12(FP), DX
+	MOVQ requeue_ptr+16(FP), CX
+	MOVL requeue_count+24(FP), R8
+	MOVL new_requeue_owner+28(FP), R9
+	MOVQ vdso_zx_futex_requeue(SB), AX
+	CALL AX
+	MOVL AX, ret+32(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_futex_wake_single_owner(value_ptr unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_futex_wake_single_owner(SB),NOSPLIT,$8-12
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVQ value_ptr+0(FP), DI
+	MOVQ vdso_zx_futex_wake_single_owner(SB), AX
+	CALL AX
+	MOVL AX, ret+8(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_futex_requeue_single_owner(value_ptr unsafe.Pointer, current_value int32, requeue_ptr unsafe.Pointer, requeue_count uint32, new_requeue_owner uint32) int32
+TEXT runtime·vdsoCall_zx_futex_requeue_single_owner(SB),NOSPLIT,$8-36
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVQ value_ptr+0(FP), DI
+	MOVL current_value+8(FP), SI
+	MOVQ requeue_ptr+16(FP), DX
+	MOVL requeue_count+24(FP), CX
+	MOVL new_requeue_owner+28(FP), R8
+	MOVQ vdso_zx_futex_requeue_single_owner(SB), AX
+	CALL AX
+	MOVL AX, ret+32(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_futex_get_owner(value_ptr unsafe.Pointer, koid unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_futex_get_owner(SB),NOSPLIT,$8-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVQ value_ptr+0(FP), DI
+	MOVQ koid+8(FP), SI
+	MOVQ vdso_zx_futex_get_owner(SB), AX
+	CALL AX
+	MOVL AX, ret+16(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_guest_create(resource uint32, options uint32, guest_handle unsafe.Pointer, vmar_handle unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_guest_create(SB),NOSPLIT,$8-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL resource+0(FP), DI
+	MOVL options+4(FP), SI
+	MOVQ guest_handle+8(FP), DX
+	MOVQ vmar_handle+16(FP), CX
+	MOVQ vdso_zx_guest_create(SB), AX
+	CALL AX
+	MOVL AX, ret+24(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_guest_set_trap(handle uint32, kind uint32, addr uintptr, size uint, port_handle uint32, key uint64) int32
+TEXT runtime·vdsoCall_zx_guest_set_trap(SB),NOSPLIT,$8-44
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL kind+4(FP), SI
+	MOVQ addr+8(FP), DX
+	MOVQ size+16(FP), CX
+	MOVL port_handle+24(FP), R8
+	MOVQ key+32(FP), R9
+	MOVQ vdso_zx_guest_set_trap(SB), AX
+	CALL AX
+	MOVL AX, ret+40(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_handle_close(handle uint32) int32
+TEXT runtime·vdsoCall_zx_handle_close(SB),NOSPLIT,$8-12
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVQ vdso_zx_handle_close(SB), AX
+	CALL AX
+	MOVL AX, ret+8(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_handle_close_many(handles unsafe.Pointer, num_handles uint) int32
+TEXT runtime·vdsoCall_zx_handle_close_many(SB),NOSPLIT,$8-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVQ handles+0(FP), DI
+	MOVQ num_handles+8(FP), SI
+	MOVQ vdso_zx_handle_close_many(SB), AX
+	CALL AX
+	MOVL AX, ret+16(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_handle_duplicate(handle uint32, rights uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_handle_duplicate(SB),NOSPLIT,$8-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL rights+4(FP), SI
+	MOVQ out+8(FP), DX
+	MOVQ vdso_zx_handle_duplicate(SB), AX
+	CALL AX
+	MOVL AX, ret+16(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_handle_replace(handle uint32, rights uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_handle_replace(SB),NOSPLIT,$8-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL rights+4(FP), SI
+	MOVQ out+8(FP), DX
+	MOVQ vdso_zx_handle_replace(SB), AX
+	CALL AX
+	MOVL AX, ret+16(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_interrupt_create(src_obj uint32, src_num uint32, options uint32, out_handle unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_interrupt_create(SB),NOSPLIT,$8-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL src_obj+0(FP), DI
+	MOVL src_num+4(FP), SI
+	MOVL options+8(FP), DX
+	MOVQ out_handle+16(FP), CX
+	MOVQ vdso_zx_interrupt_create(SB), AX
+	CALL AX
+	MOVL AX, ret+24(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_interrupt_bind(handle uint32, port_handle uint32, key uint64, options uint32) int32
+TEXT runtime·vdsoCall_zx_interrupt_bind(SB),NOSPLIT,$8-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL port_handle+4(FP), SI
+	MOVQ key+8(FP), DX
+	MOVL options+16(FP), CX
+	MOVQ vdso_zx_interrupt_bind(SB), AX
+	CALL AX
+	MOVL AX, ret+24(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_interrupt_wait(handle uint32, out_timestamp unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_interrupt_wait(SB),NOSPLIT,$8-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	CALL runtime·entersyscall(SB)
+	MOVL handle+0(FP), DI
+	MOVQ out_timestamp+8(FP), SI
+	MOVQ vdso_zx_interrupt_wait(SB), AX
+	CALL AX
+	MOVL AX, ret+16(FP)
+	CALL runtime·exitsyscall(SB)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_interrupt_destroy(handle uint32) int32
+TEXT runtime·vdsoCall_zx_interrupt_destroy(SB),NOSPLIT,$8-12
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVQ vdso_zx_interrupt_destroy(SB), AX
+	CALL AX
+	MOVL AX, ret+8(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_interrupt_ack(handle uint32) int32
+TEXT runtime·vdsoCall_zx_interrupt_ack(SB),NOSPLIT,$8-12
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVQ vdso_zx_interrupt_ack(SB), AX
+	CALL AX
+	MOVL AX, ret+8(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_interrupt_trigger(handle uint32, options uint32, timestamp int64) int32
+TEXT runtime·vdsoCall_zx_interrupt_trigger(SB),NOSPLIT,$8-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL options+4(FP), SI
+	MOVQ timestamp+8(FP), DX
+	MOVQ vdso_zx_interrupt_trigger(SB), AX
+	CALL AX
+	MOVL AX, ret+16(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_interrupt_bind_vcpu(handle uint32, vcpu uint32, options uint32) int32
+TEXT runtime·vdsoCall_zx_interrupt_bind_vcpu(SB),NOSPLIT,$8-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL vcpu+4(FP), SI
+	MOVL options+8(FP), DX
+	MOVQ vdso_zx_interrupt_bind_vcpu(SB), AX
+	CALL AX
+	MOVL AX, ret+16(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_iommu_create(resource uint32, typ uint32, desc unsafe.Pointer, desc_size uint, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_iommu_create(SB),NOSPLIT,$8-36
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL resource+0(FP), DI
+	MOVL typ+4(FP), SI
+	MOVQ desc+8(FP), DX
+	MOVQ desc_size+16(FP), CX
+	MOVQ out+24(FP), R8
+	MOVQ vdso_zx_iommu_create(SB), AX
+	CALL AX
+	MOVL AX, ret+32(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_ioports_request(resource uint32, io_addr uint16, len uint32) int32
+TEXT runtime·vdsoCall_zx_ioports_request(SB),NOSPLIT,$8-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL resource+0(FP), DI
+	MOVQ io_addr+4(FP), SI
+	MOVL len+8(FP), DX
+	MOVQ vdso_zx_ioports_request(SB), AX
+	CALL AX
+	MOVL AX, ret+16(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_ioports_release(resource uint32, io_addr uint16, len uint32) int32
+TEXT runtime·vdsoCall_zx_ioports_release(SB),NOSPLIT,$8-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL resource+0(FP), DI
+	MOVQ io_addr+4(FP), SI
+	MOVL len+8(FP), DX
+	MOVQ vdso_zx_ioports_release(SB), AX
+	CALL AX
+	MOVL AX, ret+16(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_job_create(parent_job uint32, options uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_job_create(SB),NOSPLIT,$8-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL parent_job+0(FP), DI
+	MOVL options+4(FP), SI
+	MOVQ out+8(FP), DX
+	MOVQ vdso_zx_job_create(SB), AX
+	CALL AX
+	MOVL AX, ret+16(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_job_set_policy(handle uint32, options uint32, topic uint32, policy unsafe.Pointer, policy_size uint32) int32
+TEXT runtime·vdsoCall_zx_job_set_policy(SB),NOSPLIT,$8-36
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL options+4(FP), SI
+	MOVL topic+8(FP), DX
+	MOVQ policy+16(FP), CX
+	MOVL policy_size+24(FP), R8
+	MOVQ vdso_zx_job_set_policy(SB), AX
+	CALL AX
+	MOVL AX, ret+32(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_job_set_critical(job uint32, options uint32, process uint32) int32
+TEXT runtime·vdsoCall_zx_job_set_critical(SB),NOSPLIT,$8-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL job+0(FP), DI
+	MOVL options+4(FP), SI
+	MOVL process+8(FP), DX
+	MOVQ vdso_zx_job_set_critical(SB), AX
+	CALL AX
+	MOVL AX, ret+16(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_ktrace_read(handle uint32, data unsafe.Pointer, offset uint32, data_size uint, actual unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_ktrace_read(SB),NOSPLIT,$8-44
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVQ data+8(FP), SI
+	MOVL offset+16(FP), DX
+	MOVQ data_size+24(FP), CX
+	MOVQ actual+32(FP), R8
+	MOVQ vdso_zx_ktrace_read(SB), AX
+	CALL AX
+	MOVL AX, ret+40(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_ktrace_control(handle uint32, action uint32, options uint32, ptr unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_ktrace_control(SB),NOSPLIT,$8-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL action+4(FP), SI
+	MOVL options+8(FP), DX
+	MOVQ ptr+16(FP), CX
+	MOVQ vdso_zx_ktrace_control(SB), AX
+	CALL AX
+	MOVL AX, ret+24(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_ktrace_write(handle uint32, id uint32, arg0 uint32, arg1 uint32) int32
+TEXT runtime·vdsoCall_zx_ktrace_write(SB),NOSPLIT,$8-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL id+4(FP), SI
+	MOVL arg0+8(FP), DX
+	MOVL arg1+12(FP), CX
+	MOVQ vdso_zx_ktrace_write(SB), AX
+	CALL AX
+	MOVL AX, ret+16(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_nanosleep(deadline int64) int32
+TEXT runtime·vdsoCall_zx_nanosleep(SB),NOSPLIT,$8-12
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVQ deadline+0(FP), DI
+	MOVQ vdso_zx_nanosleep(SB), AX
+	CALL AX
+	MOVL AX, ret+8(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_ticks_get() int64
+TEXT runtime·vdsoCall_zx_ticks_get(SB),NOSPLIT,$8-8
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVQ vdso_zx_ticks_get(SB), AX
+	CALL AX
+	MOVQ AX, ret+0(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_ticks_per_second() int64
+TEXT runtime·vdsoCall_zx_ticks_per_second(SB),NOSPLIT,$8-8
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVQ vdso_zx_ticks_per_second(SB), AX
+	CALL AX
+	MOVQ AX, ret+0(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_deadline_after(nanoseconds int64) int64
+TEXT runtime·vdsoCall_zx_deadline_after(SB),NOSPLIT,$8-16
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVQ nanoseconds+0(FP), DI
+	MOVQ vdso_zx_deadline_after(SB), AX
+	CALL AX
+	MOVQ AX, ret+8(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_vmar_unmap_handle_close_thread_exit(vmar_handle uint32, addr uintptr, size uint, close_handle uint32) int32
+TEXT runtime·vdsoCall_zx_vmar_unmap_handle_close_thread_exit(SB),NOSPLIT,$8-36
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL vmar_handle+0(FP), DI
+	MOVQ addr+8(FP), SI
+	MOVQ size+16(FP), DX
+	MOVL close_handle+24(FP), CX
+	MOVQ vdso_zx_vmar_unmap_handle_close_thread_exit(SB), AX
+	CALL AX
+	MOVL AX, ret+32(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_futex_wake_handle_close_thread_exit(value_ptr unsafe.Pointer, wake_count uint32, new_value int32, close_handle uint32)
+TEXT runtime·vdsoCall_zx_futex_wake_handle_close_thread_exit(SB),NOSPLIT,$8-24
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVQ value_ptr+0(FP), DI
+	MOVL wake_count+8(FP), SI
+	MOVL new_value+12(FP), DX
+	MOVL close_handle+16(FP), CX
+	MOVQ vdso_zx_futex_wake_handle_close_thread_exit(SB), AX
+	CALL AX
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_ticks_get_via_kernel() int64
+TEXT runtime·vdsoCall_zx_ticks_get_via_kernel(SB),NOSPLIT,$8-8
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVQ vdso_zx_ticks_get_via_kernel(SB), AX
+	CALL AX
+	MOVQ AX, ret+0(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_msi_allocate(handle uint32, count uint32, out_allocation unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_msi_allocate(SB),NOSPLIT,$8-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL count+4(FP), SI
+	MOVQ out_allocation+8(FP), DX
+	MOVQ vdso_zx_msi_allocate(SB), AX
+	CALL AX
+	MOVL AX, ret+16(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_msi_create(handle uint32, options uint32, msi_id uint32, vmo uint32, vmo_offset uint, out_interrupt unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_msi_create(SB),NOSPLIT,$8-36
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL options+4(FP), SI
+	MOVL msi_id+8(FP), DX
+	MOVL vmo+12(FP), CX
+	MOVQ vmo_offset+16(FP), R8
+	MOVQ out_interrupt+24(FP), R9
+	MOVQ vdso_zx_msi_create(SB), AX
+	CALL AX
+	MOVL AX, ret+32(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_mtrace_control(handle uint32, kind uint32, action uint32, options uint32, ptr unsafe.Pointer, ptr_size uint) int32
+TEXT runtime·vdsoCall_zx_mtrace_control(SB),NOSPLIT,$8-36
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL kind+4(FP), SI
+	MOVL action+8(FP), DX
+	MOVL options+12(FP), CX
+	MOVQ ptr+16(FP), R8
+	MOVQ ptr_size+24(FP), R9
+	MOVQ vdso_zx_mtrace_control(SB), AX
+	CALL AX
+	MOVL AX, ret+32(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_object_wait_one(handle uint32, signals uint32, deadline int64, observed unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_object_wait_one(SB),NOSPLIT,$8-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	CALL runtime·entersyscall(SB)
+	MOVL handle+0(FP), DI
+	MOVL signals+4(FP), SI
+	MOVQ deadline+8(FP), DX
+	MOVQ observed+16(FP), CX
+	MOVQ vdso_zx_object_wait_one(SB), AX
+	CALL AX
+	MOVL AX, ret+24(FP)
+	CALL runtime·exitsyscall(SB)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_object_wait_many(items unsafe.Pointer, num_items uint, deadline int64) int32
+TEXT runtime·vdsoCall_zx_object_wait_many(SB),NOSPLIT,$8-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	CALL runtime·entersyscall(SB)
+	MOVQ items+0(FP), DI
+	MOVQ num_items+8(FP), SI
+	MOVQ deadline+16(FP), DX
+	MOVQ vdso_zx_object_wait_many(SB), AX
+	CALL AX
+	MOVL AX, ret+24(FP)
+	CALL runtime·exitsyscall(SB)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_object_wait_async(handle uint32, port uint32, key uint64, signals uint32, options uint32) int32
+TEXT runtime·vdsoCall_zx_object_wait_async(SB),NOSPLIT,$8-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL port+4(FP), SI
+	MOVQ key+8(FP), DX
+	MOVL signals+16(FP), CX
+	MOVL options+20(FP), R8
+	MOVQ vdso_zx_object_wait_async(SB), AX
+	CALL AX
+	MOVL AX, ret+24(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_object_signal(handle uint32, clear_mask uint32, set_mask uint32) int32
+TEXT runtime·vdsoCall_zx_object_signal(SB),NOSPLIT,$8-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL clear_mask+4(FP), SI
+	MOVL set_mask+8(FP), DX
+	MOVQ vdso_zx_object_signal(SB), AX
+	CALL AX
+	MOVL AX, ret+16(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_object_signal_peer(handle uint32, clear_mask uint32, set_mask uint32) int32
+TEXT runtime·vdsoCall_zx_object_signal_peer(SB),NOSPLIT,$8-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL clear_mask+4(FP), SI
+	MOVL set_mask+8(FP), DX
+	MOVQ vdso_zx_object_signal_peer(SB), AX
+	CALL AX
+	MOVL AX, ret+16(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_object_get_property(handle uint32, property uint32, value unsafe.Pointer, value_size uint) int32
+TEXT runtime·vdsoCall_zx_object_get_property(SB),NOSPLIT,$8-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL property+4(FP), SI
+	MOVQ value+8(FP), DX
+	MOVQ value_size+16(FP), CX
+	MOVQ vdso_zx_object_get_property(SB), AX
+	CALL AX
+	MOVL AX, ret+24(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_object_set_property(handle uint32, property uint32, value unsafe.Pointer, value_size uint) int32
+TEXT runtime·vdsoCall_zx_object_set_property(SB),NOSPLIT,$8-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL property+4(FP), SI
+	MOVQ value+8(FP), DX
+	MOVQ value_size+16(FP), CX
+	MOVQ vdso_zx_object_set_property(SB), AX
+	CALL AX
+	MOVL AX, ret+24(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_object_get_info(handle uint32, topic uint32, buffer unsafe.Pointer, buffer_size uint, actual unsafe.Pointer, avail unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_object_get_info(SB),NOSPLIT,$8-44
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL topic+4(FP), SI
+	MOVQ buffer+8(FP), DX
+	MOVQ buffer_size+16(FP), CX
+	MOVQ actual+24(FP), R8
+	MOVQ avail+32(FP), R9
+	MOVQ vdso_zx_object_get_info(SB), AX
+	CALL AX
+	MOVL AX, ret+40(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_object_get_child(handle uint32, koid uint64, rights uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_object_get_child(SB),NOSPLIT,$8-36
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVQ koid+8(FP), SI
+	MOVL rights+16(FP), DX
+	MOVQ out+24(FP), CX
+	MOVQ vdso_zx_object_get_child(SB), AX
+	CALL AX
+	MOVL AX, ret+32(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_object_set_profile(handle uint32, profile uint32, options uint32) int32
+TEXT runtime·vdsoCall_zx_object_set_profile(SB),NOSPLIT,$8-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL profile+4(FP), SI
+	MOVL options+8(FP), DX
+	MOVQ vdso_zx_object_set_profile(SB), AX
+	CALL AX
+	MOVL AX, ret+16(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_pager_create(options uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_pager_create(SB),NOSPLIT,$8-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL options+0(FP), DI
+	MOVQ out+8(FP), SI
+	MOVQ vdso_zx_pager_create(SB), AX
+	CALL AX
+	MOVL AX, ret+16(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_pager_create_vmo(pager uint32, options uint32, port uint32, key uint64, size uint64, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_pager_create_vmo(SB),NOSPLIT,$8-44
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL pager+0(FP), DI
+	MOVL options+4(FP), SI
+	MOVL port+8(FP), DX
+	MOVQ key+16(FP), CX
+	MOVQ size+24(FP), R8
+	MOVQ out+32(FP), R9
+	MOVQ vdso_zx_pager_create_vmo(SB), AX
+	CALL AX
+	MOVL AX, ret+40(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_pager_detach_vmo(pager uint32, vmo uint32) int32
+TEXT runtime·vdsoCall_zx_pager_detach_vmo(SB),NOSPLIT,$8-12
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL pager+0(FP), DI
+	MOVL vmo+4(FP), SI
+	MOVQ vdso_zx_pager_detach_vmo(SB), AX
+	CALL AX
+	MOVL AX, ret+8(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_pager_supply_pages(pager uint32, pager_vmo uint32, offset uint64, length uint64, aux_vmo uint32, aux_offset uint64) int32
+TEXT runtime·vdsoCall_zx_pager_supply_pages(SB),NOSPLIT,$8-44
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL pager+0(FP), DI
+	MOVL pager_vmo+4(FP), SI
+	MOVQ offset+8(FP), DX
+	MOVQ length+16(FP), CX
+	MOVL aux_vmo+24(FP), R8
+	MOVQ aux_offset+32(FP), R9
+	MOVQ vdso_zx_pager_supply_pages(SB), AX
+	CALL AX
+	MOVL AX, ret+40(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_pager_op_range(pager uint32, op uint32, pager_vmo uint32, offset uint64, length uint64, data uint64) int32
+TEXT runtime·vdsoCall_zx_pager_op_range(SB),NOSPLIT,$8-44
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL pager+0(FP), DI
+	MOVL op+4(FP), SI
+	MOVL pager_vmo+8(FP), DX
+	MOVQ offset+16(FP), CX
+	MOVQ length+24(FP), R8
+	MOVQ data+32(FP), R9
+	MOVQ vdso_zx_pager_op_range(SB), AX
+	CALL AX
+	MOVL AX, ret+40(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_pc_firmware_tables(handle uint32, acpi_rsdp unsafe.Pointer, smbios unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_pc_firmware_tables(SB),NOSPLIT,$8-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVQ acpi_rsdp+8(FP), SI
+	MOVQ smbios+16(FP), DX
+	MOVQ vdso_zx_pc_firmware_tables(SB), AX
+	CALL AX
+	MOVL AX, ret+24(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_pci_get_nth_device(handle uint32, index uint32, out_info unsafe.Pointer, out_handle unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_pci_get_nth_device(SB),NOSPLIT,$8-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL index+4(FP), SI
+	MOVQ out_info+8(FP), DX
+	MOVQ out_handle+16(FP), CX
+	MOVQ vdso_zx_pci_get_nth_device(SB), AX
+	CALL AX
+	MOVL AX, ret+24(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_pci_enable_bus_master(handle uint32, enable uint32) int32
+TEXT runtime·vdsoCall_zx_pci_enable_bus_master(SB),NOSPLIT,$8-12
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL enable+4(FP), SI
+	MOVQ vdso_zx_pci_enable_bus_master(SB), AX
+	CALL AX
+	MOVL AX, ret+8(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_pci_reset_device(handle uint32) int32
+TEXT runtime·vdsoCall_zx_pci_reset_device(SB),NOSPLIT,$8-12
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVQ vdso_zx_pci_reset_device(SB), AX
+	CALL AX
+	MOVL AX, ret+8(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_pci_config_read(handle uint32, offset uint16, width uint, out_val unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_pci_config_read(SB),NOSPLIT,$8-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVQ offset+4(FP), SI
+	MOVQ width+8(FP), DX
+	MOVQ out_val+16(FP), CX
+	MOVQ vdso_zx_pci_config_read(SB), AX
+	CALL AX
+	MOVL AX, ret+24(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_pci_config_write(handle uint32, offset uint16, width uint, val uint32) int32
+TEXT runtime·vdsoCall_zx_pci_config_write(SB),NOSPLIT,$8-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVQ offset+4(FP), SI
+	MOVQ width+8(FP), DX
+	MOVL val+16(FP), CX
+	MOVQ vdso_zx_pci_config_write(SB), AX
+	CALL AX
+	MOVL AX, ret+24(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_pci_cfg_pio_rw(handle uint32, bus uint8, dev uint8, funk uint8, offset uint8, val unsafe.Pointer, width uint, write uint32) int32
+TEXT runtime·vdsoCall_zx_pci_cfg_pio_rw(SB),NOSPLIT,$40-36
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 56(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 56(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVQ bus+4(FP), SI
+	MOVQ dev+5(FP), DX
+	MOVQ funk+6(FP), CX
+	MOVQ offset+7(FP), R8
+	MOVQ val+8(FP), R9
+	MOVQ width+16(FP), R12
+	MOVL write+24(FP), R13
+	MOVQ SP, BP   // BP is preserved across vsdo call by the x86-64 ABI
+	ANDQ $~15, SP // stack alignment for x86-64 ABI
+	PUSHQ R13
+	PUSHQ R12
+	MOVQ vdso_zx_pci_cfg_pio_rw(SB), AX
+	CALL AX
+	POPQ R12
+	POPQ R13
+	MOVQ BP, SP
+	MOVL AX, ret+32(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_pci_get_bar(handle uint32, bar_num uint32, out_bar unsafe.Pointer, out_handle unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_pci_get_bar(SB),NOSPLIT,$8-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL bar_num+4(FP), SI
+	MOVQ out_bar+8(FP), DX
+	MOVQ out_handle+16(FP), CX
+	MOVQ vdso_zx_pci_get_bar(SB), AX
+	CALL AX
+	MOVL AX, ret+24(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_pci_map_interrupt(handle uint32, which_irq int32, out_handle unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_pci_map_interrupt(SB),NOSPLIT,$8-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL which_irq+4(FP), SI
+	MOVQ out_handle+8(FP), DX
+	MOVQ vdso_zx_pci_map_interrupt(SB), AX
+	CALL AX
+	MOVL AX, ret+16(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_pci_query_irq_mode(handle uint32, mode uint32, out_max_irqs unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_pci_query_irq_mode(SB),NOSPLIT,$8-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL mode+4(FP), SI
+	MOVQ out_max_irqs+8(FP), DX
+	MOVQ vdso_zx_pci_query_irq_mode(SB), AX
+	CALL AX
+	MOVL AX, ret+16(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_pci_set_irq_mode(handle uint32, mode uint32, requested_irq_count uint32) int32
+TEXT runtime·vdsoCall_zx_pci_set_irq_mode(SB),NOSPLIT,$8-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL mode+4(FP), SI
+	MOVL requested_irq_count+8(FP), DX
+	MOVQ vdso_zx_pci_set_irq_mode(SB), AX
+	CALL AX
+	MOVL AX, ret+16(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_pci_init(handle uint32, init_buf unsafe.Pointer, len uint32) int32
+TEXT runtime·vdsoCall_zx_pci_init(SB),NOSPLIT,$8-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVQ init_buf+8(FP), SI
+	MOVL len+16(FP), DX
+	MOVQ vdso_zx_pci_init(SB), AX
+	CALL AX
+	MOVL AX, ret+24(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_pci_add_subtract_io_range(handle uint32, mmio uint32, base uint64, len uint64, add uint32) int32
+TEXT runtime·vdsoCall_zx_pci_add_subtract_io_range(SB),NOSPLIT,$8-36
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL mmio+4(FP), SI
+	MOVQ base+8(FP), DX
+	MOVQ len+16(FP), CX
+	MOVL add+24(FP), R8
+	MOVQ vdso_zx_pci_add_subtract_io_range(SB), AX
+	CALL AX
+	MOVL AX, ret+32(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_pmt_unpin(handle uint32) int32
+TEXT runtime·vdsoCall_zx_pmt_unpin(SB),NOSPLIT,$8-12
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVQ vdso_zx_pmt_unpin(SB), AX
+	CALL AX
+	MOVL AX, ret+8(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_port_create(options uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_port_create(SB),NOSPLIT,$8-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL options+0(FP), DI
+	MOVQ out+8(FP), SI
+	MOVQ vdso_zx_port_create(SB), AX
+	CALL AX
+	MOVL AX, ret+16(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_port_queue(handle uint32, packet unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_port_queue(SB),NOSPLIT,$8-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVQ packet+8(FP), SI
+	MOVQ vdso_zx_port_queue(SB), AX
+	CALL AX
+	MOVL AX, ret+16(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_port_wait(handle uint32, deadline int64, packet unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_port_wait(SB),NOSPLIT,$8-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	CALL runtime·entersyscall(SB)
+	MOVL handle+0(FP), DI
+	MOVQ deadline+8(FP), SI
+	MOVQ packet+16(FP), DX
+	MOVQ vdso_zx_port_wait(SB), AX
+	CALL AX
+	MOVL AX, ret+24(FP)
+	CALL runtime·exitsyscall(SB)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_port_cancel(handle uint32, source uint32, key uint64) int32
+TEXT runtime·vdsoCall_zx_port_cancel(SB),NOSPLIT,$8-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL source+4(FP), SI
+	MOVQ key+8(FP), DX
+	MOVQ vdso_zx_port_cancel(SB), AX
+	CALL AX
+	MOVL AX, ret+16(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_process_exit(retcode int64)
+TEXT runtime·vdsoCall_zx_process_exit(SB),NOSPLIT,$8-8
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVQ retcode+0(FP), DI
+	MOVQ vdso_zx_process_exit(SB), AX
+	CALL AX
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_process_create(job uint32, name unsafe.Pointer, name_size uint, options uint32, proc_handle unsafe.Pointer, vmar_handle unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_process_create(SB),NOSPLIT,$8-52
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL job+0(FP), DI
+	MOVQ name+8(FP), SI
+	MOVQ name_size+16(FP), DX
+	MOVL options+24(FP), CX
+	MOVQ proc_handle+32(FP), R8
+	MOVQ vmar_handle+40(FP), R9
+	MOVQ vdso_zx_process_create(SB), AX
+	CALL AX
+	MOVL AX, ret+48(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_process_start(handle uint32, thread uint32, entry uintptr, stack uintptr, arg1 uint32, arg2 uintptr) int32
+TEXT runtime·vdsoCall_zx_process_start(SB),NOSPLIT,$8-44
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL thread+4(FP), SI
+	MOVQ entry+8(FP), DX
+	MOVQ stack+16(FP), CX
+	MOVL arg1+24(FP), R8
+	MOVQ arg2+32(FP), R9
+	MOVQ vdso_zx_process_start(SB), AX
+	CALL AX
+	MOVL AX, ret+40(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_process_read_memory(handle uint32, vaddr uintptr, buffer unsafe.Pointer, buffer_size uint, actual unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_process_read_memory(SB),NOSPLIT,$8-44
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVQ vaddr+8(FP), SI
+	MOVQ buffer+16(FP), DX
+	MOVQ buffer_size+24(FP), CX
+	MOVQ actual+32(FP), R8
+	MOVQ vdso_zx_process_read_memory(SB), AX
+	CALL AX
+	MOVL AX, ret+40(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_process_write_memory(handle uint32, vaddr uintptr, buffer unsafe.Pointer, buffer_size uint, actual unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_process_write_memory(SB),NOSPLIT,$8-44
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVQ vaddr+8(FP), SI
+	MOVQ buffer+16(FP), DX
+	MOVQ buffer_size+24(FP), CX
+	MOVQ actual+32(FP), R8
+	MOVQ vdso_zx_process_write_memory(SB), AX
+	CALL AX
+	MOVL AX, ret+40(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_profile_create(root_job uint32, options uint32, profile unsafe.Pointer, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_profile_create(SB),NOSPLIT,$8-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL root_job+0(FP), DI
+	MOVL options+4(FP), SI
+	MOVQ profile+8(FP), DX
+	MOVQ out+16(FP), CX
+	MOVQ vdso_zx_profile_create(SB), AX
+	CALL AX
+	MOVL AX, ret+24(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_resource_create(parent_rsrc uint32, options uint32, base uint64, size uint, name unsafe.Pointer, name_size uint, resource_out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_resource_create(SB),NOSPLIT,$32-52
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 48(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 48(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL parent_rsrc+0(FP), DI
+	MOVL options+4(FP), SI
+	MOVQ base+8(FP), DX
+	MOVQ size+16(FP), CX
+	MOVQ name+24(FP), R8
+	MOVQ name_size+32(FP), R9
+	MOVQ resource_out+40(FP), R12
+	MOVQ SP, BP   // BP is preserved across vsdo call by the x86-64 ABI
+	ANDQ $~15, SP // stack alignment for x86-64 ABI
+	PUSHQ R12
+	MOVQ vdso_zx_resource_create(SB), AX
+	CALL AX
+	POPQ R12
+	MOVQ BP, SP
+	MOVL AX, ret+48(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_smc_call(handle uint32, parameters unsafe.Pointer, out_smc_result unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_smc_call(SB),NOSPLIT,$8-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVQ parameters+8(FP), SI
+	MOVQ out_smc_result+16(FP), DX
+	MOVQ vdso_zx_smc_call(SB), AX
+	CALL AX
+	MOVL AX, ret+24(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_socket_create(options uint32, out0 unsafe.Pointer, out1 unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_socket_create(SB),NOSPLIT,$8-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL options+0(FP), DI
+	MOVQ out0+8(FP), SI
+	MOVQ out1+16(FP), DX
+	MOVQ vdso_zx_socket_create(SB), AX
+	CALL AX
+	MOVL AX, ret+24(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_socket_write(handle uint32, options uint32, buffer unsafe.Pointer, buffer_size uint, actual unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_socket_write(SB),NOSPLIT,$8-36
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL options+4(FP), SI
+	MOVQ buffer+8(FP), DX
+	MOVQ buffer_size+16(FP), CX
+	MOVQ actual+24(FP), R8
+	MOVQ vdso_zx_socket_write(SB), AX
+	CALL AX
+	MOVL AX, ret+32(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_socket_read(handle uint32, options uint32, buffer unsafe.Pointer, buffer_size uint, actual unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_socket_read(SB),NOSPLIT,$8-36
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL options+4(FP), SI
+	MOVQ buffer+8(FP), DX
+	MOVQ buffer_size+16(FP), CX
+	MOVQ actual+24(FP), R8
+	MOVQ vdso_zx_socket_read(SB), AX
+	CALL AX
+	MOVL AX, ret+32(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_socket_shutdown(handle uint32, options uint32) int32
+TEXT runtime·vdsoCall_zx_socket_shutdown(SB),NOSPLIT,$8-12
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL options+4(FP), SI
+	MOVQ vdso_zx_socket_shutdown(SB), AX
+	CALL AX
+	MOVL AX, ret+8(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_stream_create(options uint32, vmo uint32, seek uint64, out_stream unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_stream_create(SB),NOSPLIT,$8-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL options+0(FP), DI
+	MOVL vmo+4(FP), SI
+	MOVQ seek+8(FP), DX
+	MOVQ out_stream+16(FP), CX
+	MOVQ vdso_zx_stream_create(SB), AX
+	CALL AX
+	MOVL AX, ret+24(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_stream_writev(handle uint32, options uint32, vector unsafe.Pointer, num_vector uint, actual unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_stream_writev(SB),NOSPLIT,$8-36
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL options+4(FP), SI
+	MOVQ vector+8(FP), DX
+	MOVQ num_vector+16(FP), CX
+	MOVQ actual+24(FP), R8
+	MOVQ vdso_zx_stream_writev(SB), AX
+	CALL AX
+	MOVL AX, ret+32(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_stream_writev_at(handle uint32, options uint32, offset uint64, vector unsafe.Pointer, num_vector uint, actual unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_stream_writev_at(SB),NOSPLIT,$8-44
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL options+4(FP), SI
+	MOVQ offset+8(FP), DX
+	MOVQ vector+16(FP), CX
+	MOVQ num_vector+24(FP), R8
+	MOVQ actual+32(FP), R9
+	MOVQ vdso_zx_stream_writev_at(SB), AX
+	CALL AX
+	MOVL AX, ret+40(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_stream_readv(handle uint32, options uint32, vector unsafe.Pointer, num_vector uint, actual unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_stream_readv(SB),NOSPLIT,$8-36
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL options+4(FP), SI
+	MOVQ vector+8(FP), DX
+	MOVQ num_vector+16(FP), CX
+	MOVQ actual+24(FP), R8
+	MOVQ vdso_zx_stream_readv(SB), AX
+	CALL AX
+	MOVL AX, ret+32(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_stream_readv_at(handle uint32, options uint32, offset uint64, vector unsafe.Pointer, num_vector uint, actual unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_stream_readv_at(SB),NOSPLIT,$8-44
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL options+4(FP), SI
+	MOVQ offset+8(FP), DX
+	MOVQ vector+16(FP), CX
+	MOVQ num_vector+24(FP), R8
+	MOVQ actual+32(FP), R9
+	MOVQ vdso_zx_stream_readv_at(SB), AX
+	CALL AX
+	MOVL AX, ret+40(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_stream_seek(handle uint32, whence uint32, offset int64, out_seek unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_stream_seek(SB),NOSPLIT,$8-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL whence+4(FP), SI
+	MOVQ offset+8(FP), DX
+	MOVQ out_seek+16(FP), CX
+	MOVQ vdso_zx_stream_seek(SB), AX
+	CALL AX
+	MOVL AX, ret+24(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_syscall_test_0() int32
+TEXT runtime·vdsoCall_zx_syscall_test_0(SB),NOSPLIT,$8-4
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVQ vdso_zx_syscall_test_0(SB), AX
+	CALL AX
+	MOVL AX, ret+0(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_syscall_test_1(a int32) int32
+TEXT runtime·vdsoCall_zx_syscall_test_1(SB),NOSPLIT,$8-12
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL a+0(FP), DI
+	MOVQ vdso_zx_syscall_test_1(SB), AX
+	CALL AX
+	MOVL AX, ret+8(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_syscall_test_2(a int32, b int32) int32
+TEXT runtime·vdsoCall_zx_syscall_test_2(SB),NOSPLIT,$8-12
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL a+0(FP), DI
+	MOVL b+4(FP), SI
+	MOVQ vdso_zx_syscall_test_2(SB), AX
+	CALL AX
+	MOVL AX, ret+8(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_syscall_test_3(a int32, b int32, c int32) int32
+TEXT runtime·vdsoCall_zx_syscall_test_3(SB),NOSPLIT,$8-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL a+0(FP), DI
+	MOVL b+4(FP), SI
+	MOVL c+8(FP), DX
+	MOVQ vdso_zx_syscall_test_3(SB), AX
+	CALL AX
+	MOVL AX, ret+16(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_syscall_test_4(a int32, b int32, c int32, d int32) int32
+TEXT runtime·vdsoCall_zx_syscall_test_4(SB),NOSPLIT,$8-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL a+0(FP), DI
+	MOVL b+4(FP), SI
+	MOVL c+8(FP), DX
+	MOVL d+12(FP), CX
+	MOVQ vdso_zx_syscall_test_4(SB), AX
+	CALL AX
+	MOVL AX, ret+16(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_syscall_test_5(a int32, b int32, c int32, d int32, e int32) int32
+TEXT runtime·vdsoCall_zx_syscall_test_5(SB),NOSPLIT,$8-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL a+0(FP), DI
+	MOVL b+4(FP), SI
+	MOVL c+8(FP), DX
+	MOVL d+12(FP), CX
+	MOVL e+16(FP), R8
+	MOVQ vdso_zx_syscall_test_5(SB), AX
+	CALL AX
+	MOVL AX, ret+24(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_syscall_test_6(a int32, b int32, c int32, d int32, e int32, f int32) int32
+TEXT runtime·vdsoCall_zx_syscall_test_6(SB),NOSPLIT,$8-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL a+0(FP), DI
+	MOVL b+4(FP), SI
+	MOVL c+8(FP), DX
+	MOVL d+12(FP), CX
+	MOVL e+16(FP), R8
+	MOVL f+20(FP), R9
+	MOVQ vdso_zx_syscall_test_6(SB), AX
+	CALL AX
+	MOVL AX, ret+24(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_syscall_test_7(a int32, b int32, c int32, d int32, e int32, f int32, g_ int32) int32
+TEXT runtime·vdsoCall_zx_syscall_test_7(SB),NOSPLIT,$32-36
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 48(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 48(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL a+0(FP), DI
+	MOVL b+4(FP), SI
+	MOVL c+8(FP), DX
+	MOVL d+12(FP), CX
+	MOVL e+16(FP), R8
+	MOVL f+20(FP), R9
+	MOVL g_+24(FP), R12
+	MOVQ SP, BP   // BP is preserved across vsdo call by the x86-64 ABI
+	ANDQ $~15, SP // stack alignment for x86-64 ABI
+	PUSHQ R12
+	MOVQ vdso_zx_syscall_test_7(SB), AX
+	CALL AX
+	POPQ R12
+	MOVQ BP, SP
+	MOVL AX, ret+32(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_syscall_test_8(a int32, b int32, c int32, d int32, e int32, f int32, g_ int32, h int32) int32
+TEXT runtime·vdsoCall_zx_syscall_test_8(SB),NOSPLIT,$40-36
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 56(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 56(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL a+0(FP), DI
+	MOVL b+4(FP), SI
+	MOVL c+8(FP), DX
+	MOVL d+12(FP), CX
+	MOVL e+16(FP), R8
+	MOVL f+20(FP), R9
+	MOVL g_+24(FP), R12
+	MOVL h+28(FP), R13
+	MOVQ SP, BP   // BP is preserved across vsdo call by the x86-64 ABI
+	ANDQ $~15, SP // stack alignment for x86-64 ABI
+	PUSHQ R13
+	PUSHQ R12
+	MOVQ vdso_zx_syscall_test_8(SB), AX
+	CALL AX
+	POPQ R12
+	POPQ R13
+	MOVQ BP, SP
+	MOVL AX, ret+32(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_syscall_test_wrapper(a int32, b int32, c int32) int32
+TEXT runtime·vdsoCall_zx_syscall_test_wrapper(SB),NOSPLIT,$8-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL a+0(FP), DI
+	MOVL b+4(FP), SI
+	MOVL c+8(FP), DX
+	MOVQ vdso_zx_syscall_test_wrapper(SB), AX
+	CALL AX
+	MOVL AX, ret+16(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_syscall_test_handle_create(return_value int32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_syscall_test_handle_create(SB),NOSPLIT,$8-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL return_value+0(FP), DI
+	MOVQ out+8(FP), SI
+	MOVQ vdso_zx_syscall_test_handle_create(SB), AX
+	CALL AX
+	MOVL AX, ret+16(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_system_get_dcache_line_size() uint32
+TEXT runtime·vdsoCall_zx_system_get_dcache_line_size(SB),NOSPLIT,$8-4
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVQ vdso_zx_system_get_dcache_line_size(SB), AX
+	CALL AX
+	MOVL AX, ret+0(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_system_get_num_cpus() uint32
+TEXT runtime·vdsoCall_zx_system_get_num_cpus(SB),NOSPLIT,$8-4
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVQ vdso_zx_system_get_num_cpus(SB), AX
+	CALL AX
+	MOVL AX, ret+0(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_system_get_version_string() unsafe.Pointer
+TEXT runtime·vdsoCall_zx_system_get_version_string(SB),NOSPLIT,$8-8
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVQ vdso_zx_system_get_version_string(SB), AX
+	CALL AX
+	MOVQ AX, ret+0(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_system_get_physmem() uint64
+TEXT runtime·vdsoCall_zx_system_get_physmem(SB),NOSPLIT,$8-8
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVQ vdso_zx_system_get_physmem(SB), AX
+	CALL AX
+	MOVQ AX, ret+0(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_system_get_features(kind uint32, features unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_system_get_features(SB),NOSPLIT,$8-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL kind+0(FP), DI
+	MOVQ features+8(FP), SI
+	MOVQ vdso_zx_system_get_features(SB), AX
+	CALL AX
+	MOVL AX, ret+16(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_system_get_event(root_job uint32, kind uint32, event unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_system_get_event(SB),NOSPLIT,$8-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL root_job+0(FP), DI
+	MOVL kind+4(FP), SI
+	MOVQ event+8(FP), DX
+	MOVQ vdso_zx_system_get_event(SB), AX
+	CALL AX
+	MOVL AX, ret+16(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_system_mexec(resource uint32, kernel_vmo uint32, bootimage_vmo uint32) int32
+TEXT runtime·vdsoCall_zx_system_mexec(SB),NOSPLIT,$8-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL resource+0(FP), DI
+	MOVL kernel_vmo+4(FP), SI
+	MOVL bootimage_vmo+8(FP), DX
+	MOVQ vdso_zx_system_mexec(SB), AX
+	CALL AX
+	MOVL AX, ret+16(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_system_mexec_payload_get(resource uint32, buffer unsafe.Pointer, buffer_size uint) int32
+TEXT runtime·vdsoCall_zx_system_mexec_payload_get(SB),NOSPLIT,$8-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL resource+0(FP), DI
+	MOVQ buffer+8(FP), SI
+	MOVQ buffer_size+16(FP), DX
+	MOVQ vdso_zx_system_mexec_payload_get(SB), AX
+	CALL AX
+	MOVL AX, ret+24(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_system_powerctl(resource uint32, cmd uint32, arg unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_system_powerctl(SB),NOSPLIT,$8-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL resource+0(FP), DI
+	MOVL cmd+4(FP), SI
+	MOVQ arg+8(FP), DX
+	MOVQ vdso_zx_system_powerctl(SB), AX
+	CALL AX
+	MOVL AX, ret+16(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_task_suspend(handle uint32, token unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_task_suspend(SB),NOSPLIT,$8-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVQ token+8(FP), SI
+	MOVQ vdso_zx_task_suspend(SB), AX
+	CALL AX
+	MOVL AX, ret+16(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_task_suspend_token(handle uint32, token unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_task_suspend_token(SB),NOSPLIT,$8-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVQ token+8(FP), SI
+	MOVQ vdso_zx_task_suspend_token(SB), AX
+	CALL AX
+	MOVL AX, ret+16(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_task_create_exception_channel(handle uint32, options uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_task_create_exception_channel(SB),NOSPLIT,$8-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL options+4(FP), SI
+	MOVQ out+8(FP), DX
+	MOVQ vdso_zx_task_create_exception_channel(SB), AX
+	CALL AX
+	MOVL AX, ret+16(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_task_kill(handle uint32) int32
+TEXT runtime·vdsoCall_zx_task_kill(SB),NOSPLIT,$8-12
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVQ vdso_zx_task_kill(SB), AX
+	CALL AX
+	MOVL AX, ret+8(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_thread_exit()
+TEXT runtime·vdsoCall_zx_thread_exit(SB),NOSPLIT,$8-0
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVQ vdso_zx_thread_exit(SB), AX
+	CALL AX
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_thread_create(process uint32, name unsafe.Pointer, name_size uint, options uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_thread_create(SB),NOSPLIT,$8-44
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL process+0(FP), DI
+	MOVQ name+8(FP), SI
+	MOVQ name_size+16(FP), DX
+	MOVL options+24(FP), CX
+	MOVQ out+32(FP), R8
+	MOVQ vdso_zx_thread_create(SB), AX
+	CALL AX
+	MOVL AX, ret+40(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_thread_start(handle uint32, thread_entry uintptr, stack uintptr, arg1 uintptr, arg2 uintptr) int32
+TEXT runtime·vdsoCall_zx_thread_start(SB),NOSPLIT,$8-44
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVQ thread_entry+8(FP), SI
+	MOVQ stack+16(FP), DX
+	MOVQ arg1+24(FP), CX
+	MOVQ arg2+32(FP), R8
+	MOVQ vdso_zx_thread_start(SB), AX
+	CALL AX
+	MOVL AX, ret+40(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_thread_read_state(handle uint32, kind uint32, buffer unsafe.Pointer, buffer_size uint) int32
+TEXT runtime·vdsoCall_zx_thread_read_state(SB),NOSPLIT,$8-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL kind+4(FP), SI
+	MOVQ buffer+8(FP), DX
+	MOVQ buffer_size+16(FP), CX
+	MOVQ vdso_zx_thread_read_state(SB), AX
+	CALL AX
+	MOVL AX, ret+24(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_thread_write_state(handle uint32, kind uint32, buffer unsafe.Pointer, buffer_size uint) int32
+TEXT runtime·vdsoCall_zx_thread_write_state(SB),NOSPLIT,$8-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL kind+4(FP), SI
+	MOVQ buffer+8(FP), DX
+	MOVQ buffer_size+16(FP), CX
+	MOVQ vdso_zx_thread_write_state(SB), AX
+	CALL AX
+	MOVL AX, ret+24(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_timer_create(options uint32, clock_id uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_timer_create(SB),NOSPLIT,$8-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL options+0(FP), DI
+	MOVL clock_id+4(FP), SI
+	MOVQ out+8(FP), DX
+	MOVQ vdso_zx_timer_create(SB), AX
+	CALL AX
+	MOVL AX, ret+16(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_timer_set(handle uint32, deadline int64, slack int64) int32
+TEXT runtime·vdsoCall_zx_timer_set(SB),NOSPLIT,$8-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVQ deadline+8(FP), SI
+	MOVQ slack+16(FP), DX
+	MOVQ vdso_zx_timer_set(SB), AX
+	CALL AX
+	MOVL AX, ret+24(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_timer_cancel(handle uint32) int32
+TEXT runtime·vdsoCall_zx_timer_cancel(SB),NOSPLIT,$8-12
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVQ vdso_zx_timer_cancel(SB), AX
+	CALL AX
+	MOVL AX, ret+8(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_vcpu_create(guest uint32, options uint32, entry uintptr, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_vcpu_create(SB),NOSPLIT,$8-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL guest+0(FP), DI
+	MOVL options+4(FP), SI
+	MOVQ entry+8(FP), DX
+	MOVQ out+16(FP), CX
+	MOVQ vdso_zx_vcpu_create(SB), AX
+	CALL AX
+	MOVL AX, ret+24(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_vcpu_resume(handle uint32, packet unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_vcpu_resume(SB),NOSPLIT,$8-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	CALL runtime·entersyscall(SB)
+	MOVL handle+0(FP), DI
+	MOVQ packet+8(FP), SI
+	MOVQ vdso_zx_vcpu_resume(SB), AX
+	CALL AX
+	MOVL AX, ret+16(FP)
+	CALL runtime·exitsyscall(SB)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_vcpu_interrupt(handle uint32, vector uint32) int32
+TEXT runtime·vdsoCall_zx_vcpu_interrupt(SB),NOSPLIT,$8-12
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL vector+4(FP), SI
+	MOVQ vdso_zx_vcpu_interrupt(SB), AX
+	CALL AX
+	MOVL AX, ret+8(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_vcpu_read_state(handle uint32, kind uint32, buffer unsafe.Pointer, buffer_size uint) int32
+TEXT runtime·vdsoCall_zx_vcpu_read_state(SB),NOSPLIT,$8-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL kind+4(FP), SI
+	MOVQ buffer+8(FP), DX
+	MOVQ buffer_size+16(FP), CX
+	MOVQ vdso_zx_vcpu_read_state(SB), AX
+	CALL AX
+	MOVL AX, ret+24(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_vcpu_write_state(handle uint32, kind uint32, buffer unsafe.Pointer, buffer_size uint) int32
+TEXT runtime·vdsoCall_zx_vcpu_write_state(SB),NOSPLIT,$8-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL kind+4(FP), SI
+	MOVQ buffer+8(FP), DX
+	MOVQ buffer_size+16(FP), CX
+	MOVQ vdso_zx_vcpu_write_state(SB), AX
+	CALL AX
+	MOVL AX, ret+24(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_vmar_allocate(parent_vmar uint32, options uint32, offset uint, size uint, child_vmar unsafe.Pointer, child_addr unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_vmar_allocate(SB),NOSPLIT,$8-44
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL parent_vmar+0(FP), DI
+	MOVL options+4(FP), SI
+	MOVQ offset+8(FP), DX
+	MOVQ size+16(FP), CX
+	MOVQ child_vmar+24(FP), R8
+	MOVQ child_addr+32(FP), R9
+	MOVQ vdso_zx_vmar_allocate(SB), AX
+	CALL AX
+	MOVL AX, ret+40(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_vmar_destroy(handle uint32) int32
+TEXT runtime·vdsoCall_zx_vmar_destroy(SB),NOSPLIT,$8-12
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVQ vdso_zx_vmar_destroy(SB), AX
+	CALL AX
+	MOVL AX, ret+8(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_vmar_map(handle uint32, options uint32, vmar_offset uint, vmo uint32, vmo_offset uint64, len uint, mapped_addr unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_vmar_map(SB),NOSPLIT,$32-52
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 48(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 48(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL options+4(FP), SI
+	MOVQ vmar_offset+8(FP), DX
+	MOVL vmo+16(FP), CX
+	MOVQ vmo_offset+24(FP), R8
+	MOVQ len+32(FP), R9
+	MOVQ mapped_addr+40(FP), R12
+	MOVQ SP, BP   // BP is preserved across vsdo call by the x86-64 ABI
+	ANDQ $~15, SP // stack alignment for x86-64 ABI
+	PUSHQ R12
+	MOVQ vdso_zx_vmar_map(SB), AX
+	CALL AX
+	POPQ R12
+	MOVQ BP, SP
+	MOVL AX, ret+48(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_vmar_unmap(handle uint32, addr uintptr, len uint) int32
+TEXT runtime·vdsoCall_zx_vmar_unmap(SB),NOSPLIT,$8-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVQ addr+8(FP), SI
+	MOVQ len+16(FP), DX
+	MOVQ vdso_zx_vmar_unmap(SB), AX
+	CALL AX
+	MOVL AX, ret+24(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_vmar_protect(handle uint32, options uint32, addr uintptr, len uint) int32
+TEXT runtime·vdsoCall_zx_vmar_protect(SB),NOSPLIT,$8-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL options+4(FP), SI
+	MOVQ addr+8(FP), DX
+	MOVQ len+16(FP), CX
+	MOVQ vdso_zx_vmar_protect(SB), AX
+	CALL AX
+	MOVL AX, ret+24(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_vmar_op_range(handle uint32, op uint32, address uintptr, size uint, buffer unsafe.Pointer, buffer_size uint) int32
+TEXT runtime·vdsoCall_zx_vmar_op_range(SB),NOSPLIT,$8-44
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL op+4(FP), SI
+	MOVQ address+8(FP), DX
+	MOVQ size+16(FP), CX
+	MOVQ buffer+24(FP), R8
+	MOVQ buffer_size+32(FP), R9
+	MOVQ vdso_zx_vmar_op_range(SB), AX
+	CALL AX
+	MOVL AX, ret+40(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_vmo_create(size uint64, options uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_vmo_create(SB),NOSPLIT,$8-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVQ size+0(FP), DI
+	MOVL options+8(FP), SI
+	MOVQ out+16(FP), DX
+	MOVQ vdso_zx_vmo_create(SB), AX
+	CALL AX
+	MOVL AX, ret+24(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_vmo_read(handle uint32, buffer unsafe.Pointer, offset uint64, buffer_size uint) int32
+TEXT runtime·vdsoCall_zx_vmo_read(SB),NOSPLIT,$8-36
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	CALL runtime·entersyscall(SB)
+	MOVL handle+0(FP), DI
+	MOVQ buffer+8(FP), SI
+	MOVQ offset+16(FP), DX
+	MOVQ buffer_size+24(FP), CX
+	MOVQ vdso_zx_vmo_read(SB), AX
+	CALL AX
+	MOVL AX, ret+32(FP)
+	CALL runtime·exitsyscall(SB)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_vmo_write(handle uint32, buffer unsafe.Pointer, offset uint64, buffer_size uint) int32
+TEXT runtime·vdsoCall_zx_vmo_write(SB),NOSPLIT,$8-36
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	CALL runtime·entersyscall(SB)
+	MOVL handle+0(FP), DI
+	MOVQ buffer+8(FP), SI
+	MOVQ offset+16(FP), DX
+	MOVQ buffer_size+24(FP), CX
+	MOVQ vdso_zx_vmo_write(SB), AX
+	CALL AX
+	MOVL AX, ret+32(FP)
+	CALL runtime·exitsyscall(SB)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_vmo_get_size(handle uint32, size unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_vmo_get_size(SB),NOSPLIT,$8-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVQ size+8(FP), SI
+	MOVQ vdso_zx_vmo_get_size(SB), AX
+	CALL AX
+	MOVL AX, ret+16(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_vmo_set_size(handle uint32, size uint64) int32
+TEXT runtime·vdsoCall_zx_vmo_set_size(SB),NOSPLIT,$8-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVQ size+8(FP), SI
+	MOVQ vdso_zx_vmo_set_size(SB), AX
+	CALL AX
+	MOVL AX, ret+16(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_vmo_op_range(handle uint32, op uint32, offset uint64, size uint64, buffer unsafe.Pointer, buffer_size uint) int32
+TEXT runtime·vdsoCall_zx_vmo_op_range(SB),NOSPLIT,$8-44
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	CALL runtime·entersyscall(SB)
+	MOVL handle+0(FP), DI
+	MOVL op+4(FP), SI
+	MOVQ offset+8(FP), DX
+	MOVQ size+16(FP), CX
+	MOVQ buffer+24(FP), R8
+	MOVQ buffer_size+32(FP), R9
+	MOVQ vdso_zx_vmo_op_range(SB), AX
+	CALL AX
+	MOVL AX, ret+40(FP)
+	CALL runtime·exitsyscall(SB)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_vmo_create_child(handle uint32, options uint32, offset uint64, size uint64, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_vmo_create_child(SB),NOSPLIT,$8-36
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL options+4(FP), SI
+	MOVQ offset+8(FP), DX
+	MOVQ size+16(FP), CX
+	MOVQ out+24(FP), R8
+	MOVQ vdso_zx_vmo_create_child(SB), AX
+	CALL AX
+	MOVL AX, ret+32(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_vmo_set_cache_policy(handle uint32, cache_policy uint32) int32
+TEXT runtime·vdsoCall_zx_vmo_set_cache_policy(SB),NOSPLIT,$8-12
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL cache_policy+4(FP), SI
+	MOVQ vdso_zx_vmo_set_cache_policy(SB), AX
+	CALL AX
+	MOVL AX, ret+8(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_vmo_replace_as_executable(handle uint32, vmex uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_vmo_replace_as_executable(SB),NOSPLIT,$8-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL handle+0(FP), DI
+	MOVL vmex+4(FP), SI
+	MOVQ out+8(FP), DX
+	MOVQ vdso_zx_vmo_replace_as_executable(SB), AX
+	CALL AX
+	MOVL AX, ret+16(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_vmo_create_contiguous(bti uint32, size uint, alignment_log2 uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_vmo_create_contiguous(SB),NOSPLIT,$8-36
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL bti+0(FP), DI
+	MOVQ size+8(FP), SI
+	MOVL alignment_log2+16(FP), DX
+	MOVQ out+24(FP), CX
+	MOVQ vdso_zx_vmo_create_contiguous(SB), AX
+	CALL AX
+	MOVL AX, ret+32(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
+// func vdsoCall_zx_vmo_create_physical(resource uint32, paddr uintptr, size uint, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_vmo_create_physical(SB),NOSPLIT,$8-36
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	get_tls(CX)
+	MOVQ g(CX), AX
+	MOVQ g_m(AX), R14
+	PUSHQ R14
+	MOVQ 24(SP), DX
+	MOVQ DX, m_vdsoPC(R14)
+	LEAQ 24(SP), DX
+	MOVQ DX, m_vdsoSP(R14)
+	MOVL resource+0(FP), DI
+	MOVQ paddr+8(FP), SI
+	MOVQ size+16(FP), DX
+	MOVQ out+24(FP), CX
+	MOVQ vdso_zx_vmo_create_physical(SB), AX
+	CALL AX
+	MOVL AX, ret+32(FP)
+	POPQ R14
+	MOVQ $0, m_vdsoSP(R14)
+	RET
+
diff --git a/src/runtime/vdsocalls_fuchsia_arm64.s b/src/runtime/vdsocalls_fuchsia_arm64.s
new file mode 100644
index 0000000..d4be031
--- /dev/null
+++ b/src/runtime/vdsocalls_fuchsia_arm64.s
@@ -0,0 +1,3188 @@
+// Copyright 2019 The Fuchsia Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// WARNING: THIS FILE IS MACHINE GENERATED BY //tools/kazoo. DO NOT EDIT.
+
+#include "go_asm.h"
+#include "go_tls.h"
+#include "textflag.h"
+#include "funcdata.h"
+
+// func vdsoCall_zx_bti_create(iommu uint32, options uint32, bti_id uint64, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_bti_create(SB),NOSPLIT,$0-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW iommu+0(FP), R0
+	MOVW options+4(FP), R1
+	MOVD bti_id+8(FP), R2
+	MOVD out+16(FP), R3
+	BL vdso_zx_bti_create(SB)
+	MOVW R0, ret+24(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_bti_pin(handle uint32, options uint32, vmo uint32, offset uint64, size uint64, addrs unsafe.Pointer, num_addrs uint, pmt unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_bti_pin(SB),NOSPLIT,$0-60
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW handle+0(FP), R0
+	MOVW options+4(FP), R1
+	MOVW vmo+8(FP), R2
+	MOVD offset+16(FP), R3
+	MOVD size+24(FP), R4
+	MOVD addrs+32(FP), R5
+	MOVD num_addrs+40(FP), R6
+	MOVD pmt+48(FP), R7
+	BL vdso_zx_bti_pin(SB)
+	MOVW R0, ret+56(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_bti_release_quarantine(handle uint32) int32
+TEXT runtime·vdsoCall_zx_bti_release_quarantine(SB),NOSPLIT,$0-12
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW handle+0(FP), R0
+	BL vdso_zx_bti_release_quarantine(SB)
+	MOVW R0, ret+8(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_cache_flush(addr unsafe.Pointer, size uint, options uint32) int32
+TEXT runtime·vdsoCall_zx_cache_flush(SB),NOSPLIT,$0-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVD addr+0(FP), R0
+	MOVD size+8(FP), R1
+	MOVW options+16(FP), R2
+	BL vdso_zx_cache_flush(SB)
+	MOVW R0, ret+24(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_channel_create(options uint32, out0 unsafe.Pointer, out1 unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_channel_create(SB),NOSPLIT,$0-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW options+0(FP), R0
+	MOVD out0+8(FP), R1
+	MOVD out1+16(FP), R2
+	BL vdso_zx_channel_create(SB)
+	MOVW R0, ret+24(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_channel_read(handle uint32, options uint32, bytes unsafe.Pointer, handles unsafe.Pointer, num_bytes uint32, num_handles uint32, actual_bytes unsafe.Pointer, actual_handles unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_channel_read(SB),NOSPLIT,$0-52
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW handle+0(FP), R0
+	MOVW options+4(FP), R1
+	MOVD bytes+8(FP), R2
+	MOVD handles+16(FP), R3
+	MOVW num_bytes+24(FP), R4
+	MOVW num_handles+28(FP), R5
+	MOVD actual_bytes+32(FP), R6
+	MOVD actual_handles+40(FP), R7
+	BL vdso_zx_channel_read(SB)
+	MOVW R0, ret+48(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_channel_read_etc(handle uint32, options uint32, bytes unsafe.Pointer, handles unsafe.Pointer, num_bytes uint32, num_handles uint32, actual_bytes unsafe.Pointer, actual_handles unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_channel_read_etc(SB),NOSPLIT,$0-52
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW handle+0(FP), R0
+	MOVW options+4(FP), R1
+	MOVD bytes+8(FP), R2
+	MOVD handles+16(FP), R3
+	MOVW num_bytes+24(FP), R4
+	MOVW num_handles+28(FP), R5
+	MOVD actual_bytes+32(FP), R6
+	MOVD actual_handles+40(FP), R7
+	BL vdso_zx_channel_read_etc(SB)
+	MOVW R0, ret+48(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_channel_write(handle uint32, options uint32, bytes unsafe.Pointer, num_bytes uint32, handles unsafe.Pointer, num_handles uint32) int32
+TEXT runtime·vdsoCall_zx_channel_write(SB),NOSPLIT,$0-44
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW handle+0(FP), R0
+	MOVW options+4(FP), R1
+	MOVD bytes+8(FP), R2
+	MOVW num_bytes+16(FP), R3
+	MOVD handles+24(FP), R4
+	MOVW num_handles+32(FP), R5
+	BL vdso_zx_channel_write(SB)
+	MOVW R0, ret+40(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_channel_write_etc(handle uint32, options uint32, bytes unsafe.Pointer, num_bytes uint32, handles unsafe.Pointer, num_handles uint32) int32
+TEXT runtime·vdsoCall_zx_channel_write_etc(SB),NOSPLIT,$0-44
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW handle+0(FP), R0
+	MOVW options+4(FP), R1
+	MOVD bytes+8(FP), R2
+	MOVW num_bytes+16(FP), R3
+	MOVD handles+24(FP), R4
+	MOVW num_handles+32(FP), R5
+	BL vdso_zx_channel_write_etc(SB)
+	MOVW R0, ret+40(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_channel_call_noretry(handle uint32, options uint32, deadline int64, args unsafe.Pointer, actual_bytes unsafe.Pointer, actual_handles unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_channel_call_noretry(SB),NOSPLIT,$0-44
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW handle+0(FP), R0
+	MOVW options+4(FP), R1
+	MOVD deadline+8(FP), R2
+	MOVD args+16(FP), R3
+	MOVD actual_bytes+24(FP), R4
+	MOVD actual_handles+32(FP), R5
+	BL vdso_zx_channel_call_noretry(SB)
+	MOVW R0, ret+40(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_channel_call_finish(deadline int64, args unsafe.Pointer, actual_bytes unsafe.Pointer, actual_handles unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_channel_call_finish(SB),NOSPLIT,$0-36
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVD deadline+0(FP), R0
+	MOVD args+8(FP), R1
+	MOVD actual_bytes+16(FP), R2
+	MOVD actual_handles+24(FP), R3
+	BL vdso_zx_channel_call_finish(SB)
+	MOVW R0, ret+32(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_channel_call(handle uint32, options uint32, deadline int64, args unsafe.Pointer, actual_bytes unsafe.Pointer, actual_handles unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_channel_call(SB),NOSPLIT,$0-44
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	CALL runtime·entersyscall(SB)
+	MOVW handle+0(FP), R0
+	MOVW options+4(FP), R1
+	MOVD deadline+8(FP), R2
+	MOVD args+16(FP), R3
+	MOVD actual_bytes+24(FP), R4
+	MOVD actual_handles+32(FP), R5
+	BL vdso_zx_channel_call(SB)
+	MOVW R0, ret+40(FP)
+	BL runtime·exitsyscall(SB)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_clock_get(clock_id uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_clock_get(SB),NOSPLIT,$0-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW clock_id+0(FP), R0
+	MOVD out+8(FP), R1
+	BL vdso_zx_clock_get(SB)
+	MOVW R0, ret+16(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_clock_get_monotonic() int64
+TEXT runtime·vdsoCall_zx_clock_get_monotonic(SB),NOSPLIT,$0-8
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	BL vdso_zx_clock_get_monotonic(SB)
+	MOVD R0, ret+0(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_clock_adjust(handle uint32, clock_id uint32, offset int64) int32
+TEXT runtime·vdsoCall_zx_clock_adjust(SB),NOSPLIT,$0-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW handle+0(FP), R0
+	MOVW clock_id+4(FP), R1
+	MOVD offset+8(FP), R2
+	BL vdso_zx_clock_adjust(SB)
+	MOVW R0, ret+16(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_clock_get_monotonic_via_kernel() int64
+TEXT runtime·vdsoCall_zx_clock_get_monotonic_via_kernel(SB),NOSPLIT,$0-8
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	BL vdso_zx_clock_get_monotonic_via_kernel(SB)
+	MOVD R0, ret+0(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_clock_create(options uint64, args unsafe.Pointer, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_clock_create(SB),NOSPLIT,$0-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVD options+0(FP), R0
+	MOVD args+8(FP), R1
+	MOVD out+16(FP), R2
+	BL vdso_zx_clock_create(SB)
+	MOVW R0, ret+24(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_clock_read(handle uint32, now unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_clock_read(SB),NOSPLIT,$0-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW handle+0(FP), R0
+	MOVD now+8(FP), R1
+	BL vdso_zx_clock_read(SB)
+	MOVW R0, ret+16(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_clock_get_details(handle uint32, options uint64, details unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_clock_get_details(SB),NOSPLIT,$0-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW handle+0(FP), R0
+	MOVD options+8(FP), R1
+	MOVD details+16(FP), R2
+	BL vdso_zx_clock_get_details(SB)
+	MOVW R0, ret+24(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_clock_update(handle uint32, options uint64, args unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_clock_update(SB),NOSPLIT,$0-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW handle+0(FP), R0
+	MOVD options+8(FP), R1
+	MOVD args+16(FP), R2
+	BL vdso_zx_clock_update(SB)
+	MOVW R0, ret+24(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_cprng_draw_once(buffer unsafe.Pointer, buffer_size uint) int32
+TEXT runtime·vdsoCall_zx_cprng_draw_once(SB),NOSPLIT,$0-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVD buffer+0(FP), R0
+	MOVD buffer_size+8(FP), R1
+	BL vdso_zx_cprng_draw_once(SB)
+	MOVW R0, ret+16(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_cprng_draw(buffer unsafe.Pointer, buffer_size uint)
+TEXT runtime·vdsoCall_zx_cprng_draw(SB),NOSPLIT,$0-16
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVD buffer+0(FP), R0
+	MOVD buffer_size+8(FP), R1
+	BL vdso_zx_cprng_draw(SB)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_cprng_add_entropy(buffer unsafe.Pointer, buffer_size uint) int32
+TEXT runtime·vdsoCall_zx_cprng_add_entropy(SB),NOSPLIT,$0-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVD buffer+0(FP), R0
+	MOVD buffer_size+8(FP), R1
+	BL vdso_zx_cprng_add_entropy(SB)
+	MOVW R0, ret+16(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_debug_read(handle uint32, buffer unsafe.Pointer, buffer_size uint, actual unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_debug_read(SB),NOSPLIT,$0-36
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW handle+0(FP), R0
+	MOVD buffer+8(FP), R1
+	MOVD buffer_size+16(FP), R2
+	MOVD actual+24(FP), R3
+	BL vdso_zx_debug_read(SB)
+	MOVW R0, ret+32(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_debug_write(buffer unsafe.Pointer, buffer_size uint) int32
+TEXT runtime·vdsoCall_zx_debug_write(SB),NOSPLIT,$0-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVD buffer+0(FP), R0
+	MOVD buffer_size+8(FP), R1
+	BL vdso_zx_debug_write(SB)
+	MOVW R0, ret+16(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_debug_send_command(resource uint32, buffer unsafe.Pointer, buffer_size uint) int32
+TEXT runtime·vdsoCall_zx_debug_send_command(SB),NOSPLIT,$0-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW resource+0(FP), R0
+	MOVD buffer+8(FP), R1
+	MOVD buffer_size+16(FP), R2
+	BL vdso_zx_debug_send_command(SB)
+	MOVW R0, ret+24(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_debuglog_create(resource uint32, options uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_debuglog_create(SB),NOSPLIT,$0-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW resource+0(FP), R0
+	MOVW options+4(FP), R1
+	MOVD out+8(FP), R2
+	BL vdso_zx_debuglog_create(SB)
+	MOVW R0, ret+16(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_debuglog_write(handle uint32, options uint32, buffer unsafe.Pointer, buffer_size uint) int32
+TEXT runtime·vdsoCall_zx_debuglog_write(SB),NOSPLIT,$0-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW handle+0(FP), R0
+	MOVW options+4(FP), R1
+	MOVD buffer+8(FP), R2
+	MOVD buffer_size+16(FP), R3
+	BL vdso_zx_debuglog_write(SB)
+	MOVW R0, ret+24(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_debuglog_read(handle uint32, options uint32, buffer unsafe.Pointer, buffer_size uint) int32
+TEXT runtime·vdsoCall_zx_debuglog_read(SB),NOSPLIT,$0-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW handle+0(FP), R0
+	MOVW options+4(FP), R1
+	MOVD buffer+8(FP), R2
+	MOVD buffer_size+16(FP), R3
+	BL vdso_zx_debuglog_read(SB)
+	MOVW R0, ret+24(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_event_create(options uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_event_create(SB),NOSPLIT,$0-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW options+0(FP), R0
+	MOVD out+8(FP), R1
+	BL vdso_zx_event_create(SB)
+	MOVW R0, ret+16(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_eventpair_create(options uint32, out0 unsafe.Pointer, out1 unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_eventpair_create(SB),NOSPLIT,$0-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW options+0(FP), R0
+	MOVD out0+8(FP), R1
+	MOVD out1+16(FP), R2
+	BL vdso_zx_eventpair_create(SB)
+	MOVW R0, ret+24(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_exception_get_thread(handle uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_exception_get_thread(SB),NOSPLIT,$0-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW handle+0(FP), R0
+	MOVD out+8(FP), R1
+	BL vdso_zx_exception_get_thread(SB)
+	MOVW R0, ret+16(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_exception_get_process(handle uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_exception_get_process(SB),NOSPLIT,$0-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW handle+0(FP), R0
+	MOVD out+8(FP), R1
+	BL vdso_zx_exception_get_process(SB)
+	MOVW R0, ret+16(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_fifo_create(elem_count uint, elem_size uint, options uint32, out0 unsafe.Pointer, out1 unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_fifo_create(SB),NOSPLIT,$0-44
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVD elem_count+0(FP), R0
+	MOVD elem_size+8(FP), R1
+	MOVW options+16(FP), R2
+	MOVD out0+24(FP), R3
+	MOVD out1+32(FP), R4
+	BL vdso_zx_fifo_create(SB)
+	MOVW R0, ret+40(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_fifo_read(handle uint32, elem_size uint, data unsafe.Pointer, data_size uint, actual_count unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_fifo_read(SB),NOSPLIT,$0-44
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW handle+0(FP), R0
+	MOVD elem_size+8(FP), R1
+	MOVD data+16(FP), R2
+	MOVD data_size+24(FP), R3
+	MOVD actual_count+32(FP), R4
+	BL vdso_zx_fifo_read(SB)
+	MOVW R0, ret+40(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_fifo_write(handle uint32, elem_size uint, data unsafe.Pointer, count uint, actual_count unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_fifo_write(SB),NOSPLIT,$0-44
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW handle+0(FP), R0
+	MOVD elem_size+8(FP), R1
+	MOVD data+16(FP), R2
+	MOVD count+24(FP), R3
+	MOVD actual_count+32(FP), R4
+	BL vdso_zx_fifo_write(SB)
+	MOVW R0, ret+40(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_framebuffer_get_info(resource uint32, format unsafe.Pointer, width unsafe.Pointer, height unsafe.Pointer, stride unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_framebuffer_get_info(SB),NOSPLIT,$0-44
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW resource+0(FP), R0
+	MOVD format+8(FP), R1
+	MOVD width+16(FP), R2
+	MOVD height+24(FP), R3
+	MOVD stride+32(FP), R4
+	BL vdso_zx_framebuffer_get_info(SB)
+	MOVW R0, ret+40(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_framebuffer_set_range(resource uint32, vmo uint32, len uint32, format uint32, width uint32, height uint32, stride uint32) int32
+TEXT runtime·vdsoCall_zx_framebuffer_set_range(SB),NOSPLIT,$0-36
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW resource+0(FP), R0
+	MOVW vmo+4(FP), R1
+	MOVW len+8(FP), R2
+	MOVW format+12(FP), R3
+	MOVW width+16(FP), R4
+	MOVW height+20(FP), R5
+	MOVW stride+24(FP), R6
+	BL vdso_zx_framebuffer_set_range(SB)
+	MOVW R0, ret+32(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_futex_wait(value_ptr unsafe.Pointer, current_value int32, new_futex_owner uint32, deadline int64) int32
+TEXT runtime·vdsoCall_zx_futex_wait(SB),NOSPLIT,$0-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVD value_ptr+0(FP), R0
+	MOVW current_value+8(FP), R1
+	MOVW new_futex_owner+12(FP), R2
+	MOVD deadline+16(FP), R3
+	BL vdso_zx_futex_wait(SB)
+	MOVW R0, ret+24(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_futex_wake(value_ptr unsafe.Pointer, wake_count uint32) int32
+TEXT runtime·vdsoCall_zx_futex_wake(SB),NOSPLIT,$0-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVD value_ptr+0(FP), R0
+	MOVW wake_count+8(FP), R1
+	BL vdso_zx_futex_wake(SB)
+	MOVW R0, ret+16(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_futex_requeue(value_ptr unsafe.Pointer, wake_count uint32, current_value int32, requeue_ptr unsafe.Pointer, requeue_count uint32, new_requeue_owner uint32) int32
+TEXT runtime·vdsoCall_zx_futex_requeue(SB),NOSPLIT,$0-36
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVD value_ptr+0(FP), R0
+	MOVW wake_count+8(FP), R1
+	MOVW current_value+12(FP), R2
+	MOVD requeue_ptr+16(FP), R3
+	MOVW requeue_count+24(FP), R4
+	MOVW new_requeue_owner+28(FP), R5
+	BL vdso_zx_futex_requeue(SB)
+	MOVW R0, ret+32(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_futex_wake_single_owner(value_ptr unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_futex_wake_single_owner(SB),NOSPLIT,$0-12
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVD value_ptr+0(FP), R0
+	BL vdso_zx_futex_wake_single_owner(SB)
+	MOVW R0, ret+8(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_futex_requeue_single_owner(value_ptr unsafe.Pointer, current_value int32, requeue_ptr unsafe.Pointer, requeue_count uint32, new_requeue_owner uint32) int32
+TEXT runtime·vdsoCall_zx_futex_requeue_single_owner(SB),NOSPLIT,$0-36
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVD value_ptr+0(FP), R0
+	MOVW current_value+8(FP), R1
+	MOVD requeue_ptr+16(FP), R2
+	MOVW requeue_count+24(FP), R3
+	MOVW new_requeue_owner+28(FP), R4
+	BL vdso_zx_futex_requeue_single_owner(SB)
+	MOVW R0, ret+32(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_futex_get_owner(value_ptr unsafe.Pointer, koid unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_futex_get_owner(SB),NOSPLIT,$0-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVD value_ptr+0(FP), R0
+	MOVD koid+8(FP), R1
+	BL vdso_zx_futex_get_owner(SB)
+	MOVW R0, ret+16(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_guest_create(resource uint32, options uint32, guest_handle unsafe.Pointer, vmar_handle unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_guest_create(SB),NOSPLIT,$0-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW resource+0(FP), R0
+	MOVW options+4(FP), R1
+	MOVD guest_handle+8(FP), R2
+	MOVD vmar_handle+16(FP), R3
+	BL vdso_zx_guest_create(SB)
+	MOVW R0, ret+24(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_guest_set_trap(handle uint32, kind uint32, addr uintptr, size uint, port_handle uint32, key uint64) int32
+TEXT runtime·vdsoCall_zx_guest_set_trap(SB),NOSPLIT,$0-44
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW handle+0(FP), R0
+	MOVW kind+4(FP), R1
+	MOVD addr+8(FP), R2
+	MOVD size+16(FP), R3
+	MOVW port_handle+24(FP), R4
+	MOVD key+32(FP), R5
+	BL vdso_zx_guest_set_trap(SB)
+	MOVW R0, ret+40(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_handle_close(handle uint32) int32
+TEXT runtime·vdsoCall_zx_handle_close(SB),NOSPLIT,$0-12
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW handle+0(FP), R0
+	BL vdso_zx_handle_close(SB)
+	MOVW R0, ret+8(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_handle_close_many(handles unsafe.Pointer, num_handles uint) int32
+TEXT runtime·vdsoCall_zx_handle_close_many(SB),NOSPLIT,$0-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVD handles+0(FP), R0
+	MOVD num_handles+8(FP), R1
+	BL vdso_zx_handle_close_many(SB)
+	MOVW R0, ret+16(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_handle_duplicate(handle uint32, rights uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_handle_duplicate(SB),NOSPLIT,$0-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW handle+0(FP), R0
+	MOVW rights+4(FP), R1
+	MOVD out+8(FP), R2
+	BL vdso_zx_handle_duplicate(SB)
+	MOVW R0, ret+16(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_handle_replace(handle uint32, rights uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_handle_replace(SB),NOSPLIT,$0-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW handle+0(FP), R0
+	MOVW rights+4(FP), R1
+	MOVD out+8(FP), R2
+	BL vdso_zx_handle_replace(SB)
+	MOVW R0, ret+16(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_interrupt_create(src_obj uint32, src_num uint32, options uint32, out_handle unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_interrupt_create(SB),NOSPLIT,$0-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW src_obj+0(FP), R0
+	MOVW src_num+4(FP), R1
+	MOVW options+8(FP), R2
+	MOVD out_handle+16(FP), R3
+	BL vdso_zx_interrupt_create(SB)
+	MOVW R0, ret+24(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_interrupt_bind(handle uint32, port_handle uint32, key uint64, options uint32) int32
+TEXT runtime·vdsoCall_zx_interrupt_bind(SB),NOSPLIT,$0-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW handle+0(FP), R0
+	MOVW port_handle+4(FP), R1
+	MOVD key+8(FP), R2
+	MOVW options+16(FP), R3
+	BL vdso_zx_interrupt_bind(SB)
+	MOVW R0, ret+24(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_interrupt_wait(handle uint32, out_timestamp unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_interrupt_wait(SB),NOSPLIT,$0-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	CALL runtime·entersyscall(SB)
+	MOVW handle+0(FP), R0
+	MOVD out_timestamp+8(FP), R1
+	BL vdso_zx_interrupt_wait(SB)
+	MOVW R0, ret+16(FP)
+	BL runtime·exitsyscall(SB)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_interrupt_destroy(handle uint32) int32
+TEXT runtime·vdsoCall_zx_interrupt_destroy(SB),NOSPLIT,$0-12
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW handle+0(FP), R0
+	BL vdso_zx_interrupt_destroy(SB)
+	MOVW R0, ret+8(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_interrupt_ack(handle uint32) int32
+TEXT runtime·vdsoCall_zx_interrupt_ack(SB),NOSPLIT,$0-12
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW handle+0(FP), R0
+	BL vdso_zx_interrupt_ack(SB)
+	MOVW R0, ret+8(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_interrupt_trigger(handle uint32, options uint32, timestamp int64) int32
+TEXT runtime·vdsoCall_zx_interrupt_trigger(SB),NOSPLIT,$0-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW handle+0(FP), R0
+	MOVW options+4(FP), R1
+	MOVD timestamp+8(FP), R2
+	BL vdso_zx_interrupt_trigger(SB)
+	MOVW R0, ret+16(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_interrupt_bind_vcpu(handle uint32, vcpu uint32, options uint32) int32
+TEXT runtime·vdsoCall_zx_interrupt_bind_vcpu(SB),NOSPLIT,$0-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW handle+0(FP), R0
+	MOVW vcpu+4(FP), R1
+	MOVW options+8(FP), R2
+	BL vdso_zx_interrupt_bind_vcpu(SB)
+	MOVW R0, ret+16(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_iommu_create(resource uint32, typ uint32, desc unsafe.Pointer, desc_size uint, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_iommu_create(SB),NOSPLIT,$0-36
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW resource+0(FP), R0
+	MOVW typ+4(FP), R1
+	MOVD desc+8(FP), R2
+	MOVD desc_size+16(FP), R3
+	MOVD out+24(FP), R4
+	BL vdso_zx_iommu_create(SB)
+	MOVW R0, ret+32(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_ioports_request(resource uint32, io_addr uint16, len uint32) int32
+TEXT runtime·vdsoCall_zx_ioports_request(SB),NOSPLIT,$0-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW resource+0(FP), R0
+	MOVD io_addr+4(FP), R1
+	MOVW len+8(FP), R2
+	BL vdso_zx_ioports_request(SB)
+	MOVW R0, ret+16(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_ioports_release(resource uint32, io_addr uint16, len uint32) int32
+TEXT runtime·vdsoCall_zx_ioports_release(SB),NOSPLIT,$0-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW resource+0(FP), R0
+	MOVD io_addr+4(FP), R1
+	MOVW len+8(FP), R2
+	BL vdso_zx_ioports_release(SB)
+	MOVW R0, ret+16(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_job_create(parent_job uint32, options uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_job_create(SB),NOSPLIT,$0-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW parent_job+0(FP), R0
+	MOVW options+4(FP), R1
+	MOVD out+8(FP), R2
+	BL vdso_zx_job_create(SB)
+	MOVW R0, ret+16(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_job_set_policy(handle uint32, options uint32, topic uint32, policy unsafe.Pointer, policy_size uint32) int32
+TEXT runtime·vdsoCall_zx_job_set_policy(SB),NOSPLIT,$0-36
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW handle+0(FP), R0
+	MOVW options+4(FP), R1
+	MOVW topic+8(FP), R2
+	MOVD policy+16(FP), R3
+	MOVW policy_size+24(FP), R4
+	BL vdso_zx_job_set_policy(SB)
+	MOVW R0, ret+32(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_job_set_critical(job uint32, options uint32, process uint32) int32
+TEXT runtime·vdsoCall_zx_job_set_critical(SB),NOSPLIT,$0-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW job+0(FP), R0
+	MOVW options+4(FP), R1
+	MOVW process+8(FP), R2
+	BL vdso_zx_job_set_critical(SB)
+	MOVW R0, ret+16(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_ktrace_read(handle uint32, data unsafe.Pointer, offset uint32, data_size uint, actual unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_ktrace_read(SB),NOSPLIT,$0-44
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW handle+0(FP), R0
+	MOVD data+8(FP), R1
+	MOVW offset+16(FP), R2
+	MOVD data_size+24(FP), R3
+	MOVD actual+32(FP), R4
+	BL vdso_zx_ktrace_read(SB)
+	MOVW R0, ret+40(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_ktrace_control(handle uint32, action uint32, options uint32, ptr unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_ktrace_control(SB),NOSPLIT,$0-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW handle+0(FP), R0
+	MOVW action+4(FP), R1
+	MOVW options+8(FP), R2
+	MOVD ptr+16(FP), R3
+	BL vdso_zx_ktrace_control(SB)
+	MOVW R0, ret+24(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_ktrace_write(handle uint32, id uint32, arg0 uint32, arg1 uint32) int32
+TEXT runtime·vdsoCall_zx_ktrace_write(SB),NOSPLIT,$0-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW handle+0(FP), R0
+	MOVW id+4(FP), R1
+	MOVW arg0+8(FP), R2
+	MOVW arg1+12(FP), R3
+	BL vdso_zx_ktrace_write(SB)
+	MOVW R0, ret+16(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_nanosleep(deadline int64) int32
+TEXT runtime·vdsoCall_zx_nanosleep(SB),NOSPLIT,$0-12
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVD deadline+0(FP), R0
+	BL vdso_zx_nanosleep(SB)
+	MOVW R0, ret+8(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_ticks_get() int64
+TEXT runtime·vdsoCall_zx_ticks_get(SB),NOSPLIT,$0-8
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	BL vdso_zx_ticks_get(SB)
+	MOVD R0, ret+0(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_ticks_per_second() int64
+TEXT runtime·vdsoCall_zx_ticks_per_second(SB),NOSPLIT,$0-8
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	BL vdso_zx_ticks_per_second(SB)
+	MOVD R0, ret+0(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_deadline_after(nanoseconds int64) int64
+TEXT runtime·vdsoCall_zx_deadline_after(SB),NOSPLIT,$0-16
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVD nanoseconds+0(FP), R0
+	BL vdso_zx_deadline_after(SB)
+	MOVD R0, ret+8(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_vmar_unmap_handle_close_thread_exit(vmar_handle uint32, addr uintptr, size uint, close_handle uint32) int32
+TEXT runtime·vdsoCall_zx_vmar_unmap_handle_close_thread_exit(SB),NOSPLIT,$0-36
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW vmar_handle+0(FP), R0
+	MOVD addr+8(FP), R1
+	MOVD size+16(FP), R2
+	MOVW close_handle+24(FP), R3
+	BL vdso_zx_vmar_unmap_handle_close_thread_exit(SB)
+	MOVW R0, ret+32(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_futex_wake_handle_close_thread_exit(value_ptr unsafe.Pointer, wake_count uint32, new_value int32, close_handle uint32)
+TEXT runtime·vdsoCall_zx_futex_wake_handle_close_thread_exit(SB),NOSPLIT,$0-24
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVD value_ptr+0(FP), R0
+	MOVW wake_count+8(FP), R1
+	MOVW new_value+12(FP), R2
+	MOVW close_handle+16(FP), R3
+	BL vdso_zx_futex_wake_handle_close_thread_exit(SB)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_ticks_get_via_kernel() int64
+TEXT runtime·vdsoCall_zx_ticks_get_via_kernel(SB),NOSPLIT,$0-8
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	BL vdso_zx_ticks_get_via_kernel(SB)
+	MOVD R0, ret+0(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_msi_allocate(handle uint32, count uint32, out_allocation unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_msi_allocate(SB),NOSPLIT,$0-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW handle+0(FP), R0
+	MOVW count+4(FP), R1
+	MOVD out_allocation+8(FP), R2
+	BL vdso_zx_msi_allocate(SB)
+	MOVW R0, ret+16(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_msi_create(handle uint32, options uint32, msi_id uint32, vmo uint32, vmo_offset uint, out_interrupt unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_msi_create(SB),NOSPLIT,$0-36
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW handle+0(FP), R0
+	MOVW options+4(FP), R1
+	MOVW msi_id+8(FP), R2
+	MOVW vmo+12(FP), R3
+	MOVD vmo_offset+16(FP), R4
+	MOVD out_interrupt+24(FP), R5
+	BL vdso_zx_msi_create(SB)
+	MOVW R0, ret+32(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_mtrace_control(handle uint32, kind uint32, action uint32, options uint32, ptr unsafe.Pointer, ptr_size uint) int32
+TEXT runtime·vdsoCall_zx_mtrace_control(SB),NOSPLIT,$0-36
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW handle+0(FP), R0
+	MOVW kind+4(FP), R1
+	MOVW action+8(FP), R2
+	MOVW options+12(FP), R3
+	MOVD ptr+16(FP), R4
+	MOVD ptr_size+24(FP), R5
+	BL vdso_zx_mtrace_control(SB)
+	MOVW R0, ret+32(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_object_wait_one(handle uint32, signals uint32, deadline int64, observed unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_object_wait_one(SB),NOSPLIT,$0-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	CALL runtime·entersyscall(SB)
+	MOVW handle+0(FP), R0
+	MOVW signals+4(FP), R1
+	MOVD deadline+8(FP), R2
+	MOVD observed+16(FP), R3
+	BL vdso_zx_object_wait_one(SB)
+	MOVW R0, ret+24(FP)
+	BL runtime·exitsyscall(SB)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_object_wait_many(items unsafe.Pointer, num_items uint, deadline int64) int32
+TEXT runtime·vdsoCall_zx_object_wait_many(SB),NOSPLIT,$0-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	CALL runtime·entersyscall(SB)
+	MOVD items+0(FP), R0
+	MOVD num_items+8(FP), R1
+	MOVD deadline+16(FP), R2
+	BL vdso_zx_object_wait_many(SB)
+	MOVW R0, ret+24(FP)
+	BL runtime·exitsyscall(SB)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_object_wait_async(handle uint32, port uint32, key uint64, signals uint32, options uint32) int32
+TEXT runtime·vdsoCall_zx_object_wait_async(SB),NOSPLIT,$0-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW handle+0(FP), R0
+	MOVW port+4(FP), R1
+	MOVD key+8(FP), R2
+	MOVW signals+16(FP), R3
+	MOVW options+20(FP), R4
+	BL vdso_zx_object_wait_async(SB)
+	MOVW R0, ret+24(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_object_signal(handle uint32, clear_mask uint32, set_mask uint32) int32
+TEXT runtime·vdsoCall_zx_object_signal(SB),NOSPLIT,$0-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW handle+0(FP), R0
+	MOVW clear_mask+4(FP), R1
+	MOVW set_mask+8(FP), R2
+	BL vdso_zx_object_signal(SB)
+	MOVW R0, ret+16(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_object_signal_peer(handle uint32, clear_mask uint32, set_mask uint32) int32
+TEXT runtime·vdsoCall_zx_object_signal_peer(SB),NOSPLIT,$0-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW handle+0(FP), R0
+	MOVW clear_mask+4(FP), R1
+	MOVW set_mask+8(FP), R2
+	BL vdso_zx_object_signal_peer(SB)
+	MOVW R0, ret+16(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_object_get_property(handle uint32, property uint32, value unsafe.Pointer, value_size uint) int32
+TEXT runtime·vdsoCall_zx_object_get_property(SB),NOSPLIT,$0-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW handle+0(FP), R0
+	MOVW property+4(FP), R1
+	MOVD value+8(FP), R2
+	MOVD value_size+16(FP), R3
+	BL vdso_zx_object_get_property(SB)
+	MOVW R0, ret+24(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_object_set_property(handle uint32, property uint32, value unsafe.Pointer, value_size uint) int32
+TEXT runtime·vdsoCall_zx_object_set_property(SB),NOSPLIT,$0-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW handle+0(FP), R0
+	MOVW property+4(FP), R1
+	MOVD value+8(FP), R2
+	MOVD value_size+16(FP), R3
+	BL vdso_zx_object_set_property(SB)
+	MOVW R0, ret+24(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_object_get_info(handle uint32, topic uint32, buffer unsafe.Pointer, buffer_size uint, actual unsafe.Pointer, avail unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_object_get_info(SB),NOSPLIT,$0-44
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW handle+0(FP), R0
+	MOVW topic+4(FP), R1
+	MOVD buffer+8(FP), R2
+	MOVD buffer_size+16(FP), R3
+	MOVD actual+24(FP), R4
+	MOVD avail+32(FP), R5
+	BL vdso_zx_object_get_info(SB)
+	MOVW R0, ret+40(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_object_get_child(handle uint32, koid uint64, rights uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_object_get_child(SB),NOSPLIT,$0-36
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW handle+0(FP), R0
+	MOVD koid+8(FP), R1
+	MOVW rights+16(FP), R2
+	MOVD out+24(FP), R3
+	BL vdso_zx_object_get_child(SB)
+	MOVW R0, ret+32(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_object_set_profile(handle uint32, profile uint32, options uint32) int32
+TEXT runtime·vdsoCall_zx_object_set_profile(SB),NOSPLIT,$0-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW handle+0(FP), R0
+	MOVW profile+4(FP), R1
+	MOVW options+8(FP), R2
+	BL vdso_zx_object_set_profile(SB)
+	MOVW R0, ret+16(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_pager_create(options uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_pager_create(SB),NOSPLIT,$0-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW options+0(FP), R0
+	MOVD out+8(FP), R1
+	BL vdso_zx_pager_create(SB)
+	MOVW R0, ret+16(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_pager_create_vmo(pager uint32, options uint32, port uint32, key uint64, size uint64, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_pager_create_vmo(SB),NOSPLIT,$0-44
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW pager+0(FP), R0
+	MOVW options+4(FP), R1
+	MOVW port+8(FP), R2
+	MOVD key+16(FP), R3
+	MOVD size+24(FP), R4
+	MOVD out+32(FP), R5
+	BL vdso_zx_pager_create_vmo(SB)
+	MOVW R0, ret+40(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_pager_detach_vmo(pager uint32, vmo uint32) int32
+TEXT runtime·vdsoCall_zx_pager_detach_vmo(SB),NOSPLIT,$0-12
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW pager+0(FP), R0
+	MOVW vmo+4(FP), R1
+	BL vdso_zx_pager_detach_vmo(SB)
+	MOVW R0, ret+8(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_pager_supply_pages(pager uint32, pager_vmo uint32, offset uint64, length uint64, aux_vmo uint32, aux_offset uint64) int32
+TEXT runtime·vdsoCall_zx_pager_supply_pages(SB),NOSPLIT,$0-44
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW pager+0(FP), R0
+	MOVW pager_vmo+4(FP), R1
+	MOVD offset+8(FP), R2
+	MOVD length+16(FP), R3
+	MOVW aux_vmo+24(FP), R4
+	MOVD aux_offset+32(FP), R5
+	BL vdso_zx_pager_supply_pages(SB)
+	MOVW R0, ret+40(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_pager_op_range(pager uint32, op uint32, pager_vmo uint32, offset uint64, length uint64, data uint64) int32
+TEXT runtime·vdsoCall_zx_pager_op_range(SB),NOSPLIT,$0-44
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW pager+0(FP), R0
+	MOVW op+4(FP), R1
+	MOVW pager_vmo+8(FP), R2
+	MOVD offset+16(FP), R3
+	MOVD length+24(FP), R4
+	MOVD data+32(FP), R5
+	BL vdso_zx_pager_op_range(SB)
+	MOVW R0, ret+40(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_pc_firmware_tables(handle uint32, acpi_rsdp unsafe.Pointer, smbios unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_pc_firmware_tables(SB),NOSPLIT,$0-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW handle+0(FP), R0
+	MOVD acpi_rsdp+8(FP), R1
+	MOVD smbios+16(FP), R2
+	BL vdso_zx_pc_firmware_tables(SB)
+	MOVW R0, ret+24(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_pci_get_nth_device(handle uint32, index uint32, out_info unsafe.Pointer, out_handle unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_pci_get_nth_device(SB),NOSPLIT,$0-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW handle+0(FP), R0
+	MOVW index+4(FP), R1
+	MOVD out_info+8(FP), R2
+	MOVD out_handle+16(FP), R3
+	BL vdso_zx_pci_get_nth_device(SB)
+	MOVW R0, ret+24(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_pci_enable_bus_master(handle uint32, enable uint32) int32
+TEXT runtime·vdsoCall_zx_pci_enable_bus_master(SB),NOSPLIT,$0-12
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW handle+0(FP), R0
+	MOVW enable+4(FP), R1
+	BL vdso_zx_pci_enable_bus_master(SB)
+	MOVW R0, ret+8(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_pci_reset_device(handle uint32) int32
+TEXT runtime·vdsoCall_zx_pci_reset_device(SB),NOSPLIT,$0-12
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW handle+0(FP), R0
+	BL vdso_zx_pci_reset_device(SB)
+	MOVW R0, ret+8(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_pci_config_read(handle uint32, offset uint16, width uint, out_val unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_pci_config_read(SB),NOSPLIT,$0-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW handle+0(FP), R0
+	MOVD offset+4(FP), R1
+	MOVD width+8(FP), R2
+	MOVD out_val+16(FP), R3
+	BL vdso_zx_pci_config_read(SB)
+	MOVW R0, ret+24(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_pci_config_write(handle uint32, offset uint16, width uint, val uint32) int32
+TEXT runtime·vdsoCall_zx_pci_config_write(SB),NOSPLIT,$0-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW handle+0(FP), R0
+	MOVD offset+4(FP), R1
+	MOVD width+8(FP), R2
+	MOVW val+16(FP), R3
+	BL vdso_zx_pci_config_write(SB)
+	MOVW R0, ret+24(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_pci_cfg_pio_rw(handle uint32, bus uint8, dev uint8, funk uint8, offset uint8, val unsafe.Pointer, width uint, write uint32) int32
+TEXT runtime·vdsoCall_zx_pci_cfg_pio_rw(SB),NOSPLIT,$0-68
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW handle+0(FP), R0
+	MOVD bus+8(FP), R1
+	MOVD dev+16(FP), R2
+	MOVD funk+24(FP), R3
+	MOVD offset+32(FP), R4
+	MOVD val+40(FP), R5
+	MOVD width+48(FP), R6
+	MOVW write+56(FP), R7
+	BL vdso_zx_pci_cfg_pio_rw(SB)
+	MOVW R0, ret+64(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_pci_get_bar(handle uint32, bar_num uint32, out_bar unsafe.Pointer, out_handle unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_pci_get_bar(SB),NOSPLIT,$0-28
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW handle+0(FP), R0
+	MOVW bar_num+4(FP), R1
+	MOVD out_bar+8(FP), R2
+	MOVD out_handle+16(FP), R3
+	BL vdso_zx_pci_get_bar(SB)
+	MOVW R0, ret+24(FP)
+	MOVD g_m(g), R21
+	MOVD $0, m_vdsoSP(R21)
+	RET
+
+// func vdsoCall_zx_pci_map_interrupt(handle uint32, which_irq int32, out_handle unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_pci_map_interrupt(SB),NOSPLIT,$0-20
+	GO_ARGS
+	NO_LOCAL_POINTERS
+	MOVD g_m(g), R21
+	MOVD LR, m_vdsoPC(R21)
+	MOVD RSP, R20
+	MOVD R20, m_vdsoSP(R21)
+	MOVW handle+0(FP), R0
+	MOVW which_irq+4(FP), R1