mirror of
https://github.com/golang/go
synced 2024-11-07 09:26:11 -07:00
6458b2e8db
This provides the runtime glue (_rt0_riscv64_linux_lib) for c-archive and c-shared support, along with enabling both of these buildmodes on linux/riscv64. Both misc/cgo/testcarchive and misc/cgo/testcshared now pass on this platform. Fixes #47100 Change-Id: I7ad75b23ae1d592dbac60d15bba557668287711f Reviewed-on: https://go-review.googlesource.com/c/go/+/334872 Trust: Joel Sing <joel@sing.id.au> Run-TryBot: Joel Sing <joel@sing.id.au> Reviewed-by: Cherry Mui <cherryyz@google.com>
14 lines
305 B
Go
14 lines
305 B
Go
// Copyright 2015 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 linux,arm64 linux,riscv64
|
|
|
|
package main
|
|
|
|
import "syscall"
|
|
|
|
func dup2(oldfd, newfd int) error {
|
|
return syscall.Dup3(oldfd, newfd, 0)
|
|
}
|