unix: add mount(2) for macOS
The 'data' argument of this method needs to point to a file system type
specific data structure. In the case of NFS (which I'm interested in
using), this needs to point to an XDR encoded message. The schema for
this message can be found here:
https://github.com/apple-oss-distributions/NFS/blob/main/mount_nfs/nfs_sys_prot.x
Change-Id: Ia49562ba6e8ab5d4c00eb961db6862fb1310b74e
GitHub-Last-Rev: 62c32df776263b4efb315077536740ae8fe7e53f
GitHub-Pull-Request: golang/sys#125
Reviewed-on: https://go-review.googlesource.com/c/sys/+/405494
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
diff --git a/unix/zsyscall_darwin_arm64.s b/unix/zsyscall_darwin_arm64.s
index 4d26f7d..b09e5bb 100644
--- a/unix/zsyscall_darwin_arm64.s
+++ b/unix/zsyscall_darwin_arm64.s
@@ -600,6 +600,12 @@
GLOBL ·libc_mknod_trampoline_addr(SB), RODATA, $8
DATA ·libc_mknod_trampoline_addr(SB)/8, $libc_mknod_trampoline<>(SB)
+TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mount(SB)
+
+GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mount_trampoline_addr(SB)/8, $libc_mount_trampoline<>(SB)
+
TEXT libc_open_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_open(SB)