src/cmd/link/testdata/linkname/coro2.go
raw| 1 | // Copyright 2024 The Go Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style |
| 3 | // license that can be found in the LICENSE file. |
| 4 | |
| 5 | // Linkname corostart is not allowed, as it doesn't have |
| 6 | // a linknamed definition. |
| 7 | |
| 8 | package main |
| 9 | |
| 10 | import _ "unsafe" |
| 11 | |
| 12 | //go:linkname corostart runtime.corostart |
| 13 | func corostart() |
| 14 | |
| 15 | func main() { |
| 16 | corostart() |
| 17 | } |