aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/syscall
AgeCommit message (Collapse)AuthorFilesLines
2023-05-11syscall: add prlimitIan Lance Taylor1-0/+8
As of https://go.dev/cl/476695 golang.org/x/sys/unix can call syscall.prlimit, so we need such a function in libgo. For golang/go#46279 Fixes golang/go#59712 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/486576
2022-11-29syscall, runtime: always call XSI strerror_rIan Lance Taylor2-47/+9
This does the right thing for either glibc or musl on GNU/Linux. Based on patch by Sören Tempel. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/454176
2022-06-17libgo: permit loff_t and off_t to be macrosIan Lance Taylor1-8/+8
They are macros in musl libc, rather than typedefs, and -fgo-dump-spec doesn't handle that case. Based on patch by Sören Tempel. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/412075
2022-06-14syscall: gofmtIan Lance Taylor42-6/+52
Add blank lines after //sys comments where needed, and then run gofmt on the syscall package with the new formatter. This is the libgo version of CL 407136. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/412074
2022-03-16libgo: update to final Go 1.18 releaseIan Lance Taylor1-27/+0
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/393377
2022-02-18libgo: update Hurd supportIan Lance Taylor2-1/+279
Patches from Svante Signell for PR go/104290. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/386797
2022-02-18libgo: update to Go1.18rc1 releaseIan Lance Taylor2-17/+75
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/386594
2022-02-16libgo: restore building on SolarisIan Lance Taylor3-5/+3
Add build tags and a few other changes so that libgo builds on Solaris. Patch partially from Rainer Orth. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/386215
2022-02-11libgo: update to Go1.18beta2Ian Lance Taylor51-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
2021-08-14libgo: various fixes for Solaris supportIan Lance Taylor5-12/+18
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/342189
2021-08-12libgo: update to Go1.17rc2Ian Lance Taylor49-135/+348
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/341629
2021-01-29libgo: update to Go1.16rc1Ian Lance Taylor4-271/+36
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/287493
2021-01-12syscall: ensure openat uses variadic libc wrapperPaul E. Murphy1-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
2021-01-05syscall: don't define sys_SETREUID and friendsIan Lance Taylor2-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
2020-12-30libgo: update to Go1.16beta1 releaseIan Lance Taylor23-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
2020-12-07syscall: don't use AF_LINK on hurdIan Lance Taylor2-1/+102
Patch from Svante Signell. Fixes PR go/98153 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/275939
2020-11-10libgo: update to Go 1.15.4 releaseIan Lance Taylor1-0/+45
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/268177
2020-10-28libgo: handle linking to NetBSD's versioned symbolsNikhil Benesch1-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
2020-10-28syscall: don't build libcall_bsd.go on solarisIan Lance Taylor1-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
2020-10-26syscall: import additional BSD-specific syscall wrappersNikhil Benesch2-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
2020-10-21syscall: only compile ptrace varargs shim on LinuxNikhil Benesch12-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
2020-10-21syscall: import upstream code for BSD sockets and sysctlsNikhil Benesch3-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
2020-10-20syscall: remove Sendfile on NetBSDNikhil Benesch2-3/+3
NetBSD does not support the sendfile syscall. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/263521
2020-10-13syscall: port fix for netbsd unix sockets from upstreamNikhil Benesch1-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
2020-09-30libgo: add 32-bit RISC-V (RV32) supportMaciej W. Rozycki1-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
2020-09-22syscall: fix TestForeground for AIXClément Chigot2-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
2020-09-22syscall: remove ptrace syscall on ppc64Clément Chigot2-3/+3
ptrace is available only for 32 bits programs. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/252558
2020-09-17libgo: fix ptrace syscall hooks into glibcPaul E. Murphy2-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
2020-08-01libgo: update to go1.15rc1Ian Lance Taylor14-182/+176
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/245157
2020-05-11syscall: append to environment in tests, don't clobber itIan Lance Taylor1-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
2020-02-15libgo: update to Go1.14rc1 releaseIan Lance Taylor1-1/+3
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/218017
2020-02-03syscall: fix riscv64 GNU/Linux buildIan Lance Taylor1-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
2020-01-29runtime, syscall: add a couple of hurd build tagsIan Lance Taylor1-1/+1
Patch by Svante Signell. Updates PR go/93468 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/216959
2020-01-21libgo: update to Go1.14beta1Ian Lance Taylor36-151/+589
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/214297
2019-12-24re PR go/93020 (Final patches to build gcc-10 on GNU/Hurd)Ian Lance Taylor1-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
2019-09-12libgo: update to Go1.13Ian Lance Taylor6-66/+58
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/194698 From-SVN: r275691
2019-09-06libgo: update to Go 1.13beta1 releaseIan Lance Taylor22-302/+943
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/193497 From-SVN: r275473
2019-05-27re PR go/90614 (gcc-9.1.0/libgo/go/syscall/wait.c:54:22: error: unused ↵Ian Lance Taylor1-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
2019-04-19libgo/go/syscall: add SockAddrDatalink on AIXIan Lance Taylor1-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
2019-04-08libgo: update to Go 1.12.2Ian Lance Taylor1-0/+1
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/170706 From-SVN: r270214
2019-03-19libgo: fix build on AIXIan Lance Taylor8-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
2019-03-09re PR go/89447 (libgo largefile support is incomplete and inconsistent)Ian Lance Taylor8-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
2019-02-26libgo: update to Go 1.12 releaseIan Lance Taylor1-0/+13
Reviewed-on: https://go-review.googlesource.com/c/163742 From-SVN: r269216
2019-02-15compiler, runtime: harmonize types referenced by both C and GoIan Lance Taylor2-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
2019-02-12syscall: don't assume that WIFCONTINUED is definedIan Lance Taylor1-0/+4
It's not defined on the Hurd. Reviewed-on: https://go-review.googlesource.com/c/161963 From-SVN: r268828
2019-02-07os, syscall: Hurd fixes for a couple of testsIan Lance Taylor1-5/+7
Based on patch by Svante Signell. Reviewed-on: https://go-review.googlesource.com/c/161520 From-SVN: r268605
2019-02-07syscall: add Hurd supportIan Lance Taylor9-133/+188
Loosely based on a patch by Svante Signell. Reviewed-on: https://go-review.googlesource.com/c/161518 From-SVN: r268603
2019-02-01libgo: add hurd build tags to test filesIan Lance Taylor2-2/+6
Patch by Svante Signell. Reviewed-on: https://go-review.googlesource.com/c/160823 From-SVN: r268460
2019-02-01libgo: add hurd build tagsIan Lance Taylor13-10/+14
Patch by Svante Signell. Reviewed-on: https://go-review.googlesource.com/c/160822 From-SVN: r268459
2019-01-18libgo: update to Go1.12beta2Ian Lance Taylor28-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