file update
parent
3f7ed43a5b
commit
a5e148d6b8
@ -1,9 +0,0 @@
|
|||||||
language: go
|
|
||||||
go:
|
|
||||||
- tip
|
|
||||||
|
|
||||||
before_install:
|
|
||||||
- go get github.com/mattn/goveralls
|
|
||||||
- go get golang.org/x/tools/cmd/cover
|
|
||||||
script:
|
|
||||||
- $HOME/gopath/bin/goveralls -repotoken xnXqRGwgW3SXIguzxf90ZSK1GPYZPaGrw
|
|
@ -0,0 +1,12 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
echo "" > coverage.txt
|
||||||
|
|
||||||
|
for d in $(go list ./... | grep -v vendor); do
|
||||||
|
go test -race -coverprofile=profile.out -covermode=atomic "$d"
|
||||||
|
if [ -f profile.out ]; then
|
||||||
|
cat profile.out >> coverage.txt
|
||||||
|
rm profile.out
|
||||||
|
fi
|
||||||
|
done
|
@ -1,9 +0,0 @@
|
|||||||
language: go
|
|
||||||
go:
|
|
||||||
- tip
|
|
||||||
|
|
||||||
before_install:
|
|
||||||
- go get github.com/mattn/goveralls
|
|
||||||
- go get golang.org/x/tools/cmd/cover
|
|
||||||
script:
|
|
||||||
- $HOME/gopath/bin/goveralls -repotoken 3gHdORO5k5ziZcWMBxnd9LrMZaJs8m9x5
|
|
@ -0,0 +1,12 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
echo "" > coverage.txt
|
||||||
|
|
||||||
|
for d in $(go list ./... | grep -v vendor); do
|
||||||
|
go test -race -coverprofile=profile.out -covermode=atomic "$d"
|
||||||
|
if [ -f profile.out ]; then
|
||||||
|
cat profile.out >> coverage.txt
|
||||||
|
rm profile.out
|
||||||
|
fi
|
||||||
|
done
|
@ -1,10 +0,0 @@
|
|||||||
# Treat all files in this repo as binary, with no git magic updating
|
|
||||||
# line endings. Windows users contributing to Go will need to use a
|
|
||||||
# modern version of git and editors capable of LF line endings.
|
|
||||||
#
|
|
||||||
# We'll prevent accidental CRLF line endings from entering the repo
|
|
||||||
# via the git-review gofmt checks.
|
|
||||||
#
|
|
||||||
# See golang.org/issue/9281
|
|
||||||
|
|
||||||
* -text
|
|
@ -1,2 +0,0 @@
|
|||||||
# Add no patterns to .hgignore except for files generated by the build.
|
|
||||||
last-change
|
|
@ -1,3 +0,0 @@
|
|||||||
# This source code refers to The Go Authors for copyright purposes.
|
|
||||||
# The master list of authors is in the main Go distribution,
|
|
||||||
# visible at http://tip.golang.org/AUTHORS.
|
|
@ -1,31 +0,0 @@
|
|||||||
# Contributing to Go
|
|
||||||
|
|
||||||
Go is an open source project.
|
|
||||||
|
|
||||||
It is the work of hundreds of contributors. We appreciate your help!
|
|
||||||
|
|
||||||
|
|
||||||
## Filing issues
|
|
||||||
|
|
||||||
When [filing an issue](https://golang.org/issue/new), make sure to answer these five questions:
|
|
||||||
|
|
||||||
1. What version of Go are you using (`go version`)?
|
|
||||||
2. What operating system and processor architecture are you using?
|
|
||||||
3. What did you do?
|
|
||||||
4. What did you expect to see?
|
|
||||||
5. What did you see instead?
|
|
||||||
|
|
||||||
General questions should go to the [golang-nuts mailing list](https://groups.google.com/group/golang-nuts) instead of the issue tracker.
|
|
||||||
The gophers there will answer or ask you to file an issue if you've tripped over a bug.
|
|
||||||
|
|
||||||
## Contributing code
|
|
||||||
|
|
||||||
Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html)
|
|
||||||
before sending patches.
|
|
||||||
|
|
||||||
**We do not accept GitHub pull requests**
|
|
||||||
(we use [Gerrit](https://code.google.com/p/gerrit/) instead for code review).
|
|
||||||
|
|
||||||
Unless otherwise noted, the Go source files are distributed under
|
|
||||||
the BSD-style license found in the LICENSE file.
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
|||||||
# This source code was written by the Go contributors.
|
|
||||||
# The master list of contributors is in the main Go distribution,
|
|
||||||
# visible at http://tip.golang.org/CONTRIBUTORS.
|
|
@ -1,18 +0,0 @@
|
|||||||
# sys
|
|
||||||
|
|
||||||
This repository holds supplemental Go packages for low-level interactions with
|
|
||||||
the operating system.
|
|
||||||
|
|
||||||
## Download/Install
|
|
||||||
|
|
||||||
The easiest way to install is to run `go get -u golang.org/x/sys`. You can
|
|
||||||
also manually git clone the repository to `$GOPATH/src/golang.org/x/sys`.
|
|
||||||
|
|
||||||
## Report Issues / Send Patches
|
|
||||||
|
|
||||||
This repository uses Gerrit for code changes. To learn how to submit changes to
|
|
||||||
this repository, see https://golang.org/doc/contribute.html.
|
|
||||||
|
|
||||||
The main issue tracker for the sys repository is located at
|
|
||||||
https://github.com/golang/go/issues. Prefix your issue with "x/sys:" in the
|
|
||||||
subject line, so it is easy to find.
|
|
@ -1 +0,0 @@
|
|||||||
issuerepo: golang/go
|
|
@ -1,8 +0,0 @@
|
|||||||
// Copyright 2014 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 ·use(SB),NOSPLIT,$0
|
|
||||||
RET
|
|
@ -1,30 +0,0 @@
|
|||||||
// 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.
|
|
||||||
|
|
||||||
#include "textflag.h"
|
|
||||||
|
|
||||||
//
|
|
||||||
// System call support for 386, Plan 9
|
|
||||||
//
|
|
||||||
|
|
||||||
// Just jump to package syscall's implementation for all these functions.
|
|
||||||
// The runtime may know about them.
|
|
||||||
|
|
||||||
TEXT ·Syscall(SB),NOSPLIT,$0-32
|
|
||||||
JMP syscall·Syscall(SB)
|
|
||||||
|
|
||||||
TEXT ·Syscall6(SB),NOSPLIT,$0-44
|
|
||||||
JMP syscall·Syscall6(SB)
|
|
||||||
|
|
||||||
TEXT ·RawSyscall(SB),NOSPLIT,$0-28
|
|
||||||
JMP syscall·RawSyscall(SB)
|
|
||||||
|
|
||||||
TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
|
|
||||||
JMP syscall·RawSyscall6(SB)
|
|
||||||
|
|
||||||
TEXT ·seek(SB),NOSPLIT,$0-36
|
|
||||||
JMP syscall·seek(SB)
|
|
||||||
|
|
||||||
TEXT ·exit(SB),NOSPLIT,$4-4
|
|
||||||
JMP syscall·exit(SB)
|
|
@ -1,138 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
# 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.
|
|
||||||
|
|
||||||
# The plan9 package provides access to the raw system call
|
|
||||||
# interface of the underlying operating system. Porting Go to
|
|
||||||
# a new architecture/operating system combination requires
|
|
||||||
# some manual effort, though there are tools that automate
|
|
||||||
# much of the process. The auto-generated files have names
|
|
||||||
# beginning with z.
|
|
||||||
#
|
|
||||||
# This script runs or (given -n) prints suggested commands to generate z files
|
|
||||||
# for the current system. Running those commands is not automatic.
|
|
||||||
# This script is documentation more than anything else.
|
|
||||||
#
|
|
||||||
# * asm_${GOOS}_${GOARCH}.s
|
|
||||||
#
|
|
||||||
# This hand-written assembly file implements system call dispatch.
|
|
||||||
# There are three entry points:
|
|
||||||
#
|
|
||||||
# func Syscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr);
|
|
||||||
# func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr);
|
|
||||||
# func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr);
|
|
||||||
#
|
|
||||||
# The first and second are the standard ones; they differ only in
|
|
||||||
# how many arguments can be passed to the kernel.
|
|
||||||
# The third is for low-level use by the ForkExec wrapper;
|
|
||||||
# unlike the first two, it does not call into the scheduler to
|
|
||||||
# let it know that a system call is running.
|
|
||||||
#
|
|
||||||
# * syscall_${GOOS}.go
|
|
||||||
#
|
|
||||||
# This hand-written Go file implements system calls that need
|
|
||||||
# special handling and lists "//sys" comments giving prototypes
|
|
||||||
# for ones that can be auto-generated. Mksyscall reads those
|
|
||||||
# comments to generate the stubs.
|
|
||||||
#
|
|
||||||
# * syscall_${GOOS}_${GOARCH}.go
|
|
||||||
#
|
|
||||||
# Same as syscall_${GOOS}.go except that it contains code specific
|
|
||||||
# to ${GOOS} on one particular architecture.
|
|
||||||
#
|
|
||||||
# * types_${GOOS}.c
|
|
||||||
#
|
|
||||||
# This hand-written C file includes standard C headers and then
|
|
||||||
# creates typedef or enum names beginning with a dollar sign
|
|
||||||
# (use of $ in variable names is a gcc extension). The hardest
|
|
||||||
# part about preparing this file is figuring out which headers to
|
|
||||||
# include and which symbols need to be #defined to get the
|
|
||||||
# actual data structures that pass through to the kernel system calls.
|
|
||||||
# Some C libraries present alternate versions for binary compatibility
|
|
||||||
# and translate them on the way in and out of system calls, but
|
|
||||||
# there is almost always a #define that can get the real ones.
|
|
||||||
# See types_darwin.c and types_linux.c for examples.
|
|
||||||
#
|
|
||||||
# * zerror_${GOOS}_${GOARCH}.go
|
|
||||||
#
|
|
||||||
# This machine-generated file defines the system's error numbers,
|
|
||||||
# error strings, and signal numbers. The generator is "mkerrors.sh".
|
|
||||||
# Usually no arguments are needed, but mkerrors.sh will pass its
|
|
||||||
# arguments on to godefs.
|
|
||||||
#
|
|
||||||
# * zsyscall_${GOOS}_${GOARCH}.go
|
|
||||||
#
|
|
||||||
# Generated by mksyscall.pl; see syscall_${GOOS}.go above.
|
|
||||||
#
|
|
||||||
# * zsysnum_${GOOS}_${GOARCH}.go
|
|
||||||
#
|
|
||||||
# Generated by mksysnum_${GOOS}.
|
|
||||||
#
|
|
||||||
# * ztypes_${GOOS}_${GOARCH}.go
|
|
||||||
#
|
|
||||||
# Generated by godefs; see types_${GOOS}.c above.
|
|
||||||
|
|
||||||
GOOSARCH="${GOOS}_${GOARCH}"
|
|
||||||
|
|
||||||
# defaults
|
|
||||||
mksyscall="./mksyscall.pl"
|
|
||||||
mkerrors="./mkerrors.sh"
|
|
||||||
zerrors="zerrors_$GOOSARCH.go"
|
|
||||||
mksysctl=""
|
|
||||||
zsysctl="zsysctl_$GOOSARCH.go"
|
|
||||||
mksysnum=
|
|
||||||
mktypes=
|
|
||||||
run="sh"
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
-syscalls)
|
|
||||||
for i in zsyscall*go
|
|
||||||
do
|
|
||||||
sed 1q $i | sed 's;^// ;;' | sh > _$i && gofmt < _$i > $i
|
|
||||||
rm _$i
|
|
||||||
done
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
-n)
|
|
||||||
run="cat"
|
|
||||||
shift
|
|
||||||
esac
|
|
||||||
|
|
||||||
case "$#" in
|
|
||||||
0)
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo 'usage: mkall.sh [-n]' 1>&2
|
|
||||||
exit 2
|
|
||||||
esac
|
|
||||||
|
|
||||||
case "$GOOSARCH" in
|
|
||||||
_* | *_ | _)
|
|
||||||
echo 'undefined $GOOS_$GOARCH:' "$GOOSARCH" 1>&2
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
plan9_386)
|
|
||||||
mkerrors=
|
|
||||||
mksyscall="./mksyscall.pl -l32 -plan9"
|
|
||||||
mksysnum="./mksysnum_plan9.sh /n/sources/plan9/sys/src/libc/9syscall/sys.h"
|
|
||||||
mktypes="XXX"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo 'unrecognized $GOOS_$GOARCH: ' "$GOOSARCH" 1>&2
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
(
|
|
||||||
if [ -n "$mkerrors" ]; then echo "$mkerrors |gofmt >$zerrors"; fi
|
|
||||||
case "$GOOS" in
|
|
||||||
plan9)
|
|
||||||
syscall_goos="syscall_$GOOS.go"
|
|
||||||
if [ -n "$mksyscall" ]; then echo "$mksyscall $syscall_goos syscall_$GOOSARCH.go |gofmt >zsyscall_$GOOSARCH.go"; fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
if [ -n "$mksysctl" ]; then echo "$mksysctl |gofmt >$zsysctl"; fi
|
|
||||||
if [ -n "$mksysnum" ]; then echo "$mksysnum |gofmt >zsysnum_$GOOSARCH.go"; fi
|
|
||||||
if [ -n "$mktypes" ]; then echo "$mktypes types_$GOOS.go |gofmt >ztypes_$GOOSARCH.go"; fi
|
|
||||||
) | $run
|
|
@ -1,246 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
# 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.
|
|
||||||
|
|
||||||
# Generate Go code listing errors and other #defined constant
|
|
||||||
# values (ENAMETOOLONG etc.), by asking the preprocessor
|
|
||||||
# about the definitions.
|
|
||||||
|
|
||||||
unset LANG
|
|
||||||
export LC_ALL=C
|
|
||||||
export LC_CTYPE=C
|
|
||||||
|
|
||||||
CC=${CC:-gcc}
|
|
||||||
|
|
||||||
uname=$(uname)
|
|
||||||
|
|
||||||
includes='
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/file.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <dirent.h>
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <netinet/in.h>
|
|
||||||
#include <netinet/ip.h>
|
|
||||||
#include <netinet/ip6.h>
|
|
||||||
#include <netinet/tcp.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <sys/signal.h>
|
|
||||||
#include <signal.h>
|
|
||||||
#include <sys/resource.h>
|
|
||||||
'
|
|
||||||
|
|
||||||
ccflags="$@"
|
|
||||||
|
|
||||||
# Write go tool cgo -godefs input.
|
|
||||||
(
|
|
||||||
echo package plan9
|
|
||||||
echo
|
|
||||||
echo '/*'
|
|
||||||
indirect="includes_$(uname)"
|
|
||||||
echo "${!indirect} $includes"
|
|
||||||
echo '*/'
|
|
||||||
echo 'import "C"'
|
|
||||||
echo
|
|
||||||
echo 'const ('
|
|
||||||
|
|
||||||
# The gcc command line prints all the #defines
|
|
||||||
# it encounters while processing the input
|
|
||||||
echo "${!indirect} $includes" | $CC -x c - -E -dM $ccflags |
|
|
||||||
awk '
|
|
||||||
$1 != "#define" || $2 ~ /\(/ || $3 == "" {next}
|
|
||||||
|
|
||||||
$2 ~ /^E([ABCD]X|[BIS]P|[SD]I|S|FL)$/ {next} # 386 registers
|
|
||||||
$2 ~ /^(SIGEV_|SIGSTKSZ|SIGRT(MIN|MAX))/ {next}
|
|
||||||
$2 ~ /^(SCM_SRCRT)$/ {next}
|
|
||||||
$2 ~ /^(MAP_FAILED)$/ {next}
|
|
||||||
|
|
||||||
$2 !~ /^ETH_/ &&
|
|
||||||
$2 !~ /^EPROC_/ &&
|
|
||||||
$2 !~ /^EQUIV_/ &&
|
|
||||||
$2 !~ /^EXPR_/ &&
|
|
||||||
$2 ~ /^E[A-Z0-9_]+$/ ||
|
|
||||||
$2 ~ /^B[0-9_]+$/ ||
|
|
||||||
$2 ~ /^V[A-Z0-9]+$/ ||
|
|
||||||
$2 ~ /^CS[A-Z0-9]/ ||
|
|
||||||
$2 ~ /^I(SIG|CANON|CRNL|EXTEN|MAXBEL|STRIP|UTF8)$/ ||
|
|
||||||
$2 ~ /^IGN/ ||
|
|
||||||
$2 ~ /^IX(ON|ANY|OFF)$/ ||
|
|
||||||
$2 ~ /^IN(LCR|PCK)$/ ||
|
|
||||||
$2 ~ /(^FLU?SH)|(FLU?SH$)/ ||
|
|
||||||
$2 ~ /^C(LOCAL|READ)$/ ||
|
|
||||||
$2 == "BRKINT" ||
|
|
||||||
$2 == "HUPCL" ||
|
|
||||||
$2 == "PENDIN" ||
|
|
||||||
$2 == "TOSTOP" ||
|
|
||||||
$2 ~ /^PAR/ ||
|
|
||||||
$2 ~ /^SIG[^_]/ ||
|
|
||||||
$2 ~ /^O[CNPFP][A-Z]+[^_][A-Z]+$/ ||
|
|
||||||
$2 ~ /^IN_/ ||
|
|
||||||
$2 ~ /^LOCK_(SH|EX|NB|UN)$/ ||
|
|
||||||
$2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|ICMP6|TCP|EVFILT|NOTE|EV|SHUT|PROT|MAP|PACKET|MSG|SCM|MCL|DT|MADV|PR)_/ ||
|
|
||||||
$2 == "ICMPV6_FILTER" ||
|
|
||||||
$2 == "SOMAXCONN" ||
|
|
||||||
$2 == "NAME_MAX" ||
|
|
||||||
$2 == "IFNAMSIZ" ||
|
|
||||||
$2 ~ /^CTL_(MAXNAME|NET|QUERY)$/ ||
|
|
||||||
$2 ~ /^SYSCTL_VERS/ ||
|
|
||||||
$2 ~ /^(MS|MNT)_/ ||
|
|
||||||
$2 ~ /^TUN(SET|GET|ATTACH|DETACH)/ ||
|
|
||||||
$2 ~ /^(O|F|FD|NAME|S|PTRACE|PT)_/ ||
|
|
||||||
$2 ~ /^LINUX_REBOOT_CMD_/ ||
|
|
||||||
$2 ~ /^LINUX_REBOOT_MAGIC[12]$/ ||
|
|
||||||
$2 !~ "NLA_TYPE_MASK" &&
|
|
||||||
$2 ~ /^(NETLINK|NLM|NLMSG|NLA|IFA|IFAN|RT|RTCF|RTN|RTPROT|RTNH|ARPHRD|ETH_P)_/ ||
|
|
||||||
$2 ~ /^SIOC/ ||
|
|
||||||
$2 ~ /^TIOC/ ||
|
|
||||||
$2 !~ "RTF_BITS" &&
|
|
||||||
$2 ~ /^(IFF|IFT|NET_RT|RTM|RTF|RTV|RTA|RTAX)_/ ||
|
|
||||||
$2 ~ /^BIOC/ ||
|
|
||||||
$2 ~ /^RUSAGE_(SELF|CHILDREN|THREAD)/ ||
|
|
||||||
$2 ~ /^RLIMIT_(AS|CORE|CPU|DATA|FSIZE|NOFILE|STACK)|RLIM_INFINITY/ ||
|
|
||||||
$2 ~ /^PRIO_(PROCESS|PGRP|USER)/ ||
|
|
||||||
$2 ~ /^CLONE_[A-Z_]+/ ||
|
|
||||||
$2 !~ /^(BPF_TIMEVAL)$/ &&
|
|
||||||
$2 ~ /^(BPF|DLT)_/ ||
|
|
||||||
$2 !~ "WMESGLEN" &&
|
|
||||||
$2 ~ /^W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", $2, $2)}
|
|
||||||
$2 ~ /^__WCOREFLAG$/ {next}
|
|
||||||
$2 ~ /^__W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", substr($2,3), $2)}
|
|
||||||
|
|
||||||
{next}
|
|
||||||
' | sort
|
|
||||||
|
|
||||||
echo ')'
|
|
||||||
) >_const.go
|
|
||||||
|
|
||||||
# Pull out the error names for later.
|
|
||||||
errors=$(
|
|
||||||
echo '#include <errno.h>' | $CC -x c - -E -dM $ccflags |
|
|
||||||
awk '$1=="#define" && $2 ~ /^E[A-Z0-9_]+$/ { print $2 }' |
|
|
||||||
sort
|
|
||||||
)
|
|
||||||
|
|
||||||
# Pull out the signal names for later.
|
|
||||||
signals=$(
|
|
||||||
echo '#include <signal.h>' | $CC -x c - -E -dM $ccflags |
|
|
||||||
awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print $2 }' |
|
|
||||||
egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT)' |
|
|
||||||
sort
|
|
||||||
)
|
|
||||||
|
|
||||||
# Again, writing regexps to a file.
|
|
||||||
echo '#include <errno.h>' | $CC -x c - -E -dM $ccflags |
|
|
||||||
awk '$1=="#define" && $2 ~ /^E[A-Z0-9_]+$/ { print "^\t" $2 "[ \t]*=" }' |
|
|
||||||
sort >_error.grep
|
|
||||||
echo '#include <signal.h>' | $CC -x c - -E -dM $ccflags |
|
|
||||||
awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print "^\t" $2 "[ \t]*=" }' |
|
|
||||||
egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT)' |
|
|
||||||
sort >_signal.grep
|
|
||||||
|
|
||||||
echo '// mkerrors.sh' "$@"
|
|
||||||
echo '// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT'
|
|
||||||
echo
|
|
||||||
go tool cgo -godefs -- "$@" _const.go >_error.out
|
|
||||||
cat _error.out | grep -vf _error.grep | grep -vf _signal.grep
|
|
||||||
echo
|
|
||||||
echo '// Errors'
|
|
||||||
echo 'const ('
|
|
||||||
cat _error.out | grep -f _error.grep | sed 's/=\(.*\)/= Errno(\1)/'
|
|
||||||
echo ')'
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo '// Signals'
|
|
||||||
echo 'const ('
|
|
||||||
cat _error.out | grep -f _signal.grep | sed 's/=\(.*\)/= Signal(\1)/'
|
|
||||||
echo ')'
|
|
||||||
|
|
||||||
# Run C program to print error and syscall strings.
|
|
||||||
(
|
|
||||||
echo -E "
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <ctype.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <signal.h>
|
|
||||||
|
|
||||||
#define nelem(x) (sizeof(x)/sizeof((x)[0]))
|
|
||||||
|
|
||||||
enum { A = 'A', Z = 'Z', a = 'a', z = 'z' }; // avoid need for single quotes below
|
|
||||||
|
|
||||||
int errors[] = {
|
|
||||||
"
|
|
||||||
for i in $errors
|
|
||||||
do
|
|
||||||
echo -E ' '$i,
|
|
||||||
done
|
|
||||||
|
|
||||||
echo -E "
|
|
||||||
};
|
|
||||||
|
|
||||||
int signals[] = {
|
|
||||||
"
|
|
||||||
for i in $signals
|
|
||||||
do
|
|
||||||
echo -E ' '$i,
|
|
||||||
done
|
|
||||||
|
|
||||||
# Use -E because on some systems bash builtin interprets \n itself.
|
|
||||||
echo -E '
|
|
||||||
};
|
|
||||||
|
|
||||||
static int
|
|
||||||
intcmp(const void *a, const void *b)
|
|
||||||
{
|
|
||||||
return *(int*)a - *(int*)b;
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
main(void)
|
|
||||||
{
|
|
||||||
int i, j, e;
|
|
||||||
char buf[1024], *p;
|
|
||||||
|
|
||||||
printf("\n\n// Error table\n");
|
|
||||||
printf("var errors = [...]string {\n");
|
|
||||||
qsort(errors, nelem(errors), sizeof errors[0], intcmp);
|
|
||||||
for(i=0; i<nelem(errors); i++) {
|
|
||||||
e = errors[i];
|
|
||||||
if(i > 0 && errors[i-1] == e)
|
|
||||||
continue;
|
|
||||||
strcpy(buf, strerror(e));
|
|
||||||
// lowercase first letter: Bad -> bad, but STREAM -> STREAM.
|
|
||||||
if(A <= buf[0] && buf[0] <= Z && a <= buf[1] && buf[1] <= z)
|
|
||||||
buf[0] += a - A;
|
|
||||||
printf("\t%d: \"%s\",\n", e, buf);
|
|
||||||
}
|
|
||||||
printf("}\n\n");
|
|
||||||
|
|
||||||
printf("\n\n// Signal table\n");
|
|
||||||
printf("var signals = [...]string {\n");
|
|
||||||
qsort(signals, nelem(signals), sizeof signals[0], intcmp);
|
|
||||||
for(i=0; i<nelem(signals); i++) {
|
|
||||||
e = signals[i];
|
|
||||||
if(i > 0 && signals[i-1] == e)
|
|
||||||
continue;
|
|
||||||
strcpy(buf, strsignal(e));
|
|
||||||
// lowercase first letter: Bad -> bad, but STREAM -> STREAM.
|
|
||||||
if(A <= buf[0] && buf[0] <= Z && a <= buf[1] && buf[1] <= z)
|
|
||||||
buf[0] += a - A;
|
|
||||||
// cut trailing : number.
|
|
||||||
p = strrchr(buf, ":"[0]);
|
|
||||||
if(p)
|
|
||||||
*p = '\0';
|
|
||||||
printf("\t%d: \"%s\",\n", e, buf);
|
|
||||||
}
|
|
||||||
printf("}\n\n");
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
'
|
|
||||||
) >_errors.c
|
|
||||||
|
|
||||||
$CC $ccflags -o _errors _errors.c && $GORUN ./_errors && rm -f _errors.c _errors _const.go _error.grep _signal.grep _error.out
|
|
@ -1,319 +0,0 @@
|
|||||||
#!/usr/bin/env perl
|
|
||||||
# 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.
|
|
||||||
|
|
||||||
# This program reads a file containing function prototypes
|
|
||||||
# (like syscall_plan9.go) and generates system call bodies.
|
|
||||||
# The prototypes are marked by lines beginning with "//sys"
|
|
||||||
# and read like func declarations if //sys is replaced by func, but:
|
|
||||||
# * The parameter lists must give a name for each argument.
|
|
||||||
# This includes return parameters.
|
|
||||||
# * The parameter lists must give a type for each argument:
|
|
||||||
# the (x, y, z int) shorthand is not allowed.
|
|
||||||
# * If the return parameter is an error number, it must be named errno.
|
|
||||||
|
|
||||||
# A line beginning with //sysnb is like //sys, except that the
|
|
||||||
# goroutine will not be suspended during the execution of the system
|
|
||||||
# call. This must only be used for system calls which can never
|
|
||||||
# block, as otherwise the system call could cause all goroutines to
|
|
||||||
# hang.
|
|
||||||
|
|
||||||
use strict;
|
|
||||||
|
|
||||||
my $cmdline = "mksyscall.pl " . join(' ', @ARGV);
|
|
||||||
my $errors = 0;
|
|
||||||
my $_32bit = "";
|
|
||||||
my $plan9 = 0;
|
|
||||||
my $openbsd = 0;
|
|
||||||
my $netbsd = 0;
|
|
||||||
my $dragonfly = 0;
|
|
||||||
my $nacl = 0;
|
|
||||||
my $arm = 0; # 64-bit value should use (even, odd)-pair
|
|
||||||
|
|
||||||
if($ARGV[0] eq "-b32") {
|
|
||||||
$_32bit = "big-endian";
|
|
||||||
shift;
|
|
||||||
} elsif($ARGV[0] eq "-l32") {
|
|
||||||
$_32bit = "little-endian";
|
|
||||||
shift;
|
|
||||||
}
|
|
||||||
if($ARGV[0] eq "-plan9") {
|
|
||||||
$plan9 = 1;
|
|
||||||
shift;
|
|
||||||
}
|
|
||||||
if($ARGV[0] eq "-openbsd") {
|
|
||||||
$openbsd = 1;
|
|
||||||
shift;
|
|
||||||
}
|
|
||||||
if($ARGV[0] eq "-netbsd") {
|
|
||||||
$netbsd = 1;
|
|
||||||
shift;
|
|
||||||
}
|
|
||||||
if($ARGV[0] eq "-dragonfly") {
|
|
||||||
$dragonfly = 1;
|
|
||||||
shift;
|
|
||||||
}
|
|
||||||
if($ARGV[0] eq "-nacl") {
|
|
||||||
$nacl = 1;
|
|
||||||
shift;
|
|
||||||
}
|
|
||||||
if($ARGV[0] eq "-arm") {
|
|
||||||
$arm = 1;
|
|
||||||
shift;
|
|
||||||
}
|
|
||||||
|
|
||||||
if($ARGV[0] =~ /^-/) {
|
|
||||||
print STDERR "usage: mksyscall.pl [-b32 | -l32] [file ...]\n";
|
|
||||||
exit 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub parseparamlist($) {
|
|
||||||
my ($list) = @_;
|
|
||||||
$list =~ s/^\s*//;
|
|
||||||
$list =~ s/\s*$//;
|
|
||||||
if($list eq "") {
|
|
||||||
return ();
|
|
||||||
}
|
|
||||||
return split(/\s*,\s*/, $list);
|
|
||||||
}
|
|
||||||
|
|
||||||
sub parseparam($) {
|
|
||||||
my ($p) = @_;
|
|
||||||
if($p !~ /^(\S*) (\S*)$/) {
|
|
||||||
print STDERR "$ARGV:$.: malformed parameter: $p\n";
|
|
||||||
$errors = 1;
|
|
||||||
return ("xx", "int");
|
|
||||||
}
|
|
||||||
return ($1, $2);
|
|
||||||
}
|
|
||||||
|
|
||||||
my $text = "";
|
|
||||||
while(<>) {
|
|
||||||
chomp;
|
|
||||||
s/\s+/ /g;
|
|
||||||
s/^\s+//;
|
|
||||||
s/\s+$//;
|
|
||||||
my $nonblock = /^\/\/sysnb /;
|
|
||||||
next if !/^\/\/sys / && !$nonblock;
|
|
||||||
|
|
||||||
# Line must be of the form
|
|
||||||
# func Open(path string, mode int, perm int) (fd int, errno error)
|
|
||||||
# Split into name, in params, out params.
|
|
||||||
if(!/^\/\/sys(nb)? (\w+)\(([^()]*)\)\s*(?:\(([^()]+)\))?\s*(?:=\s*((?i)SYS_[A-Z0-9_]+))?$/) {
|
|
||||||
print STDERR "$ARGV:$.: malformed //sys declaration\n";
|
|
||||||
$errors = 1;
|
|
||||||
next;
|
|
||||||
}
|
|
||||||
my ($func, $in, $out, $sysname) = ($2, $3, $4, $5);
|
|
||||||
|
|
||||||
# Split argument lists on comma.
|
|
||||||
my @in = parseparamlist($in);
|
|
||||||
my @out = parseparamlist($out);
|
|
||||||
|
|
||||||
# Try in vain to keep people from editing this file.
|
|
||||||
# The theory is that they jump into the middle of the file
|
|
||||||
# without reading the header.
|
|
||||||
$text .= "// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\n";
|
|
||||||
|
|
||||||
# Go function header.
|
|
||||||
my $out_decl = @out ? sprintf(" (%s)", join(', ', @out)) : "";
|
|
||||||
$text .= sprintf "func %s(%s)%s {\n", $func, join(', ', @in), $out_decl;
|
|
||||||
|
|
||||||
# Check if err return available
|
|
||||||
my $errvar = "";
|
|
||||||
foreach my $p (@out) {
|
|
||||||
my ($name, $type) = parseparam($p);
|
|
||||||
if($type eq "error") {
|
|
||||||
$errvar = $name;
|
|
||||||
last;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Prepare arguments to Syscall.
|
|
||||||
my @args = ();
|
|
||||||
my @uses = ();
|
|
||||||
my $n = 0;
|
|
||||||
foreach my $p (@in) {
|
|
||||||
my ($name, $type) = parseparam($p);
|
|
||||||
if($type =~ /^\*/) {
|
|
||||||
push @args, "uintptr(unsafe.Pointer($name))";
|
|
||||||
} elsif($type eq "string" && $errvar ne "") {
|
|
||||||
$text .= "\tvar _p$n *byte\n";
|
|
||||||
$text .= "\t_p$n, $errvar = BytePtrFromString($name)\n";
|
|
||||||
$text .= "\tif $errvar != nil {\n\t\treturn\n\t}\n";
|
|
||||||
push @args, "uintptr(unsafe.Pointer(_p$n))";
|
|
||||||
push @uses, "use(unsafe.Pointer(_p$n))";
|
|
||||||
$n++;
|
|
||||||
} elsif($type eq "string") {
|
|
||||||
print STDERR "$ARGV:$.: $func uses string arguments, but has no error return\n";
|
|
||||||
$text .= "\tvar _p$n *byte\n";
|
|
||||||
$text .= "\t_p$n, _ = BytePtrFromString($name)\n";
|
|
||||||
push @args, "uintptr(unsafe.Pointer(_p$n))";
|
|
||||||
push @uses, "use(unsafe.Pointer(_p$n))";
|
|
||||||
$n++;
|
|
||||||
} elsif($type =~ /^\[\](.*)/) {
|
|
||||||
# Convert slice into pointer, length.
|
|
||||||
# Have to be careful not to take address of &a[0] if len == 0:
|
|
||||||
# pass dummy pointer in that case.
|
|
||||||
# Used to pass nil, but some OSes or simulators reject write(fd, nil, 0).
|
|
||||||
$text .= "\tvar _p$n unsafe.Pointer\n";
|
|
||||||
$text .= "\tif len($name) > 0 {\n\t\t_p$n = unsafe.Pointer(\&${name}[0])\n\t}";
|
|
||||||
$text .= " else {\n\t\t_p$n = unsafe.Pointer(&_zero)\n\t}";
|
|
||||||
$text .= "\n";
|
|
||||||
push @args, "uintptr(_p$n)", "uintptr(len($name))";
|
|
||||||
$n++;
|
|
||||||
} elsif($type eq "int64" && ($openbsd || $netbsd)) {
|
|
||||||
push @args, "0";
|
|
||||||
if($_32bit eq "big-endian") {
|
|
||||||
push @args, "uintptr($name>>32)", "uintptr($name)";
|
|
||||||
} elsif($_32bit eq "little-endian") {
|
|
||||||
push @args, "uintptr($name)", "uintptr($name>>32)";
|
|
||||||
} else {
|
|
||||||
push @args, "uintptr($name)";
|
|
||||||
}
|
|
||||||
} elsif($type eq "int64" && $dragonfly) {
|
|
||||||
if ($func !~ /^extp(read|write)/i) {
|
|
||||||
push @args, "0";
|
|
||||||
}
|
|
||||||
if($_32bit eq "big-endian") {
|
|
||||||
push @args, "uintptr($name>>32)", "uintptr($name)";
|
|
||||||
} elsif($_32bit eq "little-endian") {
|
|
||||||
push @args, "uintptr($name)", "uintptr($name>>32)";
|
|
||||||
} else {
|
|
||||||
push @args, "uintptr($name)";
|
|
||||||
}
|
|
||||||
} elsif($type eq "int64" && $_32bit ne "") {
|
|
||||||
if(@args % 2 && $arm) {
|
|
||||||
# arm abi specifies 64-bit argument uses
|
|
||||||
# (even, odd) pair
|
|
||||||
push @args, "0"
|
|
||||||
}
|
|
||||||
if($_32bit eq "big-endian") {
|
|
||||||
push @args, "uintptr($name>>32)", "uintptr($name)";
|
|
||||||
} else {
|
|
||||||
push @args, "uintptr($name)", "uintptr($name>>32)";
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
push @args, "uintptr($name)";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Determine which form to use; pad args with zeros.
|
|
||||||
my $asm = "Syscall";
|
|
||||||
if ($nonblock) {
|
|
||||||
$asm = "RawSyscall";
|
|
||||||
}
|
|
||||||
if(@args <= 3) {
|
|
||||||
while(@args < 3) {
|
|
||||||
push @args, "0";
|
|
||||||
}
|
|
||||||
} elsif(@args <= 6) {
|
|
||||||
$asm .= "6";
|
|
||||||
while(@args < 6) {
|
|
||||||
push @args, "0";
|
|
||||||
}
|
|
||||||
} elsif(@args <= 9) {
|
|
||||||
$asm .= "9";
|
|
||||||
while(@args < 9) {
|
|
||||||
push @args, "0";
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
print STDERR "$ARGV:$.: too many arguments to system call\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
# System call number.
|
|
||||||
if($sysname eq "") {
|
|
||||||
$sysname = "SYS_$func";
|
|
||||||
$sysname =~ s/([a-z])([A-Z])/${1}_$2/g; # turn FooBar into Foo_Bar
|
|
||||||
$sysname =~ y/a-z/A-Z/;
|
|
||||||
if($nacl) {
|
|
||||||
$sysname =~ y/A-Z/a-z/;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Actual call.
|
|
||||||
my $args = join(', ', @args);
|
|
||||||
my $call = "$asm($sysname, $args)";
|
|
||||||
|
|
||||||
# Assign return values.
|
|
||||||
my $body = "";
|
|
||||||
my @ret = ("_", "_", "_");
|
|
||||||
my $do_errno = 0;
|
|
||||||
for(my $i=0; $i<@out; $i++) {
|
|
||||||
my $p = $out[$i];
|
|
||||||
my ($name, $type) = parseparam($p);
|
|
||||||
my $reg = "";
|
|
||||||
if($name eq "err" && !$plan9) {
|
|
||||||
$reg = "e1";
|
|
||||||
$ret[2] = $reg;
|
|
||||||
$do_errno = 1;
|
|
||||||
} elsif($name eq "err" && $plan9) {
|
|
||||||
$ret[0] = "r0";
|
|
||||||
$ret[2] = "e1";
|
|
||||||
next;
|
|
||||||
} else {
|
|
||||||
$reg = sprintf("r%d", $i);
|
|
||||||
$ret[$i] = $reg;
|
|
||||||
}
|
|
||||||
if($type eq "bool") {
|
|
||||||
$reg = "$reg != 0";
|
|
||||||
}
|
|
||||||
if($type eq "int64" && $_32bit ne "") {
|
|
||||||
# 64-bit number in r1:r0 or r0:r1.
|
|
||||||
if($i+2 > @out) {
|
|
||||||
print STDERR "$ARGV:$.: not enough registers for int64 return\n";
|
|
||||||
}
|
|
||||||
if($_32bit eq "big-endian") {
|
|
||||||
$reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i, $i+1);
|
|
||||||
} else {
|
|
||||||
$reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i+1, $i);
|
|
||||||
}
|
|
||||||
$ret[$i] = sprintf("r%d", $i);
|
|
||||||
$ret[$i+1] = sprintf("r%d", $i+1);
|
|
||||||
}
|
|
||||||
if($reg ne "e1" || $plan9) {
|
|
||||||
$body .= "\t$name = $type($reg)\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ($ret[0] eq "_" && $ret[1] eq "_" && $ret[2] eq "_") {
|
|
||||||
$text .= "\t$call\n";
|
|
||||||
} else {
|
|
||||||
$text .= "\t$ret[0], $ret[1], $ret[2] := $call\n";
|
|
||||||
}
|
|
||||||
foreach my $use (@uses) {
|
|
||||||
$text .= "\t$use\n";
|
|
||||||
}
|
|
||||||
$text .= $body;
|
|
||||||
|
|
||||||
if ($plan9 && $ret[2] eq "e1") {
|
|
||||||
$text .= "\tif int32(r0) == -1 {\n";
|
|
||||||
$text .= "\t\terr = e1\n";
|
|
||||||
$text .= "\t}\n";
|
|
||||||
} elsif ($do_errno) {
|
|
||||||
$text .= "\tif e1 != 0 {\n";
|
|
||||||
$text .= "\t\terr = e1\n";
|
|
||||||
$text .= "\t}\n";
|
|
||||||
}
|
|
||||||
$text .= "\treturn\n";
|
|
||||||
$text .= "}\n\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
chomp $text;
|
|
||||||
chomp $text;
|
|
||||||
|
|
||||||
if($errors) {
|
|
||||||
exit 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
print <<EOF;
|
|
||||||
// $cmdline
|
|
||||||
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
|
||||||
|
|
||||||
package plan9
|
|
||||||
|
|
||||||
import "unsafe"
|
|
||||||
|
|
||||||
$text
|
|
||||||
EOF
|
|
||||||
exit 0;
|
|
@ -1,23 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# 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.
|
|
||||||
|
|
||||||
COMMAND="mksysnum_plan9.sh $@"
|
|
||||||
|
|
||||||
cat <<EOF
|
|
||||||
// $COMMAND
|
|
||||||
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
|
||||||
|
|
||||||
package plan9
|
|
||||||
|
|
||||||
const(
|
|
||||||
EOF
|
|
||||||
|
|
||||||
SP='[ ]' # space or tab
|
|
||||||
sed "s/^#define${SP}\\([A-Z0-9_][A-Z0-9_]*\\)${SP}${SP}*\\([0-9][0-9]*\\)/SYS_\\1=\\2/g" \
|
|
||||||
< $1 | grep -v SYS__
|
|
||||||
|
|
||||||
cat <<EOF
|
|
||||||
)
|
|
||||||
EOF
|
|
@ -1,2 +0,0 @@
|
|||||||
_obj/
|
|
||||||
unix.test
|
|
@ -0,0 +1,17 @@
|
|||||||
|
// 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 !gccgo
|
||||||
|
|
||||||
|
#include "textflag.h"
|
||||||
|
|
||||||
|
//
|
||||||
|
// System calls for ppc64, AIX are implemented in runtime/syscall_aix.go
|
||||||
|
//
|
||||||
|
|
||||||
|
TEXT ·syscall6(SB),NOSPLIT,$0-88
|
||||||
|
JMP syscall·syscall6(SB)
|
||||||
|
|
||||||
|
TEXT ·rawSyscall6(SB),NOSPLIT,$0-88
|
||||||
|
JMP syscall·rawSyscall6(SB)
|
@ -1,30 +1,29 @@
|
|||||||
// Copyright 2009 The Go Authors. All rights reserved.
|
// Copyright 2018 The Go Authors. All rights reserved.
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
// +build !gccgo
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
||||||
//
|
//
|
||||||
// System call support for amd64, Plan 9
|
// System call support for ARM64, FreeBSD
|
||||||
//
|
//
|
||||||
|
|
||||||
// Just jump to package syscall's implementation for all these functions.
|
// Just jump to package syscall's implementation for all these functions.
|
||||||
// The runtime may know about them.
|
// The runtime may know about them.
|
||||||
|
|
||||||
TEXT ·Syscall(SB),NOSPLIT,$0-64
|
TEXT ·Syscall(SB),NOSPLIT,$0-56
|
||||||
JMP syscall·Syscall(SB)
|
JMP syscall·Syscall(SB)
|
||||||
|
|
||||||
TEXT ·Syscall6(SB),NOSPLIT,$0-88
|
TEXT ·Syscall6(SB),NOSPLIT,$0-80
|
||||||
JMP syscall·Syscall6(SB)
|
JMP syscall·Syscall6(SB)
|
||||||
|
|
||||||
|
TEXT ·Syscall9(SB),NOSPLIT,$0-104
|
||||||
|
JMP syscall·Syscall9(SB)
|
||||||
|
|
||||||
TEXT ·RawSyscall(SB),NOSPLIT,$0-56
|
TEXT ·RawSyscall(SB),NOSPLIT,$0-56
|
||||||
JMP syscall·RawSyscall(SB)
|
JMP syscall·RawSyscall(SB)
|
||||||
|
|
||||||
TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
|
TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
|
||||||
JMP syscall·RawSyscall6(SB)
|
JMP syscall·RawSyscall6(SB)
|
||||||
|
|
||||||
TEXT ·seek(SB),NOSPLIT,$0-56
|
|
||||||
JMP syscall·seek(SB)
|
|
||||||
|
|
||||||
TEXT ·exit(SB),NOSPLIT,$8-8
|
|
||||||
JMP syscall·exit(SB)
|
|
@ -0,0 +1,47 @@
|
|||||||
|
// 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 riscv64,!gccgo
|
||||||
|
|
||||||
|
#include "textflag.h"
|
||||||
|
|
||||||
|
//
|
||||||
|
// System calls for linux/riscv64.
|
||||||
|
//
|
||||||
|
// Where available, just jump to package syscall's implementation of
|
||||||
|
// these functions.
|
||||||
|
|
||||||
|
TEXT ·Syscall(SB),NOSPLIT,$0-56
|
||||||
|
JMP syscall·Syscall(SB)
|
||||||
|
|
||||||
|
TEXT ·Syscall6(SB),NOSPLIT,$0-80
|
||||||
|
JMP syscall·Syscall6(SB)
|
||||||
|
|
||||||
|
TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
|
||||||
|
CALL runtime·entersyscall(SB)
|
||||||
|
MOV a1+8(FP), A0
|
||||||
|
MOV a2+16(FP), A1
|
||||||
|
MOV a3+24(FP), A2
|
||||||
|
MOV trap+0(FP), A7 // syscall entry
|
||||||
|
ECALL
|
||||||
|
MOV A0, r1+32(FP) // r1
|
||||||
|
MOV A1, r2+40(FP) // r2
|
||||||
|
CALL runtime·exitsyscall(SB)
|
||||||
|
RET
|
||||||
|
|
||||||
|
TEXT ·RawSyscall(SB),NOSPLIT,$0-56
|
||||||
|
JMP syscall·RawSyscall(SB)
|
||||||
|
|
||||||
|
TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
|
||||||
|
JMP syscall·RawSyscall6(SB)
|
||||||
|
|
||||||
|
TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
|
||||||
|
MOV a1+8(FP), A0
|
||||||
|
MOV a2+16(FP), A1
|
||||||
|
MOV a3+24(FP), A2
|
||||||
|
MOV trap+0(FP), A7 // syscall entry
|
||||||
|
ECALL
|
||||||
|
MOV A0, r1+32(FP)
|
||||||
|
MOV A1, r2+40(FP)
|
||||||
|
RET
|
@ -0,0 +1,29 @@
|
|||||||
|
// 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 !gccgo
|
||||||
|
|
||||||
|
#include "textflag.h"
|
||||||
|
|
||||||
|
//
|
||||||
|
// System call support for ARM64, NetBSD
|
||||||
|
//
|
||||||
|
|
||||||
|
// Just jump to package syscall's implementation for all these functions.
|
||||||
|
// The runtime may know about them.
|
||||||
|
|
||||||
|
TEXT ·Syscall(SB),NOSPLIT,$0-56
|
||||||
|
B syscall·Syscall(SB)
|
||||||
|
|
||||||
|
TEXT ·Syscall6(SB),NOSPLIT,$0-80
|
||||||
|
B syscall·Syscall6(SB)
|
||||||
|
|
||||||
|
TEXT ·Syscall9(SB),NOSPLIT,$0-104
|
||||||
|
B syscall·Syscall9(SB)
|
||||||
|
|
||||||
|
TEXT ·RawSyscall(SB),NOSPLIT,$0-56
|
||||||
|
B syscall·RawSyscall(SB)
|
||||||
|
|
||||||
|
TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
|
||||||
|
B syscall·RawSyscall6(SB)
|
@ -1,25 +1,29 @@
|
|||||||
// Copyright 2009 The Go Authors. All rights reserved.
|
// Copyright 2019 The Go Authors. All rights reserved.
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
// +build !gccgo
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
||||||
// System call support for plan9 on arm
|
//
|
||||||
|
// System call support for arm64, OpenBSD
|
||||||
|
//
|
||||||
|
|
||||||
// Just jump to package syscall's implementation for all these functions.
|
// Just jump to package syscall's implementation for all these functions.
|
||||||
// The runtime may know about them.
|
// The runtime may know about them.
|
||||||
|
|
||||||
TEXT ·Syscall(SB),NOSPLIT,$0-32
|
TEXT ·Syscall(SB),NOSPLIT,$0-56
|
||||||
JMP syscall·Syscall(SB)
|
JMP syscall·Syscall(SB)
|
||||||
|
|
||||||
TEXT ·Syscall6(SB),NOSPLIT,$0-44
|
TEXT ·Syscall6(SB),NOSPLIT,$0-80
|
||||||
JMP syscall·Syscall6(SB)
|
JMP syscall·Syscall6(SB)
|
||||||
|
|
||||||
TEXT ·RawSyscall(SB),NOSPLIT,$0-28
|
TEXT ·Syscall9(SB),NOSPLIT,$0-104
|
||||||
|
JMP syscall·Syscall9(SB)
|
||||||
|
|
||||||
|
TEXT ·RawSyscall(SB),NOSPLIT,$0-56
|
||||||
JMP syscall·RawSyscall(SB)
|
JMP syscall·RawSyscall(SB)
|
||||||
|
|
||||||
TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
|
TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
|
||||||
JMP syscall·RawSyscall6(SB)
|
JMP syscall·RawSyscall6(SB)
|
||||||
|
|
||||||
TEXT ·seek(SB),NOSPLIT,$0-36
|
|
||||||
JMP syscall·exit(SB)
|
|
@ -1,51 +0,0 @@
|
|||||||
FROM ubuntu:16.04
|
|
||||||
|
|
||||||
# Use the most recent ubuntu sources
|
|
||||||
RUN echo 'deb http://en.archive.ubuntu.com/ubuntu/ artful main universe' >> /etc/apt/sources.list
|
|
||||||
|
|
||||||
# Dependencies to get the git sources and go binaries
|
|
||||||
RUN apt-get update && apt-get install -y \
|
|
||||||
curl \
|
|
||||||
git \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
# Get the git sources. If not cached, this takes O(5 minutes).
|
|
||||||
WORKDIR /git
|
|
||||||
RUN git config --global advice.detachedHead false
|
|
||||||
# Linux Kernel: Released 03 Sep 2017
|
|
||||||
RUN git clone --branch v4.13 --depth 1 https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux
|
|
||||||
# GNU C library: Released 02 Aug 2017 (we should try to get a secure way to clone this)
|
|
||||||
RUN git clone --branch glibc-2.26 --depth 1 git://sourceware.org/git/glibc.git
|
|
||||||
|
|
||||||
# Get Go 1.9.2
|
|
||||||
ENV GOLANG_VERSION 1.9.2
|
|
||||||
ENV GOLANG_DOWNLOAD_URL https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz
|
|
||||||
ENV GOLANG_DOWNLOAD_SHA256 de874549d9a8d8d8062be05808509c09a88a248e77ec14eb77453530829ac02b
|
|
||||||
|
|
||||||
RUN curl -fsSL "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz \
|
|
||||||
&& echo "$GOLANG_DOWNLOAD_SHA256 golang.tar.gz" | sha256sum -c - \
|
|
||||||
&& tar -C /usr/local -xzf golang.tar.gz \
|
|
||||||
&& rm golang.tar.gz
|
|
||||||
|
|
||||||
ENV PATH /usr/local/go/bin:$PATH
|
|
||||||
|
|
||||||
# Linux and Glibc build dependencies
|
|
||||||
RUN apt-get update && apt-get install -y \
|
|
||||||
gawk make python \
|
|
||||||
gcc gcc-multilib \
|
|
||||||
gettext texinfo \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
# Emulator and cross compilers
|
|
||||||
RUN apt-get update && apt-get install -y \
|
|
||||||
qemu \
|
|
||||||
gcc-aarch64-linux-gnu gcc-arm-linux-gnueabi \
|
|
||||||
gcc-mips-linux-gnu gcc-mips64-linux-gnuabi64 \
|
|
||||||
gcc-mips64el-linux-gnuabi64 gcc-mipsel-linux-gnu \
|
|
||||||
gcc-powerpc64-linux-gnu gcc-powerpc64le-linux-gnu \
|
|
||||||
gcc-s390x-linux-gnu gcc-sparc64-linux-gnu \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
# Let the scripts know they are in the docker environment
|
|
||||||
ENV GOLANG_SYS_BUILD docker
|
|
||||||
WORKDIR /build
|
|
||||||
ENTRYPOINT ["go", "run", "linux/mkall.go", "/git/linux", "/git/glibc"]
|
|
@ -1,85 +0,0 @@
|
|||||||
#!/usr/bin/env perl
|
|
||||||
# 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.
|
|
||||||
|
|
||||||
use strict;
|
|
||||||
|
|
||||||
if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") {
|
|
||||||
print STDERR "GOARCH or GOOS not defined in environment\n";
|
|
||||||
exit 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Check that we are using the new build system if we should
|
|
||||||
if($ENV{'GOLANG_SYS_BUILD'} ne "docker") {
|
|
||||||
print STDERR "In the new build system, mksysnum should not be called directly.\n";
|
|
||||||
print STDERR "See README.md\n";
|
|
||||||
exit 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
my $command = "$0 ". join(' ', @ARGV);
|
|
||||||
|
|
||||||
print <<EOF;
|
|
||||||
// $command
|
|
||||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
|
||||||
|
|
||||||
// +build $ENV{'GOARCH'},$ENV{'GOOS'}
|
|
||||||
|
|
||||||
package unix
|
|
||||||
|
|
||||||
const(
|
|
||||||
EOF
|
|
||||||
|
|
||||||
my $offset = 0;
|
|
||||||
|
|
||||||
sub fmt {
|
|
||||||
my ($name, $num) = @_;
|
|
||||||
if($num > 999){
|
|
||||||
# ignore deprecated syscalls that are no longer implemented
|
|
||||||
# https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/include/uapi/asm-generic/unistd.h?id=refs/heads/master#n716
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$name =~ y/a-z/A-Z/;
|
|
||||||
$num = $num + $offset;
|
|
||||||
print " SYS_$name = $num;\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
my $prev;
|
|
||||||
open(CC, "$ENV{'CC'} -E -dD @ARGV |") || die "can't run $ENV{'CC'}";
|
|
||||||
while(<CC>){
|
|
||||||
if(/^#define __NR_Linux\s+([0-9]+)/){
|
|
||||||
# mips/mips64: extract offset
|
|
||||||
$offset = $1;
|
|
||||||
}
|
|
||||||
elsif(/^#define __NR(\w*)_SYSCALL_BASE\s+([0-9]+)/){
|
|
||||||
# arm: extract offset
|
|
||||||
$offset = $1;
|
|
||||||
}
|
|
||||||
elsif(/^#define __NR_syscalls\s+/) {
|
|
||||||
# ignore redefinitions of __NR_syscalls
|
|
||||||
}
|
|
||||||
elsif(/^#define __NR_(\w*)Linux_syscalls\s+/) {
|
|
||||||
# mips/mips64: ignore definitions about the number of syscalls
|
|
||||||
}
|
|
||||||
elsif(/^#define __NR_(\w+)\s+([0-9]+)/){
|
|
||||||
$prev = $2;
|
|
||||||
fmt($1, $2);
|
|
||||||
}
|
|
||||||
elsif(/^#define __NR3264_(\w+)\s+([0-9]+)/){
|
|
||||||
$prev = $2;
|
|
||||||
fmt($1, $2);
|
|
||||||
}
|
|
||||||
elsif(/^#define __NR_(\w+)\s+\(\w+\+\s*([0-9]+)\)/){
|
|
||||||
fmt($1, $prev+$2)
|
|
||||||
}
|
|
||||||
elsif(/^#define __NR_(\w+)\s+\(__NR_Linux \+ ([0-9]+)/){
|
|
||||||
fmt($1, $2);
|
|
||||||
}
|
|
||||||
elsif(/^#define __NR_(\w+)\s+\(__NR_SYSCALL_BASE \+ ([0-9]+)/){
|
|
||||||
fmt($1, $2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
print <<EOF;
|
|
||||||
)
|
|
||||||
EOF
|
|
@ -1,341 +0,0 @@
|
|||||||
#!/usr/bin/env perl
|
|
||||||
# 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.
|
|
||||||
|
|
||||||
# This program reads a file containing function prototypes
|
|
||||||
# (like syscall_darwin.go) and generates system call bodies.
|
|
||||||
# The prototypes are marked by lines beginning with "//sys"
|
|
||||||
# and read like func declarations if //sys is replaced by func, but:
|
|
||||||
# * The parameter lists must give a name for each argument.
|
|
||||||
# This includes return parameters.
|
|
||||||
# * The parameter lists must give a type for each argument:
|
|
||||||
# the (x, y, z int) shorthand is not allowed.
|
|
||||||
# * If the return parameter is an error number, it must be named errno.
|
|
||||||
|
|
||||||
# A line beginning with //sysnb is like //sys, except that the
|
|
||||||
# goroutine will not be suspended during the execution of the system
|
|
||||||
# call. This must only be used for system calls which can never
|
|
||||||
# block, as otherwise the system call could cause all goroutines to
|
|
||||||
# hang.
|
|
||||||
|
|
||||||
use strict;
|
|
||||||
|
|
||||||
my $cmdline = "mksyscall.pl " . join(' ', @ARGV);
|
|
||||||
my $errors = 0;
|
|
||||||
my $_32bit = "";
|
|
||||||
my $plan9 = 0;
|
|
||||||
my $openbsd = 0;
|
|
||||||
my $netbsd = 0;
|
|
||||||
my $dragonfly = 0;
|
|
||||||
my $arm = 0; # 64-bit value should use (even, odd)-pair
|
|
||||||
my $tags = ""; # build tags
|
|
||||||
|
|
||||||
if($ARGV[0] eq "-b32") {
|
|
||||||
$_32bit = "big-endian";
|
|
||||||
shift;
|
|
||||||
} elsif($ARGV[0] eq "-l32") {
|
|
||||||
$_32bit = "little-endian";
|
|
||||||
shift;
|
|
||||||
}
|
|
||||||
if($ARGV[0] eq "-plan9") {
|
|
||||||
$plan9 = 1;
|
|
||||||
shift;
|
|
||||||
}
|
|
||||||
if($ARGV[0] eq "-openbsd") {
|
|
||||||
$openbsd = 1;
|
|
||||||
shift;
|
|
||||||
}
|
|
||||||
if($ARGV[0] eq "-netbsd") {
|
|
||||||
$netbsd = 1;
|
|
||||||
shift;
|
|
||||||
}
|
|
||||||
if($ARGV[0] eq "-dragonfly") {
|
|
||||||
$dragonfly = 1;
|
|
||||||
shift;
|
|
||||||
}
|
|
||||||
if($ARGV[0] eq "-arm") {
|
|
||||||
$arm = 1;
|
|
||||||
shift;
|
|
||||||
}
|
|
||||||
if($ARGV[0] eq "-tags") {
|
|
||||||
shift;
|
|
||||||
$tags = $ARGV[0];
|
|
||||||
shift;
|
|
||||||
}
|
|
||||||
|
|
||||||
if($ARGV[0] =~ /^-/) {
|
|
||||||
print STDERR "usage: mksyscall.pl [-b32 | -l32] [-tags x,y] [file ...]\n";
|
|
||||||
exit 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Check that we are using the new build system if we should
|
|
||||||
if($ENV{'GOOS'} eq "linux" && $ENV{'GOARCH'} ne "sparc64") {
|
|
||||||
if($ENV{'GOLANG_SYS_BUILD'} ne "docker") {
|
|
||||||
print STDERR "In the new build system, mksyscall should not be called directly.\n";
|
|
||||||
print STDERR "See README.md\n";
|
|
||||||
exit 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
sub parseparamlist($) {
|
|
||||||
my ($list) = @_;
|
|
||||||
$list =~ s/^\s*//;
|
|
||||||
$list =~ s/\s*$//;
|
|
||||||
if($list eq "") {
|
|
||||||
return ();
|
|
||||||
}
|
|
||||||
return split(/\s*,\s*/, $list);
|
|
||||||
}
|
|
||||||
|
|
||||||
sub parseparam($) {
|
|
||||||
my ($p) = @_;
|
|
||||||
if($p !~ /^(\S*) (\S*)$/) {
|
|
||||||
print STDERR "$ARGV:$.: malformed parameter: $p\n";
|
|
||||||
$errors = 1;
|
|
||||||
return ("xx", "int");
|
|
||||||
}
|
|
||||||
return ($1, $2);
|
|
||||||
}
|
|
||||||
|
|
||||||
my $text = "";
|
|
||||||
while(<>) {
|
|
||||||
chomp;
|
|
||||||
s/\s+/ /g;
|
|
||||||
s/^\s+//;
|
|
||||||
s/\s+$//;
|
|
||||||
my $nonblock = /^\/\/sysnb /;
|
|
||||||
next if !/^\/\/sys / && !$nonblock;
|
|
||||||
|
|
||||||
# Line must be of the form
|
|
||||||
# func Open(path string, mode int, perm int) (fd int, errno error)
|
|
||||||
# Split into name, in params, out params.
|
|
||||||
if(!/^\/\/sys(nb)? (\w+)\(([^()]*)\)\s*(?:\(([^()]+)\))?\s*(?:=\s*((?i)SYS_[A-Z0-9_]+))?$/) {
|
|
||||||
print STDERR "$ARGV:$.: malformed //sys declaration\n";
|
|
||||||
$errors = 1;
|
|
||||||
next;
|
|
||||||
}
|
|
||||||
my ($func, $in, $out, $sysname) = ($2, $3, $4, $5);
|
|
||||||
|
|
||||||
# Split argument lists on comma.
|
|
||||||
my @in = parseparamlist($in);
|
|
||||||
my @out = parseparamlist($out);
|
|
||||||
|
|
||||||
# Try in vain to keep people from editing this file.
|
|
||||||
# The theory is that they jump into the middle of the file
|
|
||||||
# without reading the header.
|
|
||||||
$text .= "// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\n";
|
|
||||||
|
|
||||||
# Go function header.
|
|
||||||
my $out_decl = @out ? sprintf(" (%s)", join(', ', @out)) : "";
|
|
||||||
$text .= sprintf "func %s(%s)%s {\n", $func, join(', ', @in), $out_decl;
|
|
||||||
|
|
||||||
# Check if err return available
|
|
||||||
my $errvar = "";
|
|
||||||
foreach my $p (@out) {
|
|
||||||
my ($name, $type) = parseparam($p);
|
|
||||||
if($type eq "error") {
|
|
||||||
$errvar = $name;
|
|
||||||
last;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Prepare arguments to Syscall.
|
|
||||||
my @args = ();
|
|
||||||
my $n = 0;
|
|
||||||
foreach my $p (@in) {
|
|
||||||
my ($name, $type) = parseparam($p);
|
|
||||||
if($type =~ /^\*/) {
|
|
||||||
push @args, "uintptr(unsafe.Pointer($name))";
|
|
||||||
} elsif($type eq "string" && $errvar ne "") {
|
|
||||||
$text .= "\tvar _p$n *byte\n";
|
|
||||||
$text .= "\t_p$n, $errvar = BytePtrFromString($name)\n";
|
|
||||||
$text .= "\tif $errvar != nil {\n\t\treturn\n\t}\n";
|
|
||||||
push @args, "uintptr(unsafe.Pointer(_p$n))";
|
|
||||||
$n++;
|
|
||||||
} elsif($type eq "string") {
|
|
||||||
print STDERR "$ARGV:$.: $func uses string arguments, but has no error return\n";
|
|
||||||
$text .= "\tvar _p$n *byte\n";
|
|
||||||
$text .= "\t_p$n, _ = BytePtrFromString($name)\n";
|
|
||||||
push @args, "uintptr(unsafe.Pointer(_p$n))";
|
|
||||||
$n++;
|
|
||||||
} elsif($type =~ /^\[\](.*)/) {
|
|
||||||
# Convert slice into pointer, length.
|
|
||||||
# Have to be careful not to take address of &a[0] if len == 0:
|
|
||||||
# pass dummy pointer in that case.
|
|
||||||
# Used to pass nil, but some OSes or simulators reject write(fd, nil, 0).
|
|
||||||
$text .= "\tvar _p$n unsafe.Pointer\n";
|
|
||||||
$text .= "\tif len($name) > 0 {\n\t\t_p$n = unsafe.Pointer(\&${name}[0])\n\t}";
|
|
||||||
$text .= " else {\n\t\t_p$n = unsafe.Pointer(&_zero)\n\t}";
|
|
||||||
$text .= "\n";
|
|
||||||
push @args, "uintptr(_p$n)", "uintptr(len($name))";
|
|
||||||
$n++;
|
|
||||||
} elsif($type eq "int64" && ($openbsd || $netbsd)) {
|
|
||||||
push @args, "0";
|
|
||||||
if($_32bit eq "big-endian") {
|
|
||||||
push @args, "uintptr($name>>32)", "uintptr($name)";
|
|
||||||
} elsif($_32bit eq "little-endian") {
|
|
||||||
push @args, "uintptr($name)", "uintptr($name>>32)";
|
|
||||||
} else {
|
|
||||||
push @args, "uintptr($name)";
|
|
||||||
}
|
|
||||||
} elsif($type eq "int64" && $dragonfly) {
|
|
||||||
if ($func !~ /^extp(read|write)/i) {
|
|
||||||
push @args, "0";
|
|
||||||
}
|
|
||||||
if($_32bit eq "big-endian") {
|
|
||||||
push @args, "uintptr($name>>32)", "uintptr($name)";
|
|
||||||
} elsif($_32bit eq "little-endian") {
|
|
||||||
push @args, "uintptr($name)", "uintptr($name>>32)";
|
|
||||||
} else {
|
|
||||||
push @args, "uintptr($name)";
|
|
||||||
}
|
|
||||||
} elsif($type eq "int64" && $_32bit ne "") {
|
|
||||||
if(@args % 2 && $arm) {
|
|
||||||
# arm abi specifies 64-bit argument uses
|
|
||||||
# (even, odd) pair
|
|
||||||
push @args, "0"
|
|
||||||
}
|
|
||||||
if($_32bit eq "big-endian") {
|
|
||||||
push @args, "uintptr($name>>32)", "uintptr($name)";
|
|
||||||
} else {
|
|
||||||
push @args, "uintptr($name)", "uintptr($name>>32)";
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
push @args, "uintptr($name)";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Determine which form to use; pad args with zeros.
|
|
||||||
my $asm = "Syscall";
|
|
||||||
if ($nonblock) {
|
|
||||||
if ($errvar eq "" && $ENV{'GOOS'} eq "linux") {
|
|
||||||
$asm = "RawSyscallNoError";
|
|
||||||
} else {
|
|
||||||
$asm = "RawSyscall";
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if ($errvar eq "" && $ENV{'GOOS'} eq "linux") {
|
|
||||||
$asm = "SyscallNoError";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(@args <= 3) {
|
|
||||||
while(@args < 3) {
|
|
||||||
push @args, "0";
|
|
||||||
}
|
|
||||||
} elsif(@args <= 6) {
|
|
||||||
$asm .= "6";
|
|
||||||
while(@args < 6) {
|
|
||||||
push @args, "0";
|
|
||||||
}
|
|
||||||
} elsif(@args <= 9) {
|
|
||||||
$asm .= "9";
|
|
||||||
while(@args < 9) {
|
|
||||||
push @args, "0";
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
print STDERR "$ARGV:$.: too many arguments to system call\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
# System call number.
|
|
||||||
if($sysname eq "") {
|
|
||||||
$sysname = "SYS_$func";
|
|
||||||
$sysname =~ s/([a-z])([A-Z])/${1}_$2/g; # turn FooBar into Foo_Bar
|
|
||||||
$sysname =~ y/a-z/A-Z/;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Actual call.
|
|
||||||
my $args = join(', ', @args);
|
|
||||||
my $call = "$asm($sysname, $args)";
|
|
||||||
|
|
||||||
# Assign return values.
|
|
||||||
my $body = "";
|
|
||||||
my @ret = ("_", "_", "_");
|
|
||||||
my $do_errno = 0;
|
|
||||||
for(my $i=0; $i<@out; $i++) {
|
|
||||||
my $p = $out[$i];
|
|
||||||
my ($name, $type) = parseparam($p);
|
|
||||||
my $reg = "";
|
|
||||||
if($name eq "err" && !$plan9) {
|
|
||||||
$reg = "e1";
|
|
||||||
$ret[2] = $reg;
|
|
||||||
$do_errno = 1;
|
|
||||||
} elsif($name eq "err" && $plan9) {
|
|
||||||
$ret[0] = "r0";
|
|
||||||
$ret[2] = "e1";
|
|
||||||
next;
|
|
||||||
} else {
|
|
||||||
$reg = sprintf("r%d", $i);
|
|
||||||
$ret[$i] = $reg;
|
|
||||||
}
|
|
||||||
if($type eq "bool") {
|
|
||||||
$reg = "$reg != 0";
|
|
||||||
}
|
|
||||||
if($type eq "int64" && $_32bit ne "") {
|
|
||||||
# 64-bit number in r1:r0 or r0:r1.
|
|
||||||
if($i+2 > @out) {
|
|
||||||
print STDERR "$ARGV:$.: not enough registers for int64 return\n";
|
|
||||||
}
|
|
||||||
if($_32bit eq "big-endian") {
|
|
||||||
$reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i, $i+1);
|
|
||||||
} else {
|
|
||||||
$reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i+1, $i);
|
|
||||||
}
|
|
||||||
$ret[$i] = sprintf("r%d", $i);
|
|
||||||
$ret[$i+1] = sprintf("r%d", $i+1);
|
|
||||||
}
|
|
||||||
if($reg ne "e1" || $plan9) {
|
|
||||||
$body .= "\t$name = $type($reg)\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ($ret[0] eq "_" && $ret[1] eq "_" && $ret[2] eq "_") {
|
|
||||||
$text .= "\t$call\n";
|
|
||||||
} else {
|
|
||||||
if ($errvar eq "" && $ENV{'GOOS'} eq "linux") {
|
|
||||||
# raw syscall without error on Linux, see golang.org/issue/22924
|
|
||||||
$text .= "\t$ret[0], $ret[1] := $call\n";
|
|
||||||
} else {
|
|
||||||
$text .= "\t$ret[0], $ret[1], $ret[2] := $call\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$text .= $body;
|
|
||||||
|
|
||||||
if ($plan9 && $ret[2] eq "e1") {
|
|
||||||
$text .= "\tif int32(r0) == -1 {\n";
|
|
||||||
$text .= "\t\terr = e1\n";
|
|
||||||
$text .= "\t}\n";
|
|
||||||
} elsif ($do_errno) {
|
|
||||||
$text .= "\tif e1 != 0 {\n";
|
|
||||||
$text .= "\t\terr = errnoErr(e1)\n";
|
|
||||||
$text .= "\t}\n";
|
|
||||||
}
|
|
||||||
$text .= "\treturn\n";
|
|
||||||
$text .= "}\n\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
chomp $text;
|
|
||||||
chomp $text;
|
|
||||||
|
|
||||||
if($errors) {
|
|
||||||
exit 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
print <<EOF;
|
|
||||||
// $cmdline
|
|
||||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
|
||||||
|
|
||||||
// +build $tags
|
|
||||||
|
|
||||||
package unix
|
|
||||||
|
|
||||||
import (
|
|
||||||
"syscall"
|
|
||||||
"unsafe"
|
|
||||||
)
|
|
||||||
|
|
||||||
var _ syscall.Errno
|
|
||||||
|
|
||||||
$text
|
|
||||||
EOF
|
|
||||||
exit 0;
|
|
@ -1,289 +0,0 @@
|
|||||||
#!/usr/bin/env perl
|
|
||||||
# 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.
|
|
||||||
|
|
||||||
# This program reads a file containing function prototypes
|
|
||||||
# (like syscall_solaris.go) and generates system call bodies.
|
|
||||||
# The prototypes are marked by lines beginning with "//sys"
|
|
||||||
# and read like func declarations if //sys is replaced by func, but:
|
|
||||||
# * The parameter lists must give a name for each argument.
|
|
||||||
# This includes return parameters.
|
|
||||||
# * The parameter lists must give a type for each argument:
|
|
||||||
# the (x, y, z int) shorthand is not allowed.
|
|
||||||
# * If the return parameter is an error number, it must be named err.
|
|
||||||
# * If go func name needs to be different than its libc name,
|
|
||||||
# * or the function is not in libc, name could be specified
|
|
||||||
# * at the end, after "=" sign, like
|
|
||||||
# //sys getsockopt(s int, level int, name int, val uintptr, vallen *_Socklen) (err error) = libsocket.getsockopt
|
|
||||||
|
|
||||||
use strict;
|
|
||||||
|
|
||||||
my $cmdline = "mksyscall_solaris.pl " . join(' ', @ARGV);
|
|
||||||
my $errors = 0;
|
|
||||||
my $_32bit = "";
|
|
||||||
my $tags = ""; # build tags
|
|
||||||
|
|
||||||
binmode STDOUT;
|
|
||||||
|
|
||||||
if($ARGV[0] eq "-b32") {
|
|
||||||
$_32bit = "big-endian";
|
|
||||||
shift;
|
|
||||||
} elsif($ARGV[0] eq "-l32") {
|
|
||||||
$_32bit = "little-endian";
|
|
||||||
shift;
|
|
||||||
}
|
|
||||||
if($ARGV[0] eq "-tags") {
|
|
||||||
shift;
|
|
||||||
$tags = $ARGV[0];
|
|
||||||
shift;
|
|
||||||
}
|
|
||||||
|
|
||||||
if($ARGV[0] =~ /^-/) {
|
|
||||||
print STDERR "usage: mksyscall_solaris.pl [-b32 | -l32] [-tags x,y] [file ...]\n";
|
|
||||||
exit 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub parseparamlist($) {
|
|
||||||
my ($list) = @_;
|
|
||||||
$list =~ s/^\s*//;
|
|
||||||
$list =~ s/\s*$//;
|
|
||||||
if($list eq "") {
|
|
||||||
return ();
|
|
||||||
}
|
|
||||||
return split(/\s*,\s*/, $list);
|
|
||||||
}
|
|
||||||
|
|
||||||
sub parseparam($) {
|
|
||||||
my ($p) = @_;
|
|
||||||
if($p !~ /^(\S*) (\S*)$/) {
|
|
||||||
print STDERR "$ARGV:$.: malformed parameter: $p\n";
|
|
||||||
$errors = 1;
|
|
||||||
return ("xx", "int");
|
|
||||||
}
|
|
||||||
return ($1, $2);
|
|
||||||
}
|
|
||||||
|
|
||||||
my $package = "";
|
|
||||||
my $text = "";
|
|
||||||
my $dynimports = "";
|
|
||||||
my $linknames = "";
|
|
||||||
my @vars = ();
|
|
||||||
while(<>) {
|
|
||||||
chomp;
|
|
||||||
s/\s+/ /g;
|
|
||||||
s/^\s+//;
|
|
||||||
s/\s+$//;
|
|
||||||
$package = $1 if !$package && /^package (\S+)$/;
|
|
||||||
my $nonblock = /^\/\/sysnb /;
|
|
||||||
next if !/^\/\/sys / && !$nonblock;
|
|
||||||
|
|
||||||
# Line must be of the form
|
|
||||||
# func Open(path string, mode int, perm int) (fd int, err error)
|
|
||||||
# Split into name, in params, out params.
|
|
||||||
if(!/^\/\/sys(nb)? (\w+)\(([^()]*)\)\s*(?:\(([^()]+)\))?\s*(?:=\s*(?:(\w*)\.)?(\w*))?$/) {
|
|
||||||
print STDERR "$ARGV:$.: malformed //sys declaration\n";
|
|
||||||
$errors = 1;
|
|
||||||
next;
|
|
||||||
}
|
|
||||||
my ($nb, $func, $in, $out, $modname, $sysname) = ($1, $2, $3, $4, $5, $6);
|
|
||||||
|
|
||||||
# Split argument lists on comma.
|
|
||||||
my @in = parseparamlist($in);
|
|
||||||
my @out = parseparamlist($out);
|
|
||||||
|
|
||||||
# So file name.
|
|
||||||
if($modname eq "") {
|
|
||||||
$modname = "libc";
|
|
||||||
}
|
|
||||||
|
|
||||||
# System call name.
|
|
||||||
if($sysname eq "") {
|
|
||||||
$sysname = "$func";
|
|
||||||
}
|
|
||||||
|
|
||||||
# System call pointer variable name.
|
|
||||||
my $sysvarname = "proc$sysname";
|
|
||||||
|
|
||||||
my $strconvfunc = "BytePtrFromString";
|
|
||||||
my $strconvtype = "*byte";
|
|
||||||
|
|
||||||
$sysname =~ y/A-Z/a-z/; # All libc functions are lowercase.
|
|
||||||
|
|
||||||
# Runtime import of function to allow cross-platform builds.
|
|
||||||
$dynimports .= "//go:cgo_import_dynamic libc_${sysname} ${sysname} \"$modname.so\"\n";
|
|
||||||
# Link symbol to proc address variable.
|
|
||||||
$linknames .= "//go:linkname ${sysvarname} libc_${sysname}\n";
|
|
||||||
# Library proc address variable.
|
|
||||||
push @vars, $sysvarname;
|
|
||||||
|
|
||||||
# Go function header.
|
|
||||||
$out = join(', ', @out);
|
|
||||||
if($out ne "") {
|
|
||||||
$out = " ($out)";
|
|
||||||
}
|
|
||||||
if($text ne "") {
|
|
||||||
$text .= "\n"
|
|
||||||
}
|
|
||||||
$text .= sprintf "func %s(%s)%s {\n", $func, join(', ', @in), $out;
|
|
||||||
|
|
||||||
# Check if err return available
|
|
||||||
my $errvar = "";
|
|
||||||
foreach my $p (@out) {
|
|
||||||
my ($name, $type) = parseparam($p);
|
|
||||||
if($type eq "error") {
|
|
||||||
$errvar = $name;
|
|
||||||
last;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Prepare arguments to Syscall.
|
|
||||||
my @args = ();
|
|
||||||
my $n = 0;
|
|
||||||
foreach my $p (@in) {
|
|
||||||
my ($name, $type) = parseparam($p);
|
|
||||||
if($type =~ /^\*/) {
|
|
||||||
push @args, "uintptr(unsafe.Pointer($name))";
|
|
||||||
} elsif($type eq "string" && $errvar ne "") {
|
|
||||||
$text .= "\tvar _p$n $strconvtype\n";
|
|
||||||
$text .= "\t_p$n, $errvar = $strconvfunc($name)\n";
|
|
||||||
$text .= "\tif $errvar != nil {\n\t\treturn\n\t}\n";
|
|
||||||
push @args, "uintptr(unsafe.Pointer(_p$n))";
|
|
||||||
$n++;
|
|
||||||
} elsif($type eq "string") {
|
|
||||||
print STDERR "$ARGV:$.: $func uses string arguments, but has no error return\n";
|
|
||||||
$text .= "\tvar _p$n $strconvtype\n";
|
|
||||||
$text .= "\t_p$n, _ = $strconvfunc($name)\n";
|
|
||||||
push @args, "uintptr(unsafe.Pointer(_p$n))";
|
|
||||||
$n++;
|
|
||||||
} elsif($type =~ /^\[\](.*)/) {
|
|
||||||
# Convert slice into pointer, length.
|
|
||||||
# Have to be careful not to take address of &a[0] if len == 0:
|
|
||||||
# pass nil in that case.
|
|
||||||
$text .= "\tvar _p$n *$1\n";
|
|
||||||
$text .= "\tif len($name) > 0 {\n\t\t_p$n = \&$name\[0]\n\t}\n";
|
|
||||||
push @args, "uintptr(unsafe.Pointer(_p$n))", "uintptr(len($name))";
|
|
||||||
$n++;
|
|
||||||
} elsif($type eq "int64" && $_32bit ne "") {
|
|
||||||
if($_32bit eq "big-endian") {
|
|
||||||
push @args, "uintptr($name >> 32)", "uintptr($name)";
|
|
||||||
} else {
|
|
||||||
push @args, "uintptr($name)", "uintptr($name >> 32)";
|
|
||||||
}
|
|
||||||
} elsif($type eq "bool") {
|
|
||||||
$text .= "\tvar _p$n uint32\n";
|
|
||||||
$text .= "\tif $name {\n\t\t_p$n = 1\n\t} else {\n\t\t_p$n = 0\n\t}\n";
|
|
||||||
push @args, "uintptr(_p$n)";
|
|
||||||
$n++;
|
|
||||||
} else {
|
|
||||||
push @args, "uintptr($name)";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
my $nargs = @args;
|
|
||||||
|
|
||||||
# Determine which form to use; pad args with zeros.
|
|
||||||
my $asm = "sysvicall6";
|
|
||||||
if ($nonblock) {
|
|
||||||
$asm = "rawSysvicall6";
|
|
||||||
}
|
|
||||||
if(@args <= 6) {
|
|
||||||
while(@args < 6) {
|
|
||||||
push @args, "0";
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
print STDERR "$ARGV:$.: too many arguments to system call\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
# Actual call.
|
|
||||||
my $args = join(', ', @args);
|
|
||||||
my $call = "$asm(uintptr(unsafe.Pointer(&$sysvarname)), $nargs, $args)";
|
|
||||||
|
|
||||||
# Assign return values.
|
|
||||||
my $body = "";
|
|
||||||
my $failexpr = "";
|
|
||||||
my @ret = ("_", "_", "_");
|
|
||||||
my @pout= ();
|
|
||||||
my $do_errno = 0;
|
|
||||||
for(my $i=0; $i<@out; $i++) {
|
|
||||||
my $p = $out[$i];
|
|
||||||
my ($name, $type) = parseparam($p);
|
|
||||||
my $reg = "";
|
|
||||||
if($name eq "err") {
|
|
||||||
$reg = "e1";
|
|
||||||
$ret[2] = $reg;
|
|
||||||
$do_errno = 1;
|
|
||||||
} else {
|
|
||||||
$reg = sprintf("r%d", $i);
|
|
||||||
$ret[$i] = $reg;
|
|
||||||
}
|
|
||||||
if($type eq "bool") {
|
|
||||||
$reg = "$reg != 0";
|
|
||||||
}
|
|
||||||
if($type eq "int64" && $_32bit ne "") {
|
|
||||||
# 64-bit number in r1:r0 or r0:r1.
|
|
||||||
if($i+2 > @out) {
|
|
||||||
print STDERR "$ARGV:$.: not enough registers for int64 return\n";
|
|
||||||
}
|
|
||||||
if($_32bit eq "big-endian") {
|
|
||||||
$reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i, $i+1);
|
|
||||||
} else {
|
|
||||||
$reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i+1, $i);
|
|
||||||
}
|
|
||||||
$ret[$i] = sprintf("r%d", $i);
|
|
||||||
$ret[$i+1] = sprintf("r%d", $i+1);
|
|
||||||
}
|
|
||||||
if($reg ne "e1") {
|
|
||||||
$body .= "\t$name = $type($reg)\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ($ret[0] eq "_" && $ret[1] eq "_" && $ret[2] eq "_") {
|
|
||||||
$text .= "\t$call\n";
|
|
||||||
} else {
|
|
||||||
$text .= "\t$ret[0], $ret[1], $ret[2] := $call\n";
|
|
||||||
}
|
|
||||||
$text .= $body;
|
|
||||||
|
|
||||||
if ($do_errno) {
|
|
||||||
$text .= "\tif e1 != 0 {\n";
|
|
||||||
$text .= "\t\terr = e1\n";
|
|
||||||
$text .= "\t}\n";
|
|
||||||
}
|
|
||||||
$text .= "\treturn\n";
|
|
||||||
$text .= "}\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
if($errors) {
|
|
||||||
exit 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
print <<EOF;
|
|
||||||
// $cmdline
|
|
||||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
|
||||||
|
|
||||||
// +build $tags
|
|
||||||
|
|
||||||
package $package
|
|
||||||
|
|
||||||
import (
|
|
||||||
"syscall"
|
|
||||||
"unsafe"
|
|
||||||
)
|
|
||||||
EOF
|
|
||||||
|
|
||||||
print "import \"golang.org/x/sys/unix\"\n" if $package ne "unix";
|
|
||||||
|
|
||||||
my $vardecls = "\t" . join(",\n\t", @vars);
|
|
||||||
$vardecls .= " syscallFunc";
|
|
||||||
|
|
||||||
chomp($_=<<EOF);
|
|
||||||
|
|
||||||
$dynimports
|
|
||||||
$linknames
|
|
||||||
var (
|
|
||||||
$vardecls
|
|
||||||
)
|
|
||||||
|
|
||||||
$text
|
|
||||||
EOF
|
|
||||||
print $_;
|
|
||||||
exit 0;
|
|
@ -1,264 +0,0 @@
|
|||||||
#!/usr/bin/env perl
|
|
||||||
|
|
||||||
# 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.
|
|
||||||
|
|
||||||
#
|
|
||||||
# Parse the header files for OpenBSD and generate a Go usable sysctl MIB.
|
|
||||||
#
|
|
||||||
# Build a MIB with each entry being an array containing the level, type and
|
|
||||||
# a hash that will contain additional entries if the current entry is a node.
|
|
||||||
# We then walk this MIB and create a flattened sysctl name to OID hash.
|
|
||||||
#
|
|
||||||
|
|
||||||
use strict;
|
|
||||||
|
|
||||||
if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") {
|
|
||||||
print STDERR "GOARCH or GOOS not defined in environment\n";
|
|
||||||
exit 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
my $debug = 0;
|
|
||||||
my %ctls = ();
|
|
||||||
|
|
||||||
my @headers = qw (
|
|
||||||
sys/sysctl.h
|
|
||||||
sys/socket.h
|
|
||||||
sys/tty.h
|
|
||||||
sys/malloc.h
|
|
||||||
sys/mount.h
|
|
||||||
sys/namei.h
|
|
||||||
sys/sem.h
|
|
||||||
sys/shm.h
|
|
||||||
sys/vmmeter.h
|
|
||||||
uvm/uvm_param.h
|
|
||||||
uvm/uvm_swap_encrypt.h
|
|
||||||
ddb/db_var.h
|
|
||||||
net/if.h
|
|
||||||
net/if_pfsync.h
|
|
||||||
net/pipex.h
|
|
||||||
netinet/in.h
|
|
||||||
netinet/icmp_var.h
|
|
||||||
netinet/igmp_var.h
|
|
||||||
netinet/ip_ah.h
|
|
||||||
netinet/ip_carp.h
|
|
||||||
netinet/ip_divert.h
|
|
||||||
netinet/ip_esp.h
|
|
||||||
netinet/ip_ether.h
|
|
||||||
netinet/ip_gre.h
|
|
||||||
netinet/ip_ipcomp.h
|
|
||||||
netinet/ip_ipip.h
|
|
||||||
netinet/pim_var.h
|
|
||||||
netinet/tcp_var.h
|
|
||||||
netinet/udp_var.h
|
|
||||||
netinet6/in6.h
|
|
||||||
netinet6/ip6_divert.h
|
|
||||||
netinet6/pim6_var.h
|
|
||||||
netinet/icmp6.h
|
|
||||||
netmpls/mpls.h
|
|
||||||
);
|
|
||||||
|
|
||||||
my @ctls = qw (
|
|
||||||
kern
|
|
||||||
vm
|
|
||||||
fs
|
|
||||||
net
|
|
||||||
#debug # Special handling required
|
|
||||||
hw
|
|
||||||
#machdep # Arch specific
|
|
||||||
user
|
|
||||||
ddb
|
|
||||||
#vfs # Special handling required
|
|
||||||
fs.posix
|
|
||||||
kern.forkstat
|
|
||||||
kern.intrcnt
|
|
||||||
kern.malloc
|
|
||||||
kern.nchstats
|
|
||||||
kern.seminfo
|
|
||||||
kern.shminfo
|
|
||||||
kern.timecounter
|
|
||||||
kern.tty
|
|
||||||
kern.watchdog
|
|
||||||
net.bpf
|
|
||||||
net.ifq
|
|
||||||
net.inet
|
|
||||||
net.inet.ah
|
|
||||||
net.inet.carp
|
|
||||||
net.inet.divert
|
|
||||||
net.inet.esp
|
|
||||||
net.inet.etherip
|
|
||||||
net.inet.gre
|
|
||||||
net.inet.icmp
|
|
||||||
net.inet.igmp
|
|
||||||
net.inet.ip
|
|
||||||
net.inet.ip.ifq
|
|
||||||
net.inet.ipcomp
|
|
||||||
net.inet.ipip
|
|
||||||
net.inet.mobileip
|
|
||||||
net.inet.pfsync
|
|
||||||
net.inet.pim
|
|
||||||
net.inet.tcp
|
|
||||||
net.inet.udp
|
|
||||||
net.inet6
|
|
||||||
net.inet6.divert
|
|
||||||
net.inet6.ip6
|
|
||||||
net.inet6.icmp6
|
|
||||||
net.inet6.pim6
|
|
||||||
net.inet6.tcp6
|
|
||||||
net.inet6.udp6
|
|
||||||
net.mpls
|
|
||||||
net.mpls.ifq
|
|
||||||
net.key
|
|
||||||
net.pflow
|
|
||||||
net.pfsync
|
|
||||||
net.pipex
|
|
||||||
net.rt
|
|
||||||
vm.swapencrypt
|
|
||||||
#vfsgenctl # Special handling required
|
|
||||||
);
|
|
||||||
|
|
||||||
# Node name "fixups"
|
|
||||||
my %ctl_map = (
|
|
||||||
"ipproto" => "net.inet",
|
|
||||||
"net.inet.ipproto" => "net.inet",
|
|
||||||
"net.inet6.ipv6proto" => "net.inet6",
|
|
||||||
"net.inet6.ipv6" => "net.inet6.ip6",
|
|
||||||
"net.inet.icmpv6" => "net.inet6.icmp6",
|
|
||||||
"net.inet6.divert6" => "net.inet6.divert",
|
|
||||||
"net.inet6.tcp6" => "net.inet.tcp",
|
|
||||||
"net.inet6.udp6" => "net.inet.udp",
|
|
||||||
"mpls" => "net.mpls",
|
|
||||||
"swpenc" => "vm.swapencrypt"
|
|
||||||
);
|
|
||||||
|
|
||||||
# Node mappings
|
|
||||||
my %node_map = (
|
|
||||||
"net.inet.ip.ifq" => "net.ifq",
|
|
||||||
"net.inet.pfsync" => "net.pfsync",
|
|
||||||
"net.mpls.ifq" => "net.ifq"
|
|
||||||
);
|
|
||||||
|
|
||||||
my $ctlname;
|
|
||||||
my %mib = ();
|
|
||||||
my %sysctl = ();
|
|
||||||
my $node;
|
|
||||||
|
|
||||||
sub debug() {
|
|
||||||
print STDERR "$_[0]\n" if $debug;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Walk the MIB and build a sysctl name to OID mapping.
|
|
||||||
sub build_sysctl() {
|
|
||||||
my ($node, $name, $oid) = @_;
|
|
||||||
my %node = %{$node};
|
|
||||||
my @oid = @{$oid};
|
|
||||||
|
|
||||||
foreach my $key (sort keys %node) {
|
|
||||||
my @node = @{$node{$key}};
|
|
||||||
my $nodename = $name.($name ne '' ? '.' : '').$key;
|
|
||||||
my @nodeoid = (@oid, $node[0]);
|
|
||||||
if ($node[1] eq 'CTLTYPE_NODE') {
|
|
||||||
if (exists $node_map{$nodename}) {
|
|
||||||
$node = \%mib;
|
|
||||||
$ctlname = $node_map{$nodename};
|
|
||||||
foreach my $part (split /\./, $ctlname) {
|
|
||||||
$node = \%{@{$$node{$part}}[2]};
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$node = $node[2];
|
|
||||||
}
|
|
||||||
&build_sysctl($node, $nodename, \@nodeoid);
|
|
||||||
} elsif ($node[1] ne '') {
|
|
||||||
$sysctl{$nodename} = \@nodeoid;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach my $ctl (@ctls) {
|
|
||||||
$ctls{$ctl} = $ctl;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Build MIB
|
|
||||||
foreach my $header (@headers) {
|
|
||||||
&debug("Processing $header...");
|
|
||||||
open HEADER, "/usr/include/$header" ||
|
|
||||||
print STDERR "Failed to open $header\n";
|
|
||||||
while (<HEADER>) {
|
|
||||||
if ($_ =~ /^#define\s+(CTL_NAMES)\s+{/ ||
|
|
||||||
$_ =~ /^#define\s+(CTL_(.*)_NAMES)\s+{/ ||
|
|
||||||
$_ =~ /^#define\s+((.*)CTL_NAMES)\s+{/) {
|
|
||||||
if ($1 eq 'CTL_NAMES') {
|
|
||||||
# Top level.
|
|
||||||
$node = \%mib;
|
|
||||||
} else {
|
|
||||||
# Node.
|
|
||||||
my $nodename = lc($2);
|
|
||||||
if ($header =~ /^netinet\//) {
|
|
||||||
$ctlname = "net.inet.$nodename";
|
|
||||||
} elsif ($header =~ /^netinet6\//) {
|
|
||||||
$ctlname = "net.inet6.$nodename";
|
|
||||||
} elsif ($header =~ /^net\//) {
|
|
||||||
$ctlname = "net.$nodename";
|
|
||||||
} else {
|
|
||||||
$ctlname = "$nodename";
|
|
||||||
$ctlname =~ s/^(fs|net|kern)_/$1\./;
|
|
||||||
}
|
|
||||||
if (exists $ctl_map{$ctlname}) {
|
|
||||||
$ctlname = $ctl_map{$ctlname};
|
|
||||||
}
|
|
||||||
if (not exists $ctls{$ctlname}) {
|
|
||||||
&debug("Ignoring $ctlname...");
|
|
||||||
next;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Walk down from the top of the MIB.
|
|
||||||
$node = \%mib;
|
|
||||||
foreach my $part (split /\./, $ctlname) {
|
|
||||||
if (not exists $$node{$part}) {
|
|
||||||
&debug("Missing node $part");
|
|
||||||
$$node{$part} = [ 0, '', {} ];
|
|
||||||
}
|
|
||||||
$node = \%{@{$$node{$part}}[2]};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Populate current node with entries.
|
|
||||||
my $i = -1;
|
|
||||||
while (defined($_) && $_ !~ /^}/) {
|
|
||||||
$_ = <HEADER>;
|
|
||||||
$i++ if $_ =~ /{.*}/;
|
|
||||||
next if $_ !~ /{\s+"(\w+)",\s+(CTLTYPE_[A-Z]+)\s+}/;
|
|
||||||
$$node{$1} = [ $i, $2, {} ];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
close HEADER;
|
|
||||||
}
|
|
||||||
|
|
||||||
&build_sysctl(\%mib, "", []);
|
|
||||||
|
|
||||||
print <<EOF;
|
|
||||||
// mksysctl_openbsd.pl
|
|
||||||
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
|
||||||
|
|
||||||
// +build $ENV{'GOARCH'},$ENV{'GOOS'}
|
|
||||||
|
|
||||||
package unix;
|
|
||||||
|
|
||||||
type mibentry struct {
|
|
||||||
ctlname string
|
|
||||||
ctloid []_C_int
|
|
||||||
}
|
|
||||||
|
|
||||||
var sysctlMib = []mibentry {
|
|
||||||
EOF
|
|
||||||
|
|
||||||
foreach my $name (sort keys %sysctl) {
|
|
||||||
my @oid = @{$sysctl{$name}};
|
|
||||||
print "\t{ \"$name\", []_C_int{ ", join(', ', @oid), " } }, \n";
|
|
||||||
}
|
|
||||||
|
|
||||||
print <<EOF;
|
|
||||||
}
|
|
||||||
EOF
|
|
@ -1,39 +0,0 @@
|
|||||||
#!/usr/bin/env perl
|
|
||||||
# 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.
|
|
||||||
#
|
|
||||||
# Generate system call table for Darwin from sys/syscall.h
|
|
||||||
|
|
||||||
use strict;
|
|
||||||
|
|
||||||
if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") {
|
|
||||||
print STDERR "GOARCH or GOOS not defined in environment\n";
|
|
||||||
exit 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
my $command = "mksysnum_darwin.pl " . join(' ', @ARGV);
|
|
||||||
|
|
||||||
print <<EOF;
|
|
||||||
// $command
|
|
||||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
|
||||||
|
|
||||||
// +build $ENV{'GOARCH'},$ENV{'GOOS'}
|
|
||||||
|
|
||||||
package unix
|
|
||||||
|
|
||||||
const (
|
|
||||||
EOF
|
|
||||||
|
|
||||||
while(<>){
|
|
||||||
if(/^#define\s+SYS_(\w+)\s+([0-9]+)/){
|
|
||||||
my $name = $1;
|
|
||||||
my $num = $2;
|
|
||||||
$name =~ y/a-z/A-Z/;
|
|
||||||
print " SYS_$name = $num;"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
print <<EOF;
|
|
||||||
)
|
|
||||||
EOF
|
|
@ -1,50 +0,0 @@
|
|||||||
#!/usr/bin/env perl
|
|
||||||
# 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.
|
|
||||||
#
|
|
||||||
# Generate system call table for DragonFly from master list
|
|
||||||
# (for example, /usr/src/sys/kern/syscalls.master).
|
|
||||||
|
|
||||||
use strict;
|
|
||||||
|
|
||||||
if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") {
|
|
||||||
print STDERR "GOARCH or GOOS not defined in environment\n";
|
|
||||||
exit 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
my $command = "mksysnum_dragonfly.pl " . join(' ', @ARGV);
|
|
||||||
|
|
||||||
print <<EOF;
|
|
||||||
// $command
|
|
||||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
|
||||||
|
|
||||||
// +build $ENV{'GOARCH'},$ENV{'GOOS'}
|
|
||||||
|
|
||||||
package unix
|
|
||||||
|
|
||||||
const (
|
|
||||||
EOF
|
|
||||||
|
|
||||||
while(<>){
|
|
||||||
if(/^([0-9]+)\s+STD\s+({ \S+\s+(\w+).*)$/){
|
|
||||||
my $num = $1;
|
|
||||||
my $proto = $2;
|
|
||||||
my $name = "SYS_$3";
|
|
||||||
$name =~ y/a-z/A-Z/;
|
|
||||||
|
|
||||||
# There are multiple entries for enosys and nosys, so comment them out.
|
|
||||||
if($name =~ /^SYS_E?NOSYS$/){
|
|
||||||
$name = "// $name";
|
|
||||||
}
|
|
||||||
if($name eq 'SYS_SYS_EXIT'){
|
|
||||||
$name = 'SYS_EXIT';
|
|
||||||
}
|
|
||||||
|
|
||||||
print " $name = $num; // $proto\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
print <<EOF;
|
|
||||||
)
|
|
||||||
EOF
|
|
@ -1,50 +0,0 @@
|
|||||||
#!/usr/bin/env perl
|
|
||||||
# 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.
|
|
||||||
#
|
|
||||||
# Generate system call table for FreeBSD from master list
|
|
||||||
# (for example, /usr/src/sys/kern/syscalls.master).
|
|
||||||
|
|
||||||
use strict;
|
|
||||||
|
|
||||||
if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") {
|
|
||||||
print STDERR "GOARCH or GOOS not defined in environment\n";
|
|
||||||
exit 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
my $command = "mksysnum_freebsd.pl " . join(' ', @ARGV);
|
|
||||||
|
|
||||||
print <<EOF;
|
|
||||||
// $command
|
|
||||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
|
||||||
|
|
||||||
// +build $ENV{'GOARCH'},$ENV{'GOOS'}
|
|
||||||
|
|
||||||
package unix
|
|
||||||
|
|
||||||
const (
|
|
||||||
EOF
|
|
||||||
|
|
||||||
while(<>){
|
|
||||||
if(/^([0-9]+)\s+\S+\s+STD\s+({ \S+\s+(\w+).*)$/){
|
|
||||||
my $num = $1;
|
|
||||||
my $proto = $2;
|
|
||||||
my $name = "SYS_$3";
|
|
||||||
$name =~ y/a-z/A-Z/;
|
|
||||||
|
|
||||||
# There are multiple entries for enosys and nosys, so comment them out.
|
|
||||||
if($name =~ /^SYS_E?NOSYS$/){
|
|
||||||
$name = "// $name";
|
|
||||||
}
|
|
||||||
if($name eq 'SYS_SYS_EXIT'){
|
|
||||||
$name = 'SYS_EXIT';
|
|
||||||
}
|
|
||||||
|
|
||||||
print " $name = $num; // $proto\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
print <<EOF;
|
|
||||||
)
|
|
||||||
EOF
|
|
@ -1,58 +0,0 @@
|
|||||||
#!/usr/bin/env perl
|
|
||||||
# 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.
|
|
||||||
#
|
|
||||||
# Generate system call table for OpenBSD from master list
|
|
||||||
# (for example, /usr/src/sys/kern/syscalls.master).
|
|
||||||
|
|
||||||
use strict;
|
|
||||||
|
|
||||||
if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") {
|
|
||||||
print STDERR "GOARCH or GOOS not defined in environment\n";
|
|
||||||
exit 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
my $command = "mksysnum_netbsd.pl " . join(' ', @ARGV);
|
|
||||||
|
|
||||||
print <<EOF;
|
|
||||||
// $command
|
|
||||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
|
||||||
|
|
||||||
// +build $ENV{'GOARCH'},$ENV{'GOOS'}
|
|
||||||
|
|
||||||
package unix
|
|
||||||
|
|
||||||
const (
|
|
||||||
EOF
|
|
||||||
|
|
||||||
my $line = '';
|
|
||||||
while(<>){
|
|
||||||
if($line =~ /^(.*)\\$/) {
|
|
||||||
# Handle continuation
|
|
||||||
$line = $1;
|
|
||||||
$_ =~ s/^\s+//;
|
|
||||||
$line .= $_;
|
|
||||||
} else {
|
|
||||||
# New line
|
|
||||||
$line = $_;
|
|
||||||
}
|
|
||||||
next if $line =~ /\\$/;
|
|
||||||
if($line =~ /^([0-9]+)\s+((STD)|(NOERR))\s+(RUMP\s+)?({\s+\S+\s*\*?\s*\|(\S+)\|(\S*)\|(\w+).*\s+})(\s+(\S+))?$/) {
|
|
||||||
my $num = $1;
|
|
||||||
my $proto = $6;
|
|
||||||
my $compat = $8;
|
|
||||||
my $name = "$7_$9";
|
|
||||||
|
|
||||||
$name = "$7_$11" if $11 ne '';
|
|
||||||
$name =~ y/a-z/A-Z/;
|
|
||||||
|
|
||||||
if($compat eq '' || $compat eq '13' || $compat eq '30' || $compat eq '50') {
|
|
||||||
print " $name = $num; // $proto\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
print <<EOF;
|
|
||||||
)
|
|
||||||
EOF
|
|
@ -1,50 +0,0 @@
|
|||||||
#!/usr/bin/env perl
|
|
||||||
# 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.
|
|
||||||
#
|
|
||||||
# Generate system call table for OpenBSD from master list
|
|
||||||
# (for example, /usr/src/sys/kern/syscalls.master).
|
|
||||||
|
|
||||||
use strict;
|
|
||||||
|
|
||||||
if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") {
|
|
||||||
print STDERR "GOARCH or GOOS not defined in environment\n";
|
|
||||||
exit 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
my $command = "mksysnum_openbsd.pl " . join(' ', @ARGV);
|
|
||||||
|
|
||||||
print <<EOF;
|
|
||||||
// $command
|
|
||||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
|
||||||
|
|
||||||
// +build $ENV{'GOARCH'},$ENV{'GOOS'}
|
|
||||||
|
|
||||||
package unix
|
|
||||||
|
|
||||||
const (
|
|
||||||
EOF
|
|
||||||
|
|
||||||
while(<>){
|
|
||||||
if(/^([0-9]+)\s+STD\s+(NOLOCK\s+)?({ \S+\s+\*?(\w+).*)$/){
|
|
||||||
my $num = $1;
|
|
||||||
my $proto = $3;
|
|
||||||
my $name = $4;
|
|
||||||
$name =~ y/a-z/A-Z/;
|
|
||||||
|
|
||||||
# There are multiple entries for enosys and nosys, so comment them out.
|
|
||||||
if($name =~ /^SYS_E?NOSYS$/){
|
|
||||||
$name = "// $name";
|
|
||||||
}
|
|
||||||
if($name eq 'SYS_SYS_EXIT'){
|
|
||||||
$name = 'SYS_EXIT';
|
|
||||||
}
|
|
||||||
|
|
||||||
print " $name = $num; // $proto\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
print <<EOF;
|
|
||||||
)
|
|
||||||
EOF
|
|
@ -0,0 +1,12 @@
|
|||||||
|
// go run mkasm_darwin.go 386
|
||||||
|
// Code generated by the command above; DO NOT EDIT.
|
||||||
|
|
||||||
|
// +build go1.13
|
||||||
|
|
||||||
|
#include "textflag.h"
|
||||||
|
TEXT ·libc_fdopendir_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fdopendir(SB)
|
||||||
|
TEXT ·libc_closedir_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_closedir(SB)
|
||||||
|
TEXT ·libc_readdir_r_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_readdir_r(SB)
|
@ -0,0 +1,284 @@
|
|||||||
|
// go run mkasm_darwin.go 386
|
||||||
|
// Code generated by the command above; DO NOT EDIT.
|
||||||
|
|
||||||
|
// +build go1.12
|
||||||
|
|
||||||
|
#include "textflag.h"
|
||||||
|
TEXT ·libc_getgroups_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getgroups(SB)
|
||||||
|
TEXT ·libc_setgroups_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setgroups(SB)
|
||||||
|
TEXT ·libc_wait4_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_wait4(SB)
|
||||||
|
TEXT ·libc_accept_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_accept(SB)
|
||||||
|
TEXT ·libc_bind_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_bind(SB)
|
||||||
|
TEXT ·libc_connect_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_connect(SB)
|
||||||
|
TEXT ·libc_socket_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_socket(SB)
|
||||||
|
TEXT ·libc_getsockopt_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getsockopt(SB)
|
||||||
|
TEXT ·libc_setsockopt_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setsockopt(SB)
|
||||||
|
TEXT ·libc_getpeername_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getpeername(SB)
|
||||||
|
TEXT ·libc_getsockname_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getsockname(SB)
|
||||||
|
TEXT ·libc_shutdown_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_shutdown(SB)
|
||||||
|
TEXT ·libc_socketpair_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_socketpair(SB)
|
||||||
|
TEXT ·libc_recvfrom_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_recvfrom(SB)
|
||||||
|
TEXT ·libc_sendto_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_sendto(SB)
|
||||||
|
TEXT ·libc_recvmsg_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_recvmsg(SB)
|
||||||
|
TEXT ·libc_sendmsg_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_sendmsg(SB)
|
||||||
|
TEXT ·libc_kevent_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_kevent(SB)
|
||||||
|
TEXT ·libc_utimes_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_utimes(SB)
|
||||||
|
TEXT ·libc_futimes_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_futimes(SB)
|
||||||
|
TEXT ·libc_poll_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_poll(SB)
|
||||||
|
TEXT ·libc_madvise_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_madvise(SB)
|
||||||
|
TEXT ·libc_mlock_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mlock(SB)
|
||||||
|
TEXT ·libc_mlockall_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mlockall(SB)
|
||||||
|
TEXT ·libc_mprotect_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mprotect(SB)
|
||||||
|
TEXT ·libc_msync_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_msync(SB)
|
||||||
|
TEXT ·libc_munlock_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_munlock(SB)
|
||||||
|
TEXT ·libc_munlockall_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_munlockall(SB)
|
||||||
|
TEXT ·libc_getattrlist_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getattrlist(SB)
|
||||||
|
TEXT ·libc_pipe_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_pipe(SB)
|
||||||
|
TEXT ·libc_getxattr_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getxattr(SB)
|
||||||
|
TEXT ·libc_fgetxattr_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fgetxattr(SB)
|
||||||
|
TEXT ·libc_setxattr_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setxattr(SB)
|
||||||
|
TEXT ·libc_fsetxattr_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fsetxattr(SB)
|
||||||
|
TEXT ·libc_removexattr_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_removexattr(SB)
|
||||||
|
TEXT ·libc_fremovexattr_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fremovexattr(SB)
|
||||||
|
TEXT ·libc_listxattr_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_listxattr(SB)
|
||||||
|
TEXT ·libc_flistxattr_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_flistxattr(SB)
|
||||||
|
TEXT ·libc_setattrlist_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setattrlist(SB)
|
||||||
|
TEXT ·libc_fcntl_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fcntl(SB)
|
||||||
|
TEXT ·libc_kill_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_kill(SB)
|
||||||
|
TEXT ·libc_ioctl_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_ioctl(SB)
|
||||||
|
TEXT ·libc_sysctl_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_sysctl(SB)
|
||||||
|
TEXT ·libc_sendfile_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_sendfile(SB)
|
||||||
|
TEXT ·libc_access_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_access(SB)
|
||||||
|
TEXT ·libc_adjtime_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_adjtime(SB)
|
||||||
|
TEXT ·libc_chdir_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_chdir(SB)
|
||||||
|
TEXT ·libc_chflags_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_chflags(SB)
|
||||||
|
TEXT ·libc_chmod_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_chmod(SB)
|
||||||
|
TEXT ·libc_chown_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_chown(SB)
|
||||||
|
TEXT ·libc_chroot_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_chroot(SB)
|
||||||
|
TEXT ·libc_clock_gettime_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_clock_gettime(SB)
|
||||||
|
TEXT ·libc_close_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_close(SB)
|
||||||
|
TEXT ·libc_dup_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_dup(SB)
|
||||||
|
TEXT ·libc_dup2_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_dup2(SB)
|
||||||
|
TEXT ·libc_exchangedata_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_exchangedata(SB)
|
||||||
|
TEXT ·libc_exit_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_exit(SB)
|
||||||
|
TEXT ·libc_faccessat_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_faccessat(SB)
|
||||||
|
TEXT ·libc_fchdir_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fchdir(SB)
|
||||||
|
TEXT ·libc_fchflags_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fchflags(SB)
|
||||||
|
TEXT ·libc_fchmod_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fchmod(SB)
|
||||||
|
TEXT ·libc_fchmodat_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fchmodat(SB)
|
||||||
|
TEXT ·libc_fchown_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fchown(SB)
|
||||||
|
TEXT ·libc_fchownat_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fchownat(SB)
|
||||||
|
TEXT ·libc_flock_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_flock(SB)
|
||||||
|
TEXT ·libc_fpathconf_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fpathconf(SB)
|
||||||
|
TEXT ·libc_fsync_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fsync(SB)
|
||||||
|
TEXT ·libc_ftruncate_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_ftruncate(SB)
|
||||||
|
TEXT ·libc_getdtablesize_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getdtablesize(SB)
|
||||||
|
TEXT ·libc_getegid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getegid(SB)
|
||||||
|
TEXT ·libc_geteuid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_geteuid(SB)
|
||||||
|
TEXT ·libc_getgid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getgid(SB)
|
||||||
|
TEXT ·libc_getpgid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getpgid(SB)
|
||||||
|
TEXT ·libc_getpgrp_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getpgrp(SB)
|
||||||
|
TEXT ·libc_getpid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getpid(SB)
|
||||||
|
TEXT ·libc_getppid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getppid(SB)
|
||||||
|
TEXT ·libc_getpriority_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getpriority(SB)
|
||||||
|
TEXT ·libc_getrlimit_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getrlimit(SB)
|
||||||
|
TEXT ·libc_getrusage_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getrusage(SB)
|
||||||
|
TEXT ·libc_getsid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getsid(SB)
|
||||||
|
TEXT ·libc_getuid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getuid(SB)
|
||||||
|
TEXT ·libc_issetugid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_issetugid(SB)
|
||||||
|
TEXT ·libc_kqueue_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_kqueue(SB)
|
||||||
|
TEXT ·libc_lchown_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_lchown(SB)
|
||||||
|
TEXT ·libc_link_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_link(SB)
|
||||||
|
TEXT ·libc_linkat_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_linkat(SB)
|
||||||
|
TEXT ·libc_listen_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_listen(SB)
|
||||||
|
TEXT ·libc_mkdir_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mkdir(SB)
|
||||||
|
TEXT ·libc_mkdirat_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mkdirat(SB)
|
||||||
|
TEXT ·libc_mkfifo_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mkfifo(SB)
|
||||||
|
TEXT ·libc_mknod_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mknod(SB)
|
||||||
|
TEXT ·libc_open_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_open(SB)
|
||||||
|
TEXT ·libc_openat_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_openat(SB)
|
||||||
|
TEXT ·libc_pathconf_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_pathconf(SB)
|
||||||
|
TEXT ·libc_pread_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_pread(SB)
|
||||||
|
TEXT ·libc_pwrite_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_pwrite(SB)
|
||||||
|
TEXT ·libc_read_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_read(SB)
|
||||||
|
TEXT ·libc_readlink_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_readlink(SB)
|
||||||
|
TEXT ·libc_readlinkat_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_readlinkat(SB)
|
||||||
|
TEXT ·libc_rename_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_rename(SB)
|
||||||
|
TEXT ·libc_renameat_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_renameat(SB)
|
||||||
|
TEXT ·libc_revoke_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_revoke(SB)
|
||||||
|
TEXT ·libc_rmdir_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_rmdir(SB)
|
||||||
|
TEXT ·libc_lseek_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_lseek(SB)
|
||||||
|
TEXT ·libc_select_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_select(SB)
|
||||||
|
TEXT ·libc_setegid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setegid(SB)
|
||||||
|
TEXT ·libc_seteuid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_seteuid(SB)
|
||||||
|
TEXT ·libc_setgid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setgid(SB)
|
||||||
|
TEXT ·libc_setlogin_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setlogin(SB)
|
||||||
|
TEXT ·libc_setpgid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setpgid(SB)
|
||||||
|
TEXT ·libc_setpriority_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setpriority(SB)
|
||||||
|
TEXT ·libc_setprivexec_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setprivexec(SB)
|
||||||
|
TEXT ·libc_setregid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setregid(SB)
|
||||||
|
TEXT ·libc_setreuid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setreuid(SB)
|
||||||
|
TEXT ·libc_setrlimit_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setrlimit(SB)
|
||||||
|
TEXT ·libc_setsid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setsid(SB)
|
||||||
|
TEXT ·libc_settimeofday_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_settimeofday(SB)
|
||||||
|
TEXT ·libc_setuid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setuid(SB)
|
||||||
|
TEXT ·libc_symlink_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_symlink(SB)
|
||||||
|
TEXT ·libc_symlinkat_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_symlinkat(SB)
|
||||||
|
TEXT ·libc_sync_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_sync(SB)
|
||||||
|
TEXT ·libc_truncate_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_truncate(SB)
|
||||||
|
TEXT ·libc_umask_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_umask(SB)
|
||||||
|
TEXT ·libc_undelete_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_undelete(SB)
|
||||||
|
TEXT ·libc_unlink_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_unlink(SB)
|
||||||
|
TEXT ·libc_unlinkat_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_unlinkat(SB)
|
||||||
|
TEXT ·libc_unmount_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_unmount(SB)
|
||||||
|
TEXT ·libc_write_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_write(SB)
|
||||||
|
TEXT ·libc_mmap_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mmap(SB)
|
||||||
|
TEXT ·libc_munmap_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_munmap(SB)
|
||||||
|
TEXT ·libc_ptrace_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_ptrace(SB)
|
||||||
|
TEXT ·libc_gettimeofday_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_gettimeofday(SB)
|
||||||
|
TEXT ·libc_fstat64_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fstat64(SB)
|
||||||
|
TEXT ·libc_fstatat64_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fstatat64(SB)
|
||||||
|
TEXT ·libc_fstatfs64_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fstatfs64(SB)
|
||||||
|
TEXT ·libc_getfsstat64_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getfsstat64(SB)
|
||||||
|
TEXT ·libc_lstat64_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_lstat64(SB)
|
||||||
|
TEXT ·libc_stat64_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_stat64(SB)
|
||||||
|
TEXT ·libc_statfs64_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_statfs64(SB)
|
@ -0,0 +1,12 @@
|
|||||||
|
// go run mkasm_darwin.go amd64
|
||||||
|
// Code generated by the command above; DO NOT EDIT.
|
||||||
|
|
||||||
|
// +build go1.13
|
||||||
|
|
||||||
|
#include "textflag.h"
|
||||||
|
TEXT ·libc_fdopendir_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fdopendir(SB)
|
||||||
|
TEXT ·libc_closedir_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_closedir(SB)
|
||||||
|
TEXT ·libc_readdir_r_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_readdir_r(SB)
|
@ -0,0 +1,284 @@
|
|||||||
|
// go run mkasm_darwin.go amd64
|
||||||
|
// Code generated by the command above; DO NOT EDIT.
|
||||||
|
|
||||||
|
// +build go1.12
|
||||||
|
|
||||||
|
#include "textflag.h"
|
||||||
|
TEXT ·libc_getgroups_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getgroups(SB)
|
||||||
|
TEXT ·libc_setgroups_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setgroups(SB)
|
||||||
|
TEXT ·libc_wait4_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_wait4(SB)
|
||||||
|
TEXT ·libc_accept_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_accept(SB)
|
||||||
|
TEXT ·libc_bind_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_bind(SB)
|
||||||
|
TEXT ·libc_connect_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_connect(SB)
|
||||||
|
TEXT ·libc_socket_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_socket(SB)
|
||||||
|
TEXT ·libc_getsockopt_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getsockopt(SB)
|
||||||
|
TEXT ·libc_setsockopt_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setsockopt(SB)
|
||||||
|
TEXT ·libc_getpeername_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getpeername(SB)
|
||||||
|
TEXT ·libc_getsockname_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getsockname(SB)
|
||||||
|
TEXT ·libc_shutdown_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_shutdown(SB)
|
||||||
|
TEXT ·libc_socketpair_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_socketpair(SB)
|
||||||
|
TEXT ·libc_recvfrom_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_recvfrom(SB)
|
||||||
|
TEXT ·libc_sendto_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_sendto(SB)
|
||||||
|
TEXT ·libc_recvmsg_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_recvmsg(SB)
|
||||||
|
TEXT ·libc_sendmsg_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_sendmsg(SB)
|
||||||
|
TEXT ·libc_kevent_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_kevent(SB)
|
||||||
|
TEXT ·libc_utimes_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_utimes(SB)
|
||||||
|
TEXT ·libc_futimes_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_futimes(SB)
|
||||||
|
TEXT ·libc_poll_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_poll(SB)
|
||||||
|
TEXT ·libc_madvise_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_madvise(SB)
|
||||||
|
TEXT ·libc_mlock_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mlock(SB)
|
||||||
|
TEXT ·libc_mlockall_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mlockall(SB)
|
||||||
|
TEXT ·libc_mprotect_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mprotect(SB)
|
||||||
|
TEXT ·libc_msync_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_msync(SB)
|
||||||
|
TEXT ·libc_munlock_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_munlock(SB)
|
||||||
|
TEXT ·libc_munlockall_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_munlockall(SB)
|
||||||
|
TEXT ·libc_getattrlist_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getattrlist(SB)
|
||||||
|
TEXT ·libc_pipe_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_pipe(SB)
|
||||||
|
TEXT ·libc_getxattr_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getxattr(SB)
|
||||||
|
TEXT ·libc_fgetxattr_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fgetxattr(SB)
|
||||||
|
TEXT ·libc_setxattr_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setxattr(SB)
|
||||||
|
TEXT ·libc_fsetxattr_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fsetxattr(SB)
|
||||||
|
TEXT ·libc_removexattr_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_removexattr(SB)
|
||||||
|
TEXT ·libc_fremovexattr_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fremovexattr(SB)
|
||||||
|
TEXT ·libc_listxattr_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_listxattr(SB)
|
||||||
|
TEXT ·libc_flistxattr_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_flistxattr(SB)
|
||||||
|
TEXT ·libc_setattrlist_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setattrlist(SB)
|
||||||
|
TEXT ·libc_fcntl_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fcntl(SB)
|
||||||
|
TEXT ·libc_kill_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_kill(SB)
|
||||||
|
TEXT ·libc_ioctl_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_ioctl(SB)
|
||||||
|
TEXT ·libc_sysctl_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_sysctl(SB)
|
||||||
|
TEXT ·libc_sendfile_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_sendfile(SB)
|
||||||
|
TEXT ·libc_access_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_access(SB)
|
||||||
|
TEXT ·libc_adjtime_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_adjtime(SB)
|
||||||
|
TEXT ·libc_chdir_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_chdir(SB)
|
||||||
|
TEXT ·libc_chflags_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_chflags(SB)
|
||||||
|
TEXT ·libc_chmod_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_chmod(SB)
|
||||||
|
TEXT ·libc_chown_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_chown(SB)
|
||||||
|
TEXT ·libc_chroot_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_chroot(SB)
|
||||||
|
TEXT ·libc_clock_gettime_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_clock_gettime(SB)
|
||||||
|
TEXT ·libc_close_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_close(SB)
|
||||||
|
TEXT ·libc_dup_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_dup(SB)
|
||||||
|
TEXT ·libc_dup2_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_dup2(SB)
|
||||||
|
TEXT ·libc_exchangedata_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_exchangedata(SB)
|
||||||
|
TEXT ·libc_exit_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_exit(SB)
|
||||||
|
TEXT ·libc_faccessat_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_faccessat(SB)
|
||||||
|
TEXT ·libc_fchdir_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fchdir(SB)
|
||||||
|
TEXT ·libc_fchflags_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fchflags(SB)
|
||||||
|
TEXT ·libc_fchmod_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fchmod(SB)
|
||||||
|
TEXT ·libc_fchmodat_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fchmodat(SB)
|
||||||
|
TEXT ·libc_fchown_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fchown(SB)
|
||||||
|
TEXT ·libc_fchownat_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fchownat(SB)
|
||||||
|
TEXT ·libc_flock_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_flock(SB)
|
||||||
|
TEXT ·libc_fpathconf_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fpathconf(SB)
|
||||||
|
TEXT ·libc_fsync_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fsync(SB)
|
||||||
|
TEXT ·libc_ftruncate_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_ftruncate(SB)
|
||||||
|
TEXT ·libc_getdtablesize_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getdtablesize(SB)
|
||||||
|
TEXT ·libc_getegid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getegid(SB)
|
||||||
|
TEXT ·libc_geteuid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_geteuid(SB)
|
||||||
|
TEXT ·libc_getgid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getgid(SB)
|
||||||
|
TEXT ·libc_getpgid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getpgid(SB)
|
||||||
|
TEXT ·libc_getpgrp_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getpgrp(SB)
|
||||||
|
TEXT ·libc_getpid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getpid(SB)
|
||||||
|
TEXT ·libc_getppid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getppid(SB)
|
||||||
|
TEXT ·libc_getpriority_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getpriority(SB)
|
||||||
|
TEXT ·libc_getrlimit_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getrlimit(SB)
|
||||||
|
TEXT ·libc_getrusage_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getrusage(SB)
|
||||||
|
TEXT ·libc_getsid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getsid(SB)
|
||||||
|
TEXT ·libc_getuid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getuid(SB)
|
||||||
|
TEXT ·libc_issetugid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_issetugid(SB)
|
||||||
|
TEXT ·libc_kqueue_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_kqueue(SB)
|
||||||
|
TEXT ·libc_lchown_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_lchown(SB)
|
||||||
|
TEXT ·libc_link_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_link(SB)
|
||||||
|
TEXT ·libc_linkat_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_linkat(SB)
|
||||||
|
TEXT ·libc_listen_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_listen(SB)
|
||||||
|
TEXT ·libc_mkdir_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mkdir(SB)
|
||||||
|
TEXT ·libc_mkdirat_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mkdirat(SB)
|
||||||
|
TEXT ·libc_mkfifo_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mkfifo(SB)
|
||||||
|
TEXT ·libc_mknod_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mknod(SB)
|
||||||
|
TEXT ·libc_open_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_open(SB)
|
||||||
|
TEXT ·libc_openat_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_openat(SB)
|
||||||
|
TEXT ·libc_pathconf_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_pathconf(SB)
|
||||||
|
TEXT ·libc_pread_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_pread(SB)
|
||||||
|
TEXT ·libc_pwrite_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_pwrite(SB)
|
||||||
|
TEXT ·libc_read_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_read(SB)
|
||||||
|
TEXT ·libc_readlink_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_readlink(SB)
|
||||||
|
TEXT ·libc_readlinkat_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_readlinkat(SB)
|
||||||
|
TEXT ·libc_rename_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_rename(SB)
|
||||||
|
TEXT ·libc_renameat_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_renameat(SB)
|
||||||
|
TEXT ·libc_revoke_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_revoke(SB)
|
||||||
|
TEXT ·libc_rmdir_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_rmdir(SB)
|
||||||
|
TEXT ·libc_lseek_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_lseek(SB)
|
||||||
|
TEXT ·libc_select_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_select(SB)
|
||||||
|
TEXT ·libc_setegid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setegid(SB)
|
||||||
|
TEXT ·libc_seteuid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_seteuid(SB)
|
||||||
|
TEXT ·libc_setgid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setgid(SB)
|
||||||
|
TEXT ·libc_setlogin_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setlogin(SB)
|
||||||
|
TEXT ·libc_setpgid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setpgid(SB)
|
||||||
|
TEXT ·libc_setpriority_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setpriority(SB)
|
||||||
|
TEXT ·libc_setprivexec_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setprivexec(SB)
|
||||||
|
TEXT ·libc_setregid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setregid(SB)
|
||||||
|
TEXT ·libc_setreuid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setreuid(SB)
|
||||||
|
TEXT ·libc_setrlimit_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setrlimit(SB)
|
||||||
|
TEXT ·libc_setsid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setsid(SB)
|
||||||
|
TEXT ·libc_settimeofday_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_settimeofday(SB)
|
||||||
|
TEXT ·libc_setuid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setuid(SB)
|
||||||
|
TEXT ·libc_symlink_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_symlink(SB)
|
||||||
|
TEXT ·libc_symlinkat_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_symlinkat(SB)
|
||||||
|
TEXT ·libc_sync_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_sync(SB)
|
||||||
|
TEXT ·libc_truncate_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_truncate(SB)
|
||||||
|
TEXT ·libc_umask_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_umask(SB)
|
||||||
|
TEXT ·libc_undelete_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_undelete(SB)
|
||||||
|
TEXT ·libc_unlink_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_unlink(SB)
|
||||||
|
TEXT ·libc_unlinkat_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_unlinkat(SB)
|
||||||
|
TEXT ·libc_unmount_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_unmount(SB)
|
||||||
|
TEXT ·libc_write_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_write(SB)
|
||||||
|
TEXT ·libc_mmap_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mmap(SB)
|
||||||
|
TEXT ·libc_munmap_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_munmap(SB)
|
||||||
|
TEXT ·libc_ptrace_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_ptrace(SB)
|
||||||
|
TEXT ·libc_gettimeofday_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_gettimeofday(SB)
|
||||||
|
TEXT ·libc_fstat64_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fstat64(SB)
|
||||||
|
TEXT ·libc_fstatat64_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fstatat64(SB)
|
||||||
|
TEXT ·libc_fstatfs64_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fstatfs64(SB)
|
||||||
|
TEXT ·libc_getfsstat64_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getfsstat64(SB)
|
||||||
|
TEXT ·libc_lstat64_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_lstat64(SB)
|
||||||
|
TEXT ·libc_stat64_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_stat64(SB)
|
||||||
|
TEXT ·libc_statfs64_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_statfs64(SB)
|
@ -0,0 +1,12 @@
|
|||||||
|
// go run mkasm_darwin.go arm
|
||||||
|
// Code generated by the command above; DO NOT EDIT.
|
||||||
|
|
||||||
|
// +build go1.13
|
||||||
|
|
||||||
|
#include "textflag.h"
|
||||||
|
TEXT ·libc_fdopendir_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fdopendir(SB)
|
||||||
|
TEXT ·libc_closedir_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_closedir(SB)
|
||||||
|
TEXT ·libc_readdir_r_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_readdir_r(SB)
|
@ -0,0 +1,282 @@
|
|||||||
|
// go run mkasm_darwin.go arm
|
||||||
|
// Code generated by the command above; DO NOT EDIT.
|
||||||
|
|
||||||
|
// +build go1.12
|
||||||
|
|
||||||
|
#include "textflag.h"
|
||||||
|
TEXT ·libc_getgroups_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getgroups(SB)
|
||||||
|
TEXT ·libc_setgroups_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setgroups(SB)
|
||||||
|
TEXT ·libc_wait4_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_wait4(SB)
|
||||||
|
TEXT ·libc_accept_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_accept(SB)
|
||||||
|
TEXT ·libc_bind_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_bind(SB)
|
||||||
|
TEXT ·libc_connect_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_connect(SB)
|
||||||
|
TEXT ·libc_socket_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_socket(SB)
|
||||||
|
TEXT ·libc_getsockopt_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getsockopt(SB)
|
||||||
|
TEXT ·libc_setsockopt_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setsockopt(SB)
|
||||||
|
TEXT ·libc_getpeername_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getpeername(SB)
|
||||||
|
TEXT ·libc_getsockname_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getsockname(SB)
|
||||||
|
TEXT ·libc_shutdown_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_shutdown(SB)
|
||||||
|
TEXT ·libc_socketpair_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_socketpair(SB)
|
||||||
|
TEXT ·libc_recvfrom_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_recvfrom(SB)
|
||||||
|
TEXT ·libc_sendto_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_sendto(SB)
|
||||||
|
TEXT ·libc_recvmsg_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_recvmsg(SB)
|
||||||
|
TEXT ·libc_sendmsg_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_sendmsg(SB)
|
||||||
|
TEXT ·libc_kevent_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_kevent(SB)
|
||||||
|
TEXT ·libc_utimes_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_utimes(SB)
|
||||||
|
TEXT ·libc_futimes_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_futimes(SB)
|
||||||
|
TEXT ·libc_poll_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_poll(SB)
|
||||||
|
TEXT ·libc_madvise_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_madvise(SB)
|
||||||
|
TEXT ·libc_mlock_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mlock(SB)
|
||||||
|
TEXT ·libc_mlockall_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mlockall(SB)
|
||||||
|
TEXT ·libc_mprotect_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mprotect(SB)
|
||||||
|
TEXT ·libc_msync_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_msync(SB)
|
||||||
|
TEXT ·libc_munlock_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_munlock(SB)
|
||||||
|
TEXT ·libc_munlockall_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_munlockall(SB)
|
||||||
|
TEXT ·libc_getattrlist_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getattrlist(SB)
|
||||||
|
TEXT ·libc_pipe_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_pipe(SB)
|
||||||
|
TEXT ·libc_getxattr_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getxattr(SB)
|
||||||
|
TEXT ·libc_fgetxattr_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fgetxattr(SB)
|
||||||
|
TEXT ·libc_setxattr_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setxattr(SB)
|
||||||
|
TEXT ·libc_fsetxattr_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fsetxattr(SB)
|
||||||
|
TEXT ·libc_removexattr_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_removexattr(SB)
|
||||||
|
TEXT ·libc_fremovexattr_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fremovexattr(SB)
|
||||||
|
TEXT ·libc_listxattr_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_listxattr(SB)
|
||||||
|
TEXT ·libc_flistxattr_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_flistxattr(SB)
|
||||||
|
TEXT ·libc_setattrlist_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setattrlist(SB)
|
||||||
|
TEXT ·libc_fcntl_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fcntl(SB)
|
||||||
|
TEXT ·libc_kill_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_kill(SB)
|
||||||
|
TEXT ·libc_ioctl_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_ioctl(SB)
|
||||||
|
TEXT ·libc_sysctl_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_sysctl(SB)
|
||||||
|
TEXT ·libc_sendfile_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_sendfile(SB)
|
||||||
|
TEXT ·libc_access_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_access(SB)
|
||||||
|
TEXT ·libc_adjtime_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_adjtime(SB)
|
||||||
|
TEXT ·libc_chdir_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_chdir(SB)
|
||||||
|
TEXT ·libc_chflags_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_chflags(SB)
|
||||||
|
TEXT ·libc_chmod_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_chmod(SB)
|
||||||
|
TEXT ·libc_chown_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_chown(SB)
|
||||||
|
TEXT ·libc_chroot_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_chroot(SB)
|
||||||
|
TEXT ·libc_clock_gettime_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_clock_gettime(SB)
|
||||||
|
TEXT ·libc_close_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_close(SB)
|
||||||
|
TEXT ·libc_dup_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_dup(SB)
|
||||||
|
TEXT ·libc_dup2_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_dup2(SB)
|
||||||
|
TEXT ·libc_exchangedata_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_exchangedata(SB)
|
||||||
|
TEXT ·libc_exit_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_exit(SB)
|
||||||
|
TEXT ·libc_faccessat_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_faccessat(SB)
|
||||||
|
TEXT ·libc_fchdir_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fchdir(SB)
|
||||||
|
TEXT ·libc_fchflags_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fchflags(SB)
|
||||||
|
TEXT ·libc_fchmod_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fchmod(SB)
|
||||||
|
TEXT ·libc_fchmodat_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fchmodat(SB)
|
||||||
|
TEXT ·libc_fchown_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fchown(SB)
|
||||||
|
TEXT ·libc_fchownat_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fchownat(SB)
|
||||||
|
TEXT ·libc_flock_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_flock(SB)
|
||||||
|
TEXT ·libc_fpathconf_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fpathconf(SB)
|
||||||
|
TEXT ·libc_fsync_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fsync(SB)
|
||||||
|
TEXT ·libc_ftruncate_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_ftruncate(SB)
|
||||||
|
TEXT ·libc_getdtablesize_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getdtablesize(SB)
|
||||||
|
TEXT ·libc_getegid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getegid(SB)
|
||||||
|
TEXT ·libc_geteuid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_geteuid(SB)
|
||||||
|
TEXT ·libc_getgid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getgid(SB)
|
||||||
|
TEXT ·libc_getpgid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getpgid(SB)
|
||||||
|
TEXT ·libc_getpgrp_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getpgrp(SB)
|
||||||
|
TEXT ·libc_getpid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getpid(SB)
|
||||||
|
TEXT ·libc_getppid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getppid(SB)
|
||||||
|
TEXT ·libc_getpriority_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getpriority(SB)
|
||||||
|
TEXT ·libc_getrlimit_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getrlimit(SB)
|
||||||
|
TEXT ·libc_getrusage_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getrusage(SB)
|
||||||
|
TEXT ·libc_getsid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getsid(SB)
|
||||||
|
TEXT ·libc_getuid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getuid(SB)
|
||||||
|
TEXT ·libc_issetugid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_issetugid(SB)
|
||||||
|
TEXT ·libc_kqueue_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_kqueue(SB)
|
||||||
|
TEXT ·libc_lchown_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_lchown(SB)
|
||||||
|
TEXT ·libc_link_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_link(SB)
|
||||||
|
TEXT ·libc_linkat_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_linkat(SB)
|
||||||
|
TEXT ·libc_listen_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_listen(SB)
|
||||||
|
TEXT ·libc_mkdir_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mkdir(SB)
|
||||||
|
TEXT ·libc_mkdirat_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mkdirat(SB)
|
||||||
|
TEXT ·libc_mkfifo_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mkfifo(SB)
|
||||||
|
TEXT ·libc_mknod_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mknod(SB)
|
||||||
|
TEXT ·libc_open_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_open(SB)
|
||||||
|
TEXT ·libc_openat_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_openat(SB)
|
||||||
|
TEXT ·libc_pathconf_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_pathconf(SB)
|
||||||
|
TEXT ·libc_pread_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_pread(SB)
|
||||||
|
TEXT ·libc_pwrite_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_pwrite(SB)
|
||||||
|
TEXT ·libc_read_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_read(SB)
|
||||||
|
TEXT ·libc_readlink_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_readlink(SB)
|
||||||
|
TEXT ·libc_readlinkat_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_readlinkat(SB)
|
||||||
|
TEXT ·libc_rename_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_rename(SB)
|
||||||
|
TEXT ·libc_renameat_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_renameat(SB)
|
||||||
|
TEXT ·libc_revoke_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_revoke(SB)
|
||||||
|
TEXT ·libc_rmdir_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_rmdir(SB)
|
||||||
|
TEXT ·libc_lseek_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_lseek(SB)
|
||||||
|
TEXT ·libc_select_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_select(SB)
|
||||||
|
TEXT ·libc_setegid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setegid(SB)
|
||||||
|
TEXT ·libc_seteuid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_seteuid(SB)
|
||||||
|
TEXT ·libc_setgid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setgid(SB)
|
||||||
|
TEXT ·libc_setlogin_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setlogin(SB)
|
||||||
|
TEXT ·libc_setpgid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setpgid(SB)
|
||||||
|
TEXT ·libc_setpriority_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setpriority(SB)
|
||||||
|
TEXT ·libc_setprivexec_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setprivexec(SB)
|
||||||
|
TEXT ·libc_setregid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setregid(SB)
|
||||||
|
TEXT ·libc_setreuid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setreuid(SB)
|
||||||
|
TEXT ·libc_setrlimit_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setrlimit(SB)
|
||||||
|
TEXT ·libc_setsid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setsid(SB)
|
||||||
|
TEXT ·libc_settimeofday_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_settimeofday(SB)
|
||||||
|
TEXT ·libc_setuid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setuid(SB)
|
||||||
|
TEXT ·libc_symlink_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_symlink(SB)
|
||||||
|
TEXT ·libc_symlinkat_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_symlinkat(SB)
|
||||||
|
TEXT ·libc_sync_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_sync(SB)
|
||||||
|
TEXT ·libc_truncate_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_truncate(SB)
|
||||||
|
TEXT ·libc_umask_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_umask(SB)
|
||||||
|
TEXT ·libc_undelete_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_undelete(SB)
|
||||||
|
TEXT ·libc_unlink_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_unlink(SB)
|
||||||
|
TEXT ·libc_unlinkat_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_unlinkat(SB)
|
||||||
|
TEXT ·libc_unmount_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_unmount(SB)
|
||||||
|
TEXT ·libc_write_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_write(SB)
|
||||||
|
TEXT ·libc_mmap_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mmap(SB)
|
||||||
|
TEXT ·libc_munmap_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_munmap(SB)
|
||||||
|
TEXT ·libc_gettimeofday_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_gettimeofday(SB)
|
||||||
|
TEXT ·libc_fstat_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fstat(SB)
|
||||||
|
TEXT ·libc_fstatat_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fstatat(SB)
|
||||||
|
TEXT ·libc_fstatfs_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fstatfs(SB)
|
||||||
|
TEXT ·libc_getfsstat_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getfsstat(SB)
|
||||||
|
TEXT ·libc_lstat_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_lstat(SB)
|
||||||
|
TEXT ·libc_stat_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_stat(SB)
|
||||||
|
TEXT ·libc_statfs_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_statfs(SB)
|
@ -0,0 +1,12 @@
|
|||||||
|
// go run mkasm_darwin.go arm64
|
||||||
|
// Code generated by the command above; DO NOT EDIT.
|
||||||
|
|
||||||
|
// +build go1.13
|
||||||
|
|
||||||
|
#include "textflag.h"
|
||||||
|
TEXT ·libc_fdopendir_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fdopendir(SB)
|
||||||
|
TEXT ·libc_closedir_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_closedir(SB)
|
||||||
|
TEXT ·libc_readdir_r_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_readdir_r(SB)
|
@ -0,0 +1,282 @@
|
|||||||
|
// go run mkasm_darwin.go arm64
|
||||||
|
// Code generated by the command above; DO NOT EDIT.
|
||||||
|
|
||||||
|
// +build go1.12
|
||||||
|
|
||||||
|
#include "textflag.h"
|
||||||
|
TEXT ·libc_getgroups_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getgroups(SB)
|
||||||
|
TEXT ·libc_setgroups_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setgroups(SB)
|
||||||
|
TEXT ·libc_wait4_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_wait4(SB)
|
||||||
|
TEXT ·libc_accept_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_accept(SB)
|
||||||
|
TEXT ·libc_bind_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_bind(SB)
|
||||||
|
TEXT ·libc_connect_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_connect(SB)
|
||||||
|
TEXT ·libc_socket_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_socket(SB)
|
||||||
|
TEXT ·libc_getsockopt_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getsockopt(SB)
|
||||||
|
TEXT ·libc_setsockopt_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setsockopt(SB)
|
||||||
|
TEXT ·libc_getpeername_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getpeername(SB)
|
||||||
|
TEXT ·libc_getsockname_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getsockname(SB)
|
||||||
|
TEXT ·libc_shutdown_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_shutdown(SB)
|
||||||
|
TEXT ·libc_socketpair_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_socketpair(SB)
|
||||||
|
TEXT ·libc_recvfrom_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_recvfrom(SB)
|
||||||
|
TEXT ·libc_sendto_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_sendto(SB)
|
||||||
|
TEXT ·libc_recvmsg_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_recvmsg(SB)
|
||||||
|
TEXT ·libc_sendmsg_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_sendmsg(SB)
|
||||||
|
TEXT ·libc_kevent_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_kevent(SB)
|
||||||
|
TEXT ·libc_utimes_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_utimes(SB)
|
||||||
|
TEXT ·libc_futimes_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_futimes(SB)
|
||||||
|
TEXT ·libc_poll_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_poll(SB)
|
||||||
|
TEXT ·libc_madvise_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_madvise(SB)
|
||||||
|
TEXT ·libc_mlock_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mlock(SB)
|
||||||
|
TEXT ·libc_mlockall_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mlockall(SB)
|
||||||
|
TEXT ·libc_mprotect_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mprotect(SB)
|
||||||
|
TEXT ·libc_msync_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_msync(SB)
|
||||||
|
TEXT ·libc_munlock_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_munlock(SB)
|
||||||
|
TEXT ·libc_munlockall_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_munlockall(SB)
|
||||||
|
TEXT ·libc_getattrlist_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getattrlist(SB)
|
||||||
|
TEXT ·libc_pipe_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_pipe(SB)
|
||||||
|
TEXT ·libc_getxattr_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getxattr(SB)
|
||||||
|
TEXT ·libc_fgetxattr_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fgetxattr(SB)
|
||||||
|
TEXT ·libc_setxattr_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setxattr(SB)
|
||||||
|
TEXT ·libc_fsetxattr_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fsetxattr(SB)
|
||||||
|
TEXT ·libc_removexattr_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_removexattr(SB)
|
||||||
|
TEXT ·libc_fremovexattr_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fremovexattr(SB)
|
||||||
|
TEXT ·libc_listxattr_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_listxattr(SB)
|
||||||
|
TEXT ·libc_flistxattr_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_flistxattr(SB)
|
||||||
|
TEXT ·libc_setattrlist_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setattrlist(SB)
|
||||||
|
TEXT ·libc_fcntl_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fcntl(SB)
|
||||||
|
TEXT ·libc_kill_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_kill(SB)
|
||||||
|
TEXT ·libc_ioctl_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_ioctl(SB)
|
||||||
|
TEXT ·libc_sysctl_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_sysctl(SB)
|
||||||
|
TEXT ·libc_sendfile_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_sendfile(SB)
|
||||||
|
TEXT ·libc_access_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_access(SB)
|
||||||
|
TEXT ·libc_adjtime_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_adjtime(SB)
|
||||||
|
TEXT ·libc_chdir_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_chdir(SB)
|
||||||
|
TEXT ·libc_chflags_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_chflags(SB)
|
||||||
|
TEXT ·libc_chmod_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_chmod(SB)
|
||||||
|
TEXT ·libc_chown_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_chown(SB)
|
||||||
|
TEXT ·libc_chroot_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_chroot(SB)
|
||||||
|
TEXT ·libc_clock_gettime_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_clock_gettime(SB)
|
||||||
|
TEXT ·libc_close_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_close(SB)
|
||||||
|
TEXT ·libc_dup_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_dup(SB)
|
||||||
|
TEXT ·libc_dup2_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_dup2(SB)
|
||||||
|
TEXT ·libc_exchangedata_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_exchangedata(SB)
|
||||||
|
TEXT ·libc_exit_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_exit(SB)
|
||||||
|
TEXT ·libc_faccessat_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_faccessat(SB)
|
||||||
|
TEXT ·libc_fchdir_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fchdir(SB)
|
||||||
|
TEXT ·libc_fchflags_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fchflags(SB)
|
||||||
|
TEXT ·libc_fchmod_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fchmod(SB)
|
||||||
|
TEXT ·libc_fchmodat_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fchmodat(SB)
|
||||||
|
TEXT ·libc_fchown_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fchown(SB)
|
||||||
|
TEXT ·libc_fchownat_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fchownat(SB)
|
||||||
|
TEXT ·libc_flock_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_flock(SB)
|
||||||
|
TEXT ·libc_fpathconf_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fpathconf(SB)
|
||||||
|
TEXT ·libc_fsync_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fsync(SB)
|
||||||
|
TEXT ·libc_ftruncate_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_ftruncate(SB)
|
||||||
|
TEXT ·libc_getdtablesize_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getdtablesize(SB)
|
||||||
|
TEXT ·libc_getegid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getegid(SB)
|
||||||
|
TEXT ·libc_geteuid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_geteuid(SB)
|
||||||
|
TEXT ·libc_getgid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getgid(SB)
|
||||||
|
TEXT ·libc_getpgid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getpgid(SB)
|
||||||
|
TEXT ·libc_getpgrp_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getpgrp(SB)
|
||||||
|
TEXT ·libc_getpid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getpid(SB)
|
||||||
|
TEXT ·libc_getppid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getppid(SB)
|
||||||
|
TEXT ·libc_getpriority_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getpriority(SB)
|
||||||
|
TEXT ·libc_getrlimit_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getrlimit(SB)
|
||||||
|
TEXT ·libc_getrusage_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getrusage(SB)
|
||||||
|
TEXT ·libc_getsid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getsid(SB)
|
||||||
|
TEXT ·libc_getuid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getuid(SB)
|
||||||
|
TEXT ·libc_issetugid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_issetugid(SB)
|
||||||
|
TEXT ·libc_kqueue_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_kqueue(SB)
|
||||||
|
TEXT ·libc_lchown_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_lchown(SB)
|
||||||
|
TEXT ·libc_link_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_link(SB)
|
||||||
|
TEXT ·libc_linkat_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_linkat(SB)
|
||||||
|
TEXT ·libc_listen_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_listen(SB)
|
||||||
|
TEXT ·libc_mkdir_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mkdir(SB)
|
||||||
|
TEXT ·libc_mkdirat_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mkdirat(SB)
|
||||||
|
TEXT ·libc_mkfifo_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mkfifo(SB)
|
||||||
|
TEXT ·libc_mknod_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mknod(SB)
|
||||||
|
TEXT ·libc_open_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_open(SB)
|
||||||
|
TEXT ·libc_openat_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_openat(SB)
|
||||||
|
TEXT ·libc_pathconf_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_pathconf(SB)
|
||||||
|
TEXT ·libc_pread_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_pread(SB)
|
||||||
|
TEXT ·libc_pwrite_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_pwrite(SB)
|
||||||
|
TEXT ·libc_read_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_read(SB)
|
||||||
|
TEXT ·libc_readlink_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_readlink(SB)
|
||||||
|
TEXT ·libc_readlinkat_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_readlinkat(SB)
|
||||||
|
TEXT ·libc_rename_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_rename(SB)
|
||||||
|
TEXT ·libc_renameat_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_renameat(SB)
|
||||||
|
TEXT ·libc_revoke_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_revoke(SB)
|
||||||
|
TEXT ·libc_rmdir_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_rmdir(SB)
|
||||||
|
TEXT ·libc_lseek_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_lseek(SB)
|
||||||
|
TEXT ·libc_select_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_select(SB)
|
||||||
|
TEXT ·libc_setegid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setegid(SB)
|
||||||
|
TEXT ·libc_seteuid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_seteuid(SB)
|
||||||
|
TEXT ·libc_setgid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setgid(SB)
|
||||||
|
TEXT ·libc_setlogin_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setlogin(SB)
|
||||||
|
TEXT ·libc_setpgid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setpgid(SB)
|
||||||
|
TEXT ·libc_setpriority_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setpriority(SB)
|
||||||
|
TEXT ·libc_setprivexec_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setprivexec(SB)
|
||||||
|
TEXT ·libc_setregid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setregid(SB)
|
||||||
|
TEXT ·libc_setreuid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setreuid(SB)
|
||||||
|
TEXT ·libc_setrlimit_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setrlimit(SB)
|
||||||
|
TEXT ·libc_setsid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setsid(SB)
|
||||||
|
TEXT ·libc_settimeofday_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_settimeofday(SB)
|
||||||
|
TEXT ·libc_setuid_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_setuid(SB)
|
||||||
|
TEXT ·libc_symlink_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_symlink(SB)
|
||||||
|
TEXT ·libc_symlinkat_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_symlinkat(SB)
|
||||||
|
TEXT ·libc_sync_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_sync(SB)
|
||||||
|
TEXT ·libc_truncate_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_truncate(SB)
|
||||||
|
TEXT ·libc_umask_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_umask(SB)
|
||||||
|
TEXT ·libc_undelete_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_undelete(SB)
|
||||||
|
TEXT ·libc_unlink_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_unlink(SB)
|
||||||
|
TEXT ·libc_unlinkat_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_unlinkat(SB)
|
||||||
|
TEXT ·libc_unmount_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_unmount(SB)
|
||||||
|
TEXT ·libc_write_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_write(SB)
|
||||||
|
TEXT ·libc_mmap_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_mmap(SB)
|
||||||
|
TEXT ·libc_munmap_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_munmap(SB)
|
||||||
|
TEXT ·libc_gettimeofday_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_gettimeofday(SB)
|
||||||
|
TEXT ·libc_fstat_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fstat(SB)
|
||||||
|
TEXT ·libc_fstatat_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fstatat(SB)
|
||||||
|
TEXT ·libc_fstatfs_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_fstatfs(SB)
|
||||||
|
TEXT ·libc_getfsstat_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_getfsstat(SB)
|
||||||
|
TEXT ·libc_lstat_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_lstat(SB)
|
||||||
|
TEXT ·libc_stat_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_stat(SB)
|
||||||
|
TEXT ·libc_statfs_trampoline(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_statfs(SB)
|
@ -1,13 +0,0 @@
|
|||||||
// 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.
|
|
||||||
|
|
||||||
//
|
|
||||||
// System calls for 386, Windows are implemented in runtime/syscall_windows.goc
|
|
||||||
//
|
|
||||||
|
|
||||||
TEXT ·getprocaddress(SB), 7, $0-8
|
|
||||||
JMP syscall·getprocaddress(SB)
|
|
||||||
|
|
||||||
TEXT ·loadlibrary(SB), 7, $0-4
|
|
||||||
JMP syscall·loadlibrary(SB)
|
|
@ -1,13 +0,0 @@
|
|||||||
// 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.
|
|
||||||
|
|
||||||
//
|
|
||||||
// System calls for amd64, Windows are implemented in runtime/syscall_windows.goc
|
|
||||||
//
|
|
||||||
|
|
||||||
TEXT ·getprocaddress(SB), 7, $0-32
|
|
||||||
JMP syscall·getprocaddress(SB)
|
|
||||||
|
|
||||||
TEXT ·loadlibrary(SB), 7, $0-8
|
|
||||||
JMP syscall·loadlibrary(SB)
|
|
@ -1,24 +0,0 @@
|
|||||||
// 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 windows
|
|
||||||
// +build !go1.3
|
|
||||||
|
|
||||||
// copied from pkg/runtime
|
|
||||||
typedef unsigned int uint32;
|
|
||||||
typedef unsigned long long int uint64;
|
|
||||||
#ifdef _64BIT
|
|
||||||
typedef uint64 uintptr;
|
|
||||||
#else
|
|
||||||
typedef uint32 uintptr;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// from sys_386.s or sys_amd64.s
|
|
||||||
void ·servicemain(void);
|
|
||||||
|
|
||||||
void
|
|
||||||
·getServiceMain(uintptr *r)
|
|
||||||
{
|
|
||||||
*r = (uintptr)·servicemain;
|
|
||||||
}
|
|
@ -1,68 +0,0 @@
|
|||||||
// 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 windows
|
|
||||||
|
|
||||||
// func servicemain(argc uint32, argv **uint16)
|
|
||||||
TEXT ·servicemain(SB),7,$0
|
|
||||||
MOVL argc+0(FP), AX
|
|
||||||
MOVL AX, ·sArgc(SB)
|
|
||||||
MOVL argv+4(FP), AX
|
|
||||||
MOVL AX, ·sArgv(SB)
|
|
||||||
|
|
||||||
PUSHL BP
|
|
||||||
PUSHL BX
|
|
||||||
PUSHL SI
|
|
||||||
PUSHL DI
|
|
||||||
|
|
||||||
SUBL $12, SP
|
|
||||||
|
|
||||||
MOVL ·sName(SB), AX
|
|
||||||
MOVL AX, (SP)
|
|
||||||
MOVL $·servicectlhandler(SB), AX
|
|
||||||
MOVL AX, 4(SP)
|
|
||||||
MOVL $0, 8(SP)
|
|
||||||
MOVL ·cRegisterServiceCtrlHandlerExW(SB), AX
|
|
||||||
MOVL SP, BP
|
|
||||||
CALL AX
|
|
||||||
MOVL BP, SP
|
|
||||||
CMPL AX, $0
|
|
||||||
JE exit
|
|
||||||
MOVL AX, ·ssHandle(SB)
|
|
||||||
|
|
||||||
MOVL ·goWaitsH(SB), AX
|
|
||||||
MOVL AX, (SP)
|
|
||||||
MOVL ·cSetEvent(SB), AX
|
|
||||||
MOVL SP, BP
|
|
||||||
CALL AX
|
|
||||||
MOVL BP, SP
|
|
||||||
|
|
||||||
MOVL ·cWaitsH(SB), AX
|
|
||||||
MOVL AX, (SP)
|
|
||||||
MOVL $-1, AX
|
|
||||||
MOVL AX, 4(SP)
|
|
||||||
MOVL ·cWaitForSingleObject(SB), AX
|
|
||||||
MOVL SP, BP
|
|
||||||
CALL AX
|
|
||||||
MOVL BP, SP
|
|
||||||
|
|
||||||
exit:
|
|
||||||
ADDL $12, SP
|
|
||||||
|
|
||||||
POPL DI
|
|
||||||
POPL SI
|
|
||||||
POPL BX
|
|
||||||
POPL BP
|
|
||||||
|
|
||||||
MOVL 0(SP), CX
|
|
||||||
ADDL $12, SP
|
|
||||||
JMP CX
|
|
||||||
|
|
||||||
// I do not know why, but this seems to be the only way to call
|
|
||||||
// ctlHandlerProc on Windows 7.
|
|
||||||
|
|
||||||
// func servicectlhandler(ctl uint32, evtype uint32, evdata uintptr, context uintptr) uintptr {
|
|
||||||
TEXT ·servicectlhandler(SB),7,$0
|
|
||||||
MOVL ·ctlHandlerExProc(SB), CX
|
|
||||||
JMP CX
|
|
@ -1,42 +0,0 @@
|
|||||||
// 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 windows
|
|
||||||
|
|
||||||
// func servicemain(argc uint32, argv **uint16)
|
|
||||||
TEXT ·servicemain(SB),7,$0
|
|
||||||
MOVL CX, ·sArgc(SB)
|
|
||||||
MOVL DX, ·sArgv(SB)
|
|
||||||
|
|
||||||
SUBQ $32, SP // stack for the first 4 syscall params
|
|
||||||
|
|
||||||
MOVQ ·sName(SB), CX
|
|
||||||
MOVQ $·servicectlhandler(SB), DX
|
|
||||||
// BUG(pastarmovj): Figure out a way to pass in context in R8.
|
|
||||||
MOVQ ·cRegisterServiceCtrlHandlerExW(SB), AX
|
|
||||||
CALL AX
|
|
||||||
CMPQ AX, $0
|
|
||||||
JE exit
|
|
||||||
MOVQ AX, ·ssHandle(SB)
|
|
||||||
|
|
||||||
MOVQ ·goWaitsH(SB), CX
|
|
||||||
MOVQ ·cSetEvent(SB), AX
|
|
||||||
CALL AX
|
|
||||||
|
|
||||||
MOVQ ·cWaitsH(SB), CX
|
|
||||||
MOVQ $4294967295, DX
|
|
||||||
MOVQ ·cWaitForSingleObject(SB), AX
|
|
||||||
CALL AX
|
|
||||||
|
|
||||||
exit:
|
|
||||||
ADDQ $32, SP
|
|
||||||
RET
|
|
||||||
|
|
||||||
// I do not know why, but this seems to be the only way to call
|
|
||||||
// ctlHandlerProc on Windows 7.
|
|
||||||
|
|
||||||
// func ·servicectlhandler(ctl uint32, evtype uint32, evdata uintptr, context uintptr) uintptr {
|
|
||||||
TEXT ·servicectlhandler(SB),7,$0
|
|
||||||
MOVQ ·ctlHandlerExProc(SB), AX
|
|
||||||
JMP AX
|
|
@ -0,0 +1,31 @@
|
|||||||
|
{
|
||||||
|
"comment": "",
|
||||||
|
"ignore": "test",
|
||||||
|
"package": [
|
||||||
|
{
|
||||||
|
"checksumSHA1": "/okiFJv8es8i6DdPYuUHUbMwNNc=",
|
||||||
|
"path": "github.com/mattn/go-colorable",
|
||||||
|
"revision": "f1b5a0ed4603826971e6d07195710bbc9ed74df6",
|
||||||
|
"revisionTime": "2020-05-04T13:27:58Z"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"checksumSHA1": "CBUU5Mx4NooEbqqO2WJ8hmd7zvQ=",
|
||||||
|
"path": "github.com/mattn/go-isatty",
|
||||||
|
"revision": "cb30d6282491c185f77d9bec5d25de1bb61a06bc",
|
||||||
|
"revisionTime": "2020-01-28T10:39:42Z"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"checksumSHA1": "Ld0iviZSRGAKK6WSoti+3++1RmY=",
|
||||||
|
"path": "golang.org/x/sys/internal/unsafeheader",
|
||||||
|
"revision": "f1bc736245b146b19d485cdbc534f9a765257080",
|
||||||
|
"revisionTime": "2020-06-15T19:47:29Z"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"checksumSHA1": "vdzE+3LNjuZhyoJ6dHPuxD6zRXo=",
|
||||||
|
"path": "golang.org/x/sys/unix",
|
||||||
|
"revision": "f1bc736245b146b19d485cdbc534f9a765257080",
|
||||||
|
"revisionTime": "2020-06-15T19:47:29Z"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"rootPath": "b612.me/starlog"
|
||||||
|
}
|
Loading…
Reference in New Issue