cmd/link: generate .so from Go code #256
Comments
Comment 4 by geek@duzy.info: expecting SO |
will issue #4069 help with this? |
Yes, except that issue #4069 doesn't mention to generate PIC object files which is preferable (but not essential) for shared objects. If issue #4069 is solved, at least we can generate non-PIC .so. |
Comment 11 by geek@duzy.info: -shared is not available in 6l, 8l, 5l etc |
Comment 12 by geek@duzy.info: -shared is now available in 6l, 8l, 5l etc |
Comment 15 by rasmus@mindplay.dk: The changes you are working on - will they provide .so only or .dll on Windows too? I am fast falling in love with Go, but realized too late that although it is technically a "system" programming language, things like shell-extensions and plug-ins are still out of reach... |
following https://code.google.com/p/go-wiki/wiki/HandlingIssues here is a quick rationale: - allow some form of dynamic code loading - ability to, say, implement a CPython module in Go (or a ruby one, or...) |
Comment 20 by peter@scraperwiki.com: I would also like to be able to implement an NSS module using go, which is not possible without this functionality. |
Comment 22 by rasmus@mindplay.dk: Writing a VST plugin in this language would be so bad ass, since Go provides performance suitable for real-time DSP. |
CL https://golang.org/cl/9738047 references this issue. |
This issue is a little vague. It now works in some ways on some systems on tip, using -buildmode=shared, -buildmode=c-shared, and -linkshared. Let's move more specific uses on specific systems to separate issues. |
Reflection also needs to be considered when loading a library; I may not know what symbols are available; but I know what interfaces I support, so being able to scan a dynamically loaded extension for its types and picking those with interfaces of interest is useful. I started today thinking about writing plugins for an existing shell I have. This would have been first 'can Go link shared libraries?' But on further consideration, if it did use shared libraries how would I use them? |
by JeanLou.Dupont:
The text was updated successfully, but these errors were encountered: