英文:
Link Go with arbitrary object files (assembly)?
问题
我想让我写的汇编函数在我的Go代码中可用。我已经看到了使用Go汇编语法链接函数的方法,或者使用gccgo工具链链接目标文件的方法。
然而,理想情况下,我希望能够使用NASM和"gc"工具链。我已经尝试了cgo/6g/6l,但是到目前为止没有成功。
英文:
I would like to make functions written in assembly available to my Go code. I have seen methods for linking functions written in Go assembler's syntax or linking object files using the gccgo toolchain.
However, ideally, I would like to be able to use NASM and the "gc" toolchain. I have been messing around with cgo/6g/6l, but had no luck so far.
答案1
得分: 1
你可以按照https://code.google.com/p/go-wiki/wiki/GcToolchainTricks中所述的方法使用syso文件,但是关于它的资源几乎没有。
英文:
You can use syso files as outlined in https://code.google.com/p/go-wiki/wiki/GcToolchainTricks, however there are next to no resources about it.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论