Skip to content

static vs dynamic linking policy

Henrique Lengler edited this page Jan 28, 2015 · 3 revisions

In general, sabotage prefers static builds for speed, which doesn't usually hurt much in terms of size, since musl is highly optimized for static linking.

The core stuff (busybox, toolchain, debug and build tools) should be built statically under all circumstances so that the system doesn't break on a (failed) libc update.

however stuff that uses bloated libraries like OpenSSL is linked dynamically for space considerations (both ram and hdd memory). This includes curl, git, wget which depend on it. each one of those apps would hold an entire copy of the 1.5 MB bloatlib in its private memory space.

I am uncertain whether I should make an exception for openSSH, which could be considered a crucial part of the system while relying on openssl.

Perl and python must be dynamically linked to be remotely useful (interfacing with any C-code).