cl: go:linkname specifies call convention by C.xxx

This commit is contained in:
xushiwei
2024-04-26 13:09:24 +08:00
parent 33716a3385
commit f86cd74a98
9 changed files with 27 additions and 13 deletions

View File

@@ -2,7 +2,7 @@ package main
import _ "unsafe"
//go:linkname printf printf
//go:linkname printf C.printf
func printf(format *int8, __llgo_va_list ...any)
var hello = [...]int8{'H', 'e', 'l', 'l', 'o', '\n', 0}