Re:Go 1.3 Linker Overhaul
by acqq on Thursday November 28, 2013 @05:19AM
(#6813914)
Now that the modules are mentioned in the discussion: can one Go application consist of more .so or .dlls all writren in Go at all?
[ Parent
| on HN ]
Go links static executables only.
Thanks. In my top post when I asked about intra-modules optimizations I've naturally meant "compiler produced pre-linking object" modules, but after the discussion I've recognized that I totally missed that "already compiled objects loaded for execution" (i.e. .so or .dlls) are also an important feature for a language that intends to support seriously big projects.
Are there any plans for making ".so" modules in native Go?
> Are there any plans for making ".so" modules in native Go?
Not from the main team, no. They support compiling `.a` library files that can be statically linked, but the authors of Go generally consider dynamic linking to be harmful.[0]
However, because Android development requires `.so` files, the goandroid project[1] contains patches to make go support shared libraries.
[0]: http://harmful.cat-v.org/software/dynamic-linking/ [1]: https://github.com/eliasnaur/goandroid