I tried to recreate the simplest example:
testAdd.go:
package main
func main () {
_ = add(3,5)
}
addAsm.s:
TEXT main.add(SB), NOSPLIT|NOFRAME|ABIInternal, $0-16
ADDQ BX, AX
RET
I can compile the first program with: go tool compile testAdd.go
I can run the assembler: go tool asm addAsm.s
I have two object files testAdd.o and addASm.o
but linking the two file with the run time fails: go tool link testAdd.o
rutime.a not found.
I looked all over the internet, but this time I cannot find a hint of how to combine an assmbly written file with a go program to generate an executable. The examples are all old (prior to go 1.18 when stack function calls have been replaced by register calls)
any help is very much appreciated,
regards,
peter