Static/Dynamic Linking and the Administrator and User

...

based


unbased


based


unbased LARPer spotted


Even more size-of-hello-world-binary LARPing. This time with strip.


based

Imagine wishing to escape the C braindamage so badly, yet still writing in C even when you don't have to.


Thanks for telling this.


What the fuck is your problem?
Non-trivial programs linked to musl libc are much lighter too.
If you don't like the printf, here's another program for you:

int main(void){return 0;}

LMAO. See how bloated that shit is with Glibc.
Sure, non-trivial static binaries with musl will be heavier than dynamic glibc ones most of the time, but the main point here is that glibc is braindamaged and is not even viable for static linking.

Neither one is better than the other because they both have different strengths and weaknesses. For system software shipped with the OS or software installed by the system administrator static linking makes little sense, because the vendor or admin is in the position to manage dependencies and ensure everything works together correctly. Replicating the same library functions over and over again in every binary that uses them is wasteful, which is why dynamic linking was introduced in the first place. But for 3rd party application software distributed as binaries and intended for user installations, static linking makes far more sense, because applications can be shipped in simple signed packages that "just work", first time every time, without relying on package managers to manage dependencies, etc. The either-or approach is stupid imo; but dynamic linking won out, and that is what we seem to be stuck with.

...

Musl and glibc comparison, mostly.
There is NO fucking way a helloworld binary should weigh under a megabyte in the Cnile language AKA "the lowest of the high-level" and "abstraction close to assembly". This is beyond retarded. Compared to musl result in 1078862 it shows how much of it is unneeded. Though that user also states that dynamic binary weighs 20KB, and that's kinda weird too, maybe musl is not that optimized for dynamic linking as far as binary size for small programs goes.

archlinux.org/packages/core/x86_64/glibc/
archlinux.org/packages/community/x86_64/musl/
Done. Now fuck off, LARPer.

That's pretty fuckin neato

xD

Pretty good post. The portability part can't be understated, I've lost count of how often I wished Drepper a long painful death because some compiler bootstrapping binary was linked to glibc.

No you aren't. -static gives you a dynamic binary if you use glibc. Try to run it on a musl system and you will see. Or just use ldd. Do it with an actual static binary as well to see the difference.


Correct but misleading. It was introduced to work around the idiocies of X11.