Hello! I'm trying to write a tiny go program with a SayHello function written by assembly. When I build it, the go build command giving me an error message:
# bar main.asmSayHello: relocation target runtime.printstring not defined for ABI0 (but is defined for ABIInternal) Here are the codes. main.go: package main func main() { asmSayHello() } func asmSayHello() and main_amd64.s: #include "textflag.h" #include "funcdata.h" // "Hello, World\n" DATA text<>+0(SB)/8,$"Hello Wo" DATA text<>+8(SB)/8,$"rld!\n" GLOBL text<>(SB),NOPTR,$16 // func asmSayHello() TEXT ·asmSayHello(SB), $16-0 NO_LOCAL_POINTERS MOVQ $text<>+0(SB), AX MOVQ AX, (SP) MOVQ $16, 8(SP) CALL runtime·printstring(SB) RET The go facility version information: # go version go version go1.12.5 linux/amd64 Anyone who can help me to solve this weird problem (at least for me :) )? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/8eb26838-3c2f-430d-996b-52e2ef93786b%40googlegroups.com.