Nim: Deploying static binaries
The reason why static linking has been all but banned is security and bug fixes: with static linking, the bugs and performance issues are fused into the resulting binary; fixes to libc will require a complete re-build. If you&#x27;re delivering static binaries for embedded firmware images, this will quickly turn into a security maintenance nightmare, especially for end users of the final product.<p>Linking dynamically with libc will never be an issue on illumos- or any real UNIX-based operating system because libc includes all previous interface versions and can therefore guarantee that it is backward compatible.<p>Long story short: develop and build your software on an illumos-based operating system like OmniOS or SmartOS and dynamically link only with libc and you won&#x27;t have to worry about static linking for convenience delivery: link on the oldest version of SmartOS and sleep well at night knowing your application will work on the latest nightly build. As an added bonus, your binary will be smaller and the runtime linker will only mmap(2) the required code pages out of libc into memory.<p><a href="http:&#x2F;&#x2F;garrett.damore.org&#x2F;2015&#x2F;09&#x2F;on-go-portability-and-system-interfaces.html" rel="nofollow">http:&#x2F;&#x2F;garrett.damore.org&#x2F;2015&#x2F;09&#x2F;on-go-portability-and-syst...</a>