summaryrefslogtreecommitdiff
path: root/libgo/go/syscall
Commit message (Collapse)AuthorAgeFilesLines
* libgo: update to Go1.18beta2Ian Lance Taylor2022-02-1151-336/+728
| | | | | | | | | gotools/ * Makefile.am (go_cmd_cgo_files): Add ast_go118.go (check-go-tool): Copy golang.org/x/tools directories. * Makefile.in: Regenerate. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/384695
* libgo: various fixes for Solaris supportIan Lance Taylor2021-08-145-12/+18
| | | | Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/342189
* libgo: update to Go1.17rc2Ian Lance Taylor2021-08-1249-135/+348
| | | | Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/341629
* libgo: update to Go1.16rc1Ian Lance Taylor2021-01-294-271/+36
| | | | Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/287493
* syscall: ensure openat uses variadic libc wrapperPaul E. Murphy2021-01-121-1/+1
| | | | | | | | | | | | On powerpc64le, this caused a failure in TestUnshareUidGidMapping due to stack corruption which resulted in a bogus execve syscall. Use the existing c wrapper to ensure we respect the ppc abi for variadic functions. Fixes PR go/98610 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/282717
* syscall: don't define sys_SETREUID and friendsIan Lance Taylor2021-01-052-12/+0
| | | | | | | | | We don't use them, since we always call the C library functions which do the right thing anyhow. And they aren't defined on all GNU/Linux variants. Fixes PR go/98510 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/281473
* libgo: update to Go1.16beta1 releaseIan Lance Taylor2020-12-3023-101/+463
| | | | | | | | | | | | | This does not yet include support for the //go:embed directive added in this release. * Makefile.am (check-runtime): Don't create check-runtime-dir. (mostlyclean-local): Don't remove check-runtime-dir. (check-go-tool, check-vet): Copy in go.mod and modules.txt. (check-cgo-test, check-carchive-test): Add go.mod file. * Makefile.in: Regenerate. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/280172
* syscall: don't use AF_LINK on hurdIan Lance Taylor2020-12-072-1/+102
| | | | | | | | Patch from Svante Signell. Fixes PR go/98153 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/275939
* libgo: update to Go 1.15.4 releaseIan Lance Taylor2020-11-101-0/+45
| | | | Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/268177
* libgo: handle linking to NetBSD's versioned symbolsNikhil Benesch2020-10-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On NetBSD, for backwards compatibility, various libc symbols are renamed to a symbol with a version suffix. For example, this is the (abbreviated) definition of sigaction: int sigaction(...) __asm__ ("__sigaction14") This poses a challenge for libgo, which attempts to link sigaction by way of an "//extern" comment: //extern sigaction func sigaction(...) This results in a reference to the deprecated compatibility symbol "sigaction", rather than the desired "__sigaction14" symbol. This patch introduces a new "//extern-sysinfo" comment to handle this situation. The new mklinknames.awk script scans a package for these comments and outputs a "//go:linkname" directive that links the wrapper to the correct versioned symbol, as determined by parsing the __asm__ annotation on the function's declaration in gen-sysinfo.go. For now, only the following packages are scanned by mklinknames.awk: os os/user runtime syscall gotools/: * Makefile.am (check-runtime): Add runtime_linknames.go to --extrafiles. * Makefile.in: Regenerate. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/265125
* syscall: don't build libcall_bsd.go on solarisIan Lance Taylor2020-10-281-1/+1
| | | | | | | This new file was based on master sources that are built for *BSD but not Solaris Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/266017
* syscall: import additional BSD-specific syscall wrappersNikhil Benesch2020-10-262-0/+141
| | | | | | | | | | Import additional code from upstream for handing system calls on BSD systems. This makes the syscall package on NetBSD complete enough to compile the standard library. Updates golang/go#38538. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/265123
* syscall: only compile ptrace varargs shim on LinuxNikhil Benesch2020-10-2112-14/+14
| | | | | | | | | | | | | | Only compile the __go_ptrace varargs shim on Linux to avoid compilation failures on some other platforms. The C ptrace function is not entirely portable (e.g., NetBSD has `int data` instead of `void* data`), and so far Linux is the only platform that needs the varargs shim. Additionally, make the types in the ptrace and raw_ptrace function declarations match. This makes it more clear that the only difference between the two is that calls via the former are allowed to block while calls via the latter are not. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/263517
* syscall: import upstream code for BSD sockets and sysctlsNikhil Benesch2020-10-213-1/+103
| | | | | | | | | Import some missing upstream code for BSD sockets and sysctls and adapt it for gccgo. Updates golang/go#38538. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/261137
* syscall: remove Sendfile on NetBSDNikhil Benesch2020-10-202-3/+3
| | | | | | NetBSD does not support the sendfile syscall. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/263521
* syscall: port fix for netbsd unix sockets from upstreamNikhil Benesch2020-10-131-3/+9
| | | | | | | | | | NetBSD does not include the null terminator when in its reported socket length. Port the upstream bugfix for the issue (#6627). This was likely missed during the usual upstream merge because the gc and gccgo socket implementations have diverged quite a bit. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/261741
* libgo: add 32-bit RISC-V (RV32) supportMaciej W. Rozycki2020-09-301-1/+1
| | | | | | | Add support for the 32-bit RISC-V (RV32) ISA matching the 64-bit RISC-V (RV64) port except for async preemption added as a stub only. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/251179
* syscall: fix TestForeground for AIXClément Chigot2020-09-222-1/+17
| | | | | | | Syscall function can't be used on AIX. Therefore, Ioctl in TestForeground must call raw_ioctl. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/175080
* syscall: remove ptrace syscall on ppc64Clément Chigot2020-09-222-3/+3
| | | | | | ptrace is available only for 32 bits programs. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/252558
* libgo: fix ptrace syscall hooks into glibcPaul E. Murphy2020-09-172-2/+2
| | | | | | | | | | | | | | | | | | ptrace is actually declared as a variadic function. On ppc64le the ABI requires to the caller to allocate space for the parameters and allows the caller to modify them. On ppc64le, depending on how and what version of GCC is used, it will save to parameter save area. This happened to clobber a saved LR, and caused syscall.TestExecPtrace to fail with a timeout when the tracee segfaults, and waits for the parent process to inspect. Wrap this function to avoid directly calling glibc's ptrace from go. Fixes golang/go#36698 Fixes go/92567 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/254755
* libgo: update to go1.15rc1Ian Lance Taylor2020-08-0114-182/+176
| | | | Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/245157
* syscall: append to environment in tests, don't clobber itIan Lance Taylor2020-05-111-3/+6
| | | | | | | | | | | This is a partial backport of https://golang.org/cl/233318. It's only a partial backport because part of the change was already applied to libgo in CL 193497 as part of the update to the Go 1.13beta1 release. Fixes PR go/95061 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/233359
* libgo: update to Go1.14rc1 releaseIan Lance Taylor2020-02-151-1/+3
| | | | Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/218017
* syscall: fix riscv64 GNU/Linux buildIan Lance Taylor2020-02-031-14/+0
| | | | | | | Make syscall_linux_riscv64.go, new in the 1.14beta1 release, look like the other syscall_linux_GOARCH.go files. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/217577
* runtime, syscall: add a couple of hurd build tagsIan Lance Taylor2020-01-291-1/+1
| | | | | | | | Patch by Svante Signell. Updates PR go/93468 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/216959
* libgo: update to Go1.14beta1Ian Lance Taylor2020-01-2136-151/+589
| | | | Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/214297
* re PR go/93020 (Final patches to build gcc-10 on GNU/Hurd)Ian Lance Taylor2019-12-241-1/+1
| | | | | | | | | | | PR go/93020 libgo: Hurd portability patches By Svante Signell. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/212409 From-SVN: r279724
* libgo: update to Go1.13Ian Lance Taylor2019-09-126-66/+58
| | | | | | Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/194698 From-SVN: r275691
* libgo: update to Go 1.13beta1 releaseIan Lance Taylor2019-09-0622-302/+943
| | | | | | Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/193497 From-SVN: r275473
* re PR go/90614 (gcc-9.1.0/libgo/go/syscall/wait.c:54:22: error: unused ↵Ian Lance Taylor2019-05-271-1/+1
| | | | | | | | | | | | | parameter ‘w’ [-Werror=unused-parameter] Continued (uint32_t *w)) PR go/90614 syscall: avoid unused parameter error if WIFCONTINUED not defined Fixes https://gcc.gnu.org/PR90614 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/178997 From-SVN: r271638
* libgo/go/syscall: add SockAddrDatalink on AIXIan Lance Taylor2019-04-191-0/+24
| | | | | | | | | This patch is required in order to build golang.org/x/net. The corresponding Go Toolchain patch is CL 170537. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/172898 From-SVN: r270458
* libgo: update to Go 1.12.2Ian Lance Taylor2019-04-081-0/+1
| | | | | | Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/170706 From-SVN: r270214
* libgo: fix build on AIXIan Lance Taylor2019-03-198-127/+81
| | | | | | | | | | Since aix/ppc64 has been added to GC toolchain, a mix between new and old files were created in gcc toolchain. This commit corrects this merge for aix/ppc64 and aix/ppc. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/167658 From-SVN: r269797
* re PR go/89447 (libgo largefile support is incomplete and inconsistent)Ian Lance Taylor2019-03-098-5/+42
| | | | | | | | | | | | | | | | PR go/89447 syscall, internal/syscall: adjust use of largefile functions Consistently call __go_openat for openat. Use fstatat64, creat64, sendfile64, and getdents64 where needed. Based on patch by Rainer Orth. Fixes https://gcc.gnu.org/PR89447 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/166420 From-SVN: r269521
* libgo: update to Go 1.12 releaseIan Lance Taylor2019-02-261-0/+13
| | | | | | Reviewed-on: https://go-review.googlesource.com/c/163742 From-SVN: r269216
* compiler, runtime: harmonize types referenced by both C and GoIan Lance Taylor2019-02-152-49/+14
| | | | | | | | | | | | | Compiling with LTO revealed a number of cases in the runtime and standard library where C and Go disagreed about the type of an object or function (or where Go and code generated by the compiler disagreed). In all cases the underlying representation was the same (e.g., uintptr vs. void*), so this wasn't causing actual problems, but it did result in a number of annoying warnings when compiling with LTO. Reviewed-on: https://go-review.googlesource.com/c/160700 From-SVN: r268923
* syscall: don't assume that WIFCONTINUED is definedIan Lance Taylor2019-02-121-0/+4
| | | | | | | | It's not defined on the Hurd. Reviewed-on: https://go-review.googlesource.com/c/161963 From-SVN: r268828
* os, syscall: Hurd fixes for a couple of testsIan Lance Taylor2019-02-071-5/+7
| | | | | | | | Based on patch by Svante Signell. Reviewed-on: https://go-review.googlesource.com/c/161520 From-SVN: r268605
* syscall: add Hurd supportIan Lance Taylor2019-02-079-133/+188
| | | | | | | | Loosely based on a patch by Svante Signell. Reviewed-on: https://go-review.googlesource.com/c/161518 From-SVN: r268603
* libgo: add hurd build tags to test filesIan Lance Taylor2019-02-012-2/+6
| | | | | | | | Patch by Svante Signell. Reviewed-on: https://go-review.googlesource.com/c/160823 From-SVN: r268460
* libgo: add hurd build tagsIan Lance Taylor2019-02-0113-10/+14
| | | | | | | | Patch by Svante Signell. Reviewed-on: https://go-review.googlesource.com/c/160822 From-SVN: r268459
* libgo: update to Go1.12beta2Ian Lance Taylor2019-01-1828-231/+1096
| | | | | | | | | | | | | | | | | | Reviewed-on: https://go-review.googlesource.com/c/158019 gotools/: * Makefile.am (go_cmd_vet_files): Update for Go1.12beta2 release. (GOTOOLS_TEST_TIMEOUT): Increase to 600. (check-runtime): Export LD_LIBRARY_PATH before computing GOARCH and GOOS. (check-vet): Copy golang.org/x/tools into check-vet-dir. * Makefile.in: Regenerate. gcc/testsuite/: * go.go-torture/execute/names-1.go: Stop using debug/xcoff, which is no longer externally visible. From-SVN: r268084
* syscall: mark C syscall functions noescapeIan Lance Taylor2019-01-162-0/+2
| | | | | | | | | | Many C syscall functions take pointer arguments. The pointers don't escape in the C functions. Mark the C functions noescape so calling them doesn't need allocation. Reviewed-on: https://go-review.googlesource.com/c/158158 From-SVN: r267989
* syscall: remove Flock for aix/ppc64Ian Lance Taylor2018-12-051-22/+0
| | | | | | | | | | CL 152397 removed it from gc's syscall package. Updates golang/go#29084 Reviewed-on: https://go-review.googlesource.com/c/152557 From-SVN: r266812
* syscall: don't assume we have a GETEUID system callIan Lance Taylor2018-09-261-0/+4
| | | | | | | | | | On Alpha GNU/Linux there is no geteuid system call, there is only getresuid. The raw geteuid system call is only used for testing, so just skip the test if it's not available. Reviewed-on: https://go-review.googlesource.com/137655 From-SVN: r264647
* libgo: update to Go 1.11Ian Lance Taylor2018-09-2431-30/+2676
| | | | | | | | | | | | | Reviewed-on: https://go-review.googlesource.com/136435 gotools/: * Makefile.am (mostlyclean-local): Run chmod on check-go-dir to make sure it is writable. (check-go-tools): Likewise. (check-vet): Copy internal/objabi to check-vet-dir. * Makefile.in: Rebuild. From-SVN: r264546
* syscall: remove UstatIan Lance Taylor2018-06-221-12/+0
| | | | | | | | | | | glibc 2.28 removes ustat.h and the ustat function entirely, which breaks syscall.Ustat. Updates golang/go#25990 Reviewed-on: https://go-review.googlesource.com/120535 From-SVN: r261896
* libgo: add support for the Nios II architectureIan Lance Taylor2018-05-022-2/+2
| | | | | | Reviewed-on: https://go-review.googlesource.com/90775 From-SVN: r259866
* re PR go/84484 (libgo configure tests fail to find -latomic)Andreas Schwab2018-02-222-2/+2
| | | | | | | | | | | | | PR go/84484 libgo: add support for riscv64 Patch by Andreas Schwab. Reviewed-on: https://go-review.googlesource.com/96377 * go.test/go-test.exp (go-set-goarch): Recognize riscv64-*-*. From-SVN: r257914
* compiler: rationalize external symbol namesIan Lance Taylor2018-01-241-9/+9
| | | | | | | | | | | | | | | | | | | Encode all external symbol names using only ASCII alphanumeric characters, underscore, and dot. Use a scheme that can be reliably demangled to a somewhat readable version as described in the long comment in names.cc. A minor cleanup discovered during this was that we were treating function types as different if one had a NULL parameters_ field and another has a non-NULL parameters_ field that has no parameters. This worked because we mangled them slightly differently. We now mangle them the same, so we treat them as equal, as we should anyhow. Reviewed-on: https://go-review.googlesource.com/89555 * go.go-torture/execute/names-1.go: New test. From-SVN: r257033